]> granicus.if.org Git - apache/commitdiff
Merge r1538490 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 12 Nov 2013 19:35:03 +0000 (19:35 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 12 Nov 2013 19:35:03 +0000 (19:35 +0000)
c->sbh can be unexpectedly NULL when the thread that pulls the ready keepalive
connection out of the queue laps the thread that put it on the queue.

Submitted by: covener
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1541207 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/mpm/event/event.c

diff --git a/STATUS b/STATUS
index af61fe55d8211ecc52a52858c7f34e9d5fd0b22f..e2fe5a224423e46fee2d0113fd54c40d9d002342 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -97,11 +97,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * event MPM: null out c->sbh more carefully as we enter keepalive
-    trunk patch: http://svn.apache.org/r1538490
-    2.4.x patch: http://people.apache.org/~covener/patches/httpd-2.4.x-event-sbh.diff
-    +1: covener, jim, trawick (needs CHANGES entry)
-
   * slotmem_shm: Ensure that the file-based shm file is removed during cleanup
     trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1540051
     2.4.x patch: trunk patch works
index f12468f51ac821328c5bd5446777ca01171d4634..1f89c5e3354404bfbc90f72018770d18dcae57b4 100644 (file)
@@ -1038,6 +1038,7 @@ read_request:
          */
         cs->expiration_time = ap_server_conf->keep_alive_timeout +
                               apr_time_now();
+        c->sbh = NULL;
         apr_thread_mutex_lock(timeout_mutex);
         TO_QUEUE_APPEND(keepalive_q, cs);
 
@@ -1051,6 +1052,7 @@ read_request:
                          "process_socket: apr_pollset_add failure");
             AP_DEBUG_ASSERT(rc == APR_SUCCESS);
         }
+        return;
     }
     else if (cs->pub.state == CONN_STATE_SUSPENDED) {
         apr_atomic_inc32(&suspended_count);