Mailing List Archive

Re: svn commit: r1916241 - /httpd/httpd/trunk/server/mpm/event/event.c
Is there a chunk of dead code below this change or am I misreading?

https://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?revision=1916241&view=markup&pathrev=1916241#l2758

The first thread creation failure results in clean_child_exit(), so
what's all this about starting the listener as long as we have some
workers or AH03271 stuff about not taking over slots quickly?

On Mon, Mar 11, 2024 at 4:36?PM <covener@apache.org> wrote:
>
> Author: covener
> Date: Mon Mar 11 20:35:27 2024
> New Revision: 1916241
>
> URL: http://svn.apache.org/viewvc?rev=1916241&view=rev
> Log:
> event: avoid possible hang in clean_child_exit
>
> If the pthread_create failure isn't on the first worker thread,
> another one is likely to hold the queue mutex already. The cleanup
> of pchild will try to cleanup the queue and block on destroying
> the condition.
>
> ST_UNGRACEFUL as we have no listener thread yet.
>
>
> Modified:
> httpd/httpd/trunk/server/mpm/event/event.c
>
> Modified: httpd/httpd/trunk/server/mpm/event/event.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1916241&r1=1916240&r2=1916241&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/mpm/event/event.c (original)
> +++ httpd/httpd/trunk/server/mpm/event/event.c Mon Mar 11 20:35:27 2024
> @@ -2749,6 +2749,7 @@ static void *APR_THREAD_FUNC start_threa
> APLOGNO(03104)
> "ap_thread_create: unable to create worker thread");
> /* let the parent decide how bad this really is */
> + signal_threads(ST_UNGRACEFUL);
> clean_child_exit(APEXIT_CHILDSICK);
> }
> threads_created++;
>
>


--
Eric Covener
covener@gmail.com
Re: svn commit: r1916241 - /httpd/httpd/trunk/server/mpm/event/event.c [ In reply to ]
On Mon, Mar 11, 2024 at 5:07?PM Eric Covener <covener@gmail.com> wrote:
>
> Is there a chunk of dead code below this change or am I misreading?
>
> https://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?revision=1916241&view=markup&pathrev=1916241#l2758
>
> The first thread creation failure results in clean_child_exit(), so
> what's all this about starting the listener as long as we have some
> workers or AH03271 stuff about not taking over slots quickly?


I see now, this only about scoreboard slots that were still in use and
not failures.