You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2014/11/12 03:29:39 UTC

svn commit: r1638691 - in /httpd/httpd/trunk: CHANGES server/mpm/event/event.c

Author: covener
Date: Wed Nov 12 02:29:38 2014
New Revision: 1638691

URL: http://svn.apache.org/r1638691
Log:
Fix a bug in r1604350 that can lead to crashes in the event MPM under load.  

if start_lingering_close_blocking() returns 0, notify_suspend() will 
write a 1 into some potentially recently free'd memory from 
ptrans (cs->suspended).

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

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1638691&r1=1638690&r2=1638691&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Nov 12 02:29:38 2014
@@ -1,5 +1,7 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
+  
+  *) event: Resolve potential crashes under load after r1604350. [Eric Covener]
 
   *) mod_authnz_ldap: Resolve crashes with LDAP authz and non-LDAP authn since 
      r1608202. [Eric Covener]

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1638691&r1=1638690&r2=1638691&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Wed Nov 12 02:29:38 2014
@@ -1134,8 +1134,9 @@ read_request:
     }
 
     if (cs->pub.state == CONN_STATE_LINGER) {
-        start_lingering_close_blocking(cs);
-        notify_suspend(cs);
+        if (start_lingering_close_blocking(cs)) { 
+            notify_suspend(cs);
+        }
     }
     else if (cs->pub.state == CONN_STATE_CHECK_REQUEST_LINE_READABLE) {
         /* It greatly simplifies the logic to use a single timeout value here