Mailing List Archive

svn commit: r1916241 - /httpd/httpd/trunk/server/mpm/event/event.c
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++;