From 179b1ac6a4adb14ab0f52fbc7431534db9e3e8c8 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Mon, 11 Mar 2024 20:35:27 +0000 Subject: [PATCH] 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 --- server/mpm/event/event.c | 1 + 1 file changed, 1 insertion(+) 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++; -- 2.47.2