From: Eric Covener Date: Mon, 11 Mar 2024 20:35:27 +0000 (+0000) Subject: event: avoid possible hang in clean_child_exit X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=179b1ac6a4adb14ab0f52fbc7431534db9e3e8c8;p=thirdparty%2Fapache%2Fhttpd.git 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916241 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 29d18a943ac..e4af652ba3c 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -2749,6 +2749,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy) 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++;