httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen" <>
Subject Re: Windows testers, AcceptFilter troubles solved?
Date Sun, 18 Mar 2012 12:17:47 GMT
What are you trying to solve ?

That we do not get anymore the errors like: winnt_accept: Asynchronous AcceptEx failed. 


the broken Acceptfilter https none and connect, which gives errors in the browser like:

Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.
Error 15 (net::ERR_SOCKET_NOT_CONNECTED): Unknown error

I tested the patch and still the errors above with none and connect.
Not yet seen the AcceptEx failed errors with the default(data), but it can go a day or a few

-----Original Message----- 
From: William A. Rowe Jr. 
Sent: Saturday, March 17, 2012 2:32 AM Newsgroups: gmane.comp.apache.devel 
Subject: Windows testers, AcceptFilter troubles solved? 

Ok folks, here's what we know; on some platforms the blocking behavior
is not being honored and SSL is terminated due to the "client's failure"
to provide enough bytes in time.  In fact it is the fault of apr plus
the socket stack for not returning without more bytes.

That said, I neglected the fact that the following functions replace
the passed variable with the old value, "un-zeroing" the value of zero!

Please give this patch a whirl and let us know what you all see on various
windows boxes with AcceptFilter data|connect|none against the ssl listener;

Index: server/mpm/winnt/child.c
--- server/mpm/winnt/child.c (revision 1301675)
+++ server/mpm/winnt/child.c (working copy)
@@ -291,7 +291,7 @@
     SOCKADDR_STORAGE ss_listen;
     int namelen = sizeof(ss_listen);
-    u_long zero = 0;
+    u_long zero;

     core_sconf = ap_get_core_module_config(ap_server_conf->module_config);
     accf_name = apr_table_get(core_sconf->accf_map, lr->protocol);
@@ -655,16 +655,21 @@
         sockinfo.remote  = context->sa_client;  = context->sa_server->sa_family;
         sockinfo.type    = SOCK_STREAM;
         /* Restore the state corresponding to apr_os_sock_make's default
          * assumption of timeout -1 (really, a flaw of os_sock_make and
          * os_sock_put that it does not query to determine ->timeout).
          * XXX: Upon a fix to APR, these three statements should disappear.
+        zero = 0;
         ioctlsocket(context->accept_socket, FIONBIO, &zero);
+        zero = 0;
         setsockopt(context->accept_socket, SOL_SOCKET, SO_RCVTIMEO,
                    (char *) &zero, sizeof(zero));
+        zero = 0;
         setsockopt(context->accept_socket, SOL_SOCKET, SO_SNDTIMEO,
                    (char *) &zero, sizeof(zero));
         apr_os_sock_make(&context->sock, &sockinfo, context->ptrans);

         /* When a connection is received, send an io completion notification
View raw message