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 8389] New: - server goes into infinite loop
Date Tue, 23 Apr 2002 01:16:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8389>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8389

server goes into infinite loop

           Summary: server goes into infinite loop
           Product: Apache httpd-2.0
           Version: 2.0.35
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: mod_ssl
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: solomon@conceptshopping.com


Whenever somebody visits a page in https region of my server, (using
basic password authentication), one of the httpd processes on the server
goes into an infinite loop, pegged at 100% CPU.  I've tracked the problem down
to the loop in ssl_io_input_getline at about line 704 in ssl_engine_io.c.
It appears that there are circumstances in which SSL_read on an ssl stream
can persistenly return 0.  The code in ssl_io_input_getline doesn't recognize
0 as an error, so it just keeps trying, forever, in an infinite loop.
I'm using openssl 0.9.6c.  The man page for SSL_read is--shall we say--
challenging, so I'm not sure whether this "persistent 0" behavior is a bug or
a feature, but it is quite repeatable in my setup.  When it occurs,
SSL_get_error returns SSL_ERROR_ZERO_RETURN.

Fortunately, there's a one-line fix to ssl_io_input_getline:

    while (tmplen > 0) {
        status = ssl_io_input_read(ctx, buf + offset, &tmplen);

        if (status != APR_SUCCESS) {
            return status;
        }

        if (tmplen == 0) break;  /* <---- add this line */

        *len += tmplen;

I can't be sure this isn't simply plastering over some more serious problem,
but it seems to work for me.

If you need any additional info (version of solaris, httpd.conf file, phase
of the moon ...) just ask.

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


Mime
View raw message