From 8316c1d842f2e443145547fb7b3250efaed52a44 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Tue, 12 Nov 2013 19:35:03 +0000 Subject: [PATCH] Merge r1538490 from trunk: 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 | 5 ----- server/mpm/event/event.c | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/STATUS b/STATUS index af61fe55d8..e2fe5a2244 100644 --- 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 diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index f12468f51a..1f89c5e335 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -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); -- 2.50.1