httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47645] httpd-2.2.12 often hangs for hours
Date Wed, 19 Aug 2009 18:33:49 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47645


Jeff Trawick <trawick@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|All                         |APR
            Version|2.2.12                      |1.3.4
         AssignedTo|bugs@httpd.apache.org       |bugs@apr.apache.org
            Product|Apache httpd-2              |APR


--- Comment #11 from Jeff Trawick <trawick@apache.org> 2009-08-19 11:33:44 PDT ---
I was able to reproduce the event port problem then run successfully with this
patch, which applies cleanly to the APR in httpd 2.2.12 or 2.2.13.  (It isn't
expected to be needed for httpd older than 2.2.12, unless a certain prefork MPM
fix has been applied on top of 2.2.11).

----------cut here-----------
--- poll/unix/port.c.orig    2009-08-19 13:48:22.876217458 -0400
+++ poll/unix/port.c    2009-08-19 13:49:49.908294412 -0400
@@ -320,6 +320,17 @@
     ret = port_getn(pollset->port_fd, pollset->port_set, pollset->nalloc,
                     &nget, tvptr);

+    if (ret == -1 && nget > 0) {
+        /* On at least some levels of Solaris, -1/ETIME can be
+         * reported at the same time an event is returned.
+         * Since the kernel forgets the event condition as soon as
+         * it is returned, we have to ignore the -1/ETIME and
+         * process the event to prevent a deadlock.
+         */
+
+        ret = 0;
+    }
+
     /* decrease the waiting ASAP to reduce the window for calling 
        port_associate within apr_pollset_add() */
     apr_atomic_dec32(&pollset->waiting);
------------cut here-----------

If anyone tries this patch, please report back.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message