httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1538490 - in /httpd/httpd/trunk/server/mpm: event/event.c eventopt/eventopt.c
Date Mon, 04 Nov 2013 01:37:31 GMT
Author: covener
Date: Mon Nov  4 01:37:31 2013
New Revision: 1538490

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


Modified:
    httpd/httpd/trunk/server/mpm/event/event.c
    httpd/httpd/trunk/server/mpm/eventopt/eventopt.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=1538490&r1=1538489&r2=1538490&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Mon Nov  4 01:37:31 2013
@@ -1066,6 +1066,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);
 
@@ -1079,6 +1080,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);

Modified: httpd/httpd/trunk/server/mpm/eventopt/eventopt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/eventopt/eventopt.c?rev=1538490&r1=1538489&r2=1538490&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/eventopt/eventopt.c (original)
+++ httpd/httpd/trunk/server/mpm/eventopt/eventopt.c Mon Nov  4 01:37:31 2013
@@ -1124,7 +1124,7 @@ read_request:
          */
         cs->expiration_time = ap_server_conf->keep_alive_timeout +
                               apr_time_now();
-
+        c->sbh = NULL;
         /* Add work to pollset. */
         v = ap_equeue_writer_value(eq);
         v->timeout_type = TIMEOUT_KEEPALIVE;
@@ -1133,6 +1133,7 @@ read_request:
         v->tag = "process_socket(keepalive)";
         ap_equeue_writer_onward(eq);
         apr_pollset_wakeup(event_pollset);
+        return;
     }
     else if (cs->pub.state == CONN_STATE_SUSPENDED) {
         apr_atomic_inc32(&suspended_count);



Mime
View raw message