Bug 29533 - deadlock
Summary: deadlock
Status: CLOSED DUPLICATE of bug 22030
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.0.49
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-11 22:48 UTC by ek
Modified: 2005-02-08 15:24 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ek 2004-06-11 22:48:23 UTC
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
Comment 1 André Malo 2004-06-11 22:58:06 UTC

*** This bug has been marked as a duplicate of 22030 ***