From: Jan Kaluža Date: Mon, 6 Oct 2014 06:07:47 +0000 (+0000) Subject: event: Fix worker-listener deadlock in graceful restart caused by get_worker() X-Git-Tag: 2.5.0-alpha~3803 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71af35749e6d8de3ea654eb70b52905fa5d326b7;p=apache event: Fix worker-listener deadlock in graceful restart caused by get_worker() allocating new worker after ap_queue_info_term(), but not setting the have_idle_worker variable. PR 56960. Submitted By: Zin UDA Committed By: jkaluza git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629577 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 115be59b47..ccd9eb3c66 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -1385,13 +1385,13 @@ static void get_worker(int *have_idle_worker_p, int blocking, int *all_busy) else rc = ap_queue_info_try_get_idler(worker_queue_info); - if (rc == APR_SUCCESS) { + if (rc == APR_SUCCESS || APR_STATUS_IS_EOF(rc)) { *have_idle_worker_p = 1; } else if (!blocking && rc == APR_EAGAIN) { *all_busy = 1; } - else if (!APR_STATUS_IS_EOF(rc)) { + else { ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf, APLOGNO(00472) "ap_queue_info_wait_for_idler failed. " "Attempting to shutdown process gracefully");