DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29533>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29533

deadlock between httpd and CGI processes

           Summary: deadlock between httpd and CGI processes
           Product: Apache httpd-2.0
           Version: 2.0.49
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


if a CGI process writes a lot of data to stderr it can get into a deadlock
situation with the httpd process connected to it. I can reproduce this by
editing the test-cgi script provided with apache and adding several lines like 
this:

export 1>&2

if there's enough of these lines, you get a lock up.

it seems that apache waits to read all of the output on stdout of the CGI script
before even looking at stderr. so if you write enough bytes to stderr to
overflow the pipe buffer to httpd, the CGI process will lock up waiting to write
to stderr and the httpd process will lock up waiting for EOF on the CGI's
stdout. this is system dependent because the size of the pipe buffers differs
from system to system. I've seen this problem on solaris and irix.

is there a way to tell apache to not intercept stderr and let it go directly to
the error_log?

thanks

lefteris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to