]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
event: avoid possible hang in clean_child_exit
authorEric Covener <covener@apache.org>
Mon, 11 Mar 2024 20:35:27 +0000 (20:35 +0000)
committerEric Covener <covener@apache.org>
Mon, 11 Mar 2024 20:35:27 +0000 (20:35 +0000)
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

server/mpm/event/event.c

index 29d18a943accd93250b41d9aee982c7a29e85e4a..e4af652ba3cccc9b55e1a365684ad7850bcd92dd 100644 (file)
@@ -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++;