You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jk...@apache.org on 2014/10/06 08:07:48 UTC

svn commit: r1629577 - /httpd/httpd/trunk/server/mpm/event/event.c

Author: jkaluza
Date: Mon Oct  6 06:07:47 2014
New Revision: 1629577

URL: http://svn.apache.org/r1629577
Log:
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

Modified:
    httpd/httpd/trunk/server/mpm/event/event.c

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1629577&r1=1629576&r2=1629577&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Mon Oct  6 06:07:47 2014
@@ -1385,13 +1385,13 @@ static void get_worker(int *have_idle_wo
     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");