httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <b...@wstoddard.com>
Subject Re: PR 15282 AcceptEx problem
Date Thu, 27 Feb 2003 20:33:50 GMT
Humm... how do our friends at MS solve this in IIS?

Bill

Allan Edwards wrote:
> As far as I can tell this is a bug in the Sprint
> PCS Connect support for AcceptEx, (they install a
> Winsock transport provider called BMI). However, it slips
> through our checks and causes the accept thread to
> hard loop and consume most of the cpu.
> 
> What happens is that in get_listeners_from_parent()
> WSASocket *succeeeds* using the WSAProtocolInfo from
> the parent however, AcceptEx in winnt_accept() fails
> with WSAENOTSOCK.
> 
> I don't see what we can do to fix this but we should
> at least avoid hogging the cpu and log an informative
> message. Unless there is a better idea I'll commit to 2.1
> 
> 16327 may be related but I haven't been able to recreate
> the problem with BlackIce or Norton Personal Firewall.
> 
> Allan
> 
> Index: child.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/child.c,v
> retrieving revision 1.12
> diff -u -d -b -r1.12 child.c
> --- child.c    26 Feb 2003 21:55:54 -0000    1.12
> +++ child.c    27 Feb 2003 16:38:59 -0000
> @@ -498,7 +498,7 @@
>      PCOMP_CONTEXT context = NULL;
>      DWORD BytesRead;
>      SOCKET nlsd;
> -    int rv;
> +    int rv, err_count = 0;
> 
>      apr_os_sock_get(&nlsd, lr->sd);
> 
> @@ -547,6 +547,14 @@
>                  ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf,
>                         "winnt_accept: AcceptEx failed due to early 
> client "
>                         "disconnect. Reallocate the accept socket and 
> try again.");
> +
> +                Sleep(100);
> +                if (++err_count > 100) {
> +                    ap_log_error(APLOG_MARK,APLOG_ERR, rv, ap_server_conf,
> +                                 "AcceptEx unrecoverable error, "
> +                                 "possibly incompatible firewall or VPN 
> software is installed.");
> +                    break;
> +                }
>                  continue;
>              }
>              else if ((rv != APR_FROM_OS_ERROR(ERROR_IO_PENDING)) &&
> @@ -558,6 +566,7 @@
>                  Sleep(100);
>                  continue;
>              }
> +            err_count = 0;
> 
>              /* Wait for pending i/o.
>               * Wake up once per second to check for shutdown .
> 
> 
> ------------------------------------------------------------------------
> 
> Index: child.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/child.c,v
> retrieving revision 1.12
> diff -u -d -b -r1.12 child.c
> --- child.c	26 Feb 2003 21:55:54 -0000	1.12
> +++ child.c	27 Feb 2003 16:38:59 -0000
> @@ -498,7 +498,7 @@
>      PCOMP_CONTEXT context = NULL;
>      DWORD BytesRead;
>      SOCKET nlsd;
> -    int rv;
> +    int rv, err_count = 0;
>  
>      apr_os_sock_get(&nlsd, lr->sd);
>  
> @@ -547,6 +547,14 @@
>                  ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf,
>                         "winnt_accept: AcceptEx failed due to early client "
>                         "disconnect. Reallocate the accept socket and try again.");
> + 
> +                Sleep(100);
> +                if (++err_count > 100) { 
> +                    ap_log_error(APLOG_MARK,APLOG_ERR, rv, ap_server_conf,
> +                                 "AcceptEx unrecoverable error, "
> +                                 "possibly incompatible firewall or VPN software is
installed.");
> +                    break;
> +                }           
>                  continue;
>              }
>              else if ((rv != APR_FROM_OS_ERROR(ERROR_IO_PENDING)) &&
> @@ -558,6 +566,7 @@
>                  Sleep(100);
>                  continue;
>              }
> +            err_count = 0;  
>  
>              /* Wait for pending i/o. 
>               * Wake up once per second to check for shutdown .



Mime
View raw message