Skip to content

Commit 179b1ac

Browse files
committed
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
1 parent 2ae427e commit 179b1ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/mpm/event/event.c

+1
Original file line numberDiff line numberDiff line change
@@ -2749,6 +2749,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
27492749
APLOGNO(03104)
27502750
"ap_thread_create: unable to create worker thread");
27512751
/* let the parent decide how bad this really is */
2752+
signal_threads(ST_UNGRACEFUL);
27522753
clean_child_exit(APEXIT_CHILDSICK);
27532754
}
27542755
threads_created++;

0 commit comments

Comments
 (0)