httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r759832 - in /httpd/httpd/trunk: CHANGES support/ab.c
Date Mon, 30 Mar 2009 02:19:02 GMT
Author: covener
Date: Mon Mar 30 02:19:02 2009
New Revision: 759832

URL: http://svn.apache.org/viewvc?rev=759832&view=rev
Log:
  *) ab: Fix a 100% CPU loop on platforms where a failed non-blocking connect
     returns EINPROGRESS and a subsequent poll() returns only POLLERR.
     Observed on HP-UX. 


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=759832&r1=759831&r2=759832&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Mar 30 02:19:02 2009
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.3.3
 
+  *) ab: Fix a 100% CPU loop on platforms where a failed non-blocking connect
+     returns EINPROGRESS and a subsequent poll() returns only POLLERR.
+     Observed on HP-UX.  [Eric Covener]
+
   *) Remove broken support for BeOS, OS/2, TPF, and even older platforms such
      as A/UX, Next, and Tandem.  [Jeff Trawick]
 

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=759832&r1=759831&r2=759832&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Mon Mar 30 02:19:02 2009
@@ -1745,7 +1745,13 @@
             if ((rv & APR_POLLERR) || (rv & APR_POLLNVAL)) {
                 bad++;
                 err_except++;
-                start_connect(c);
+                /* avoid apr_poll/EINPROGRESS loop on HP-UX, let recv discover ECONNREFUSED
*/
+                if (c->state == STATE_CONNECTING) { 
+                    read_connection(c);
+                }
+                else { 
+                    start_connect(c);
+                }
                 continue;
             }
             if (rv & APR_POLLOUT) {



Mime
View raw message