Bug 23473 - Hangs in poll() while child is waiting in write()
Summary: Hangs in poll() while child is waiting in write()
Status: CLOSED DUPLICATE of bug 22030
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mpm_prefork (show other bugs)
Version: 2.0.47
Hardware: PC other
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2003-09-29 07:36 UTC by Andrew Maltsev
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Maltsev 2003-09-29 07:36:00 UTC
I found what appears to be a strange bug in both redhat 9 rpm package (2.0.40)
and 2.0.47 that I just compiled from the sources.

I have apache configured in prefork mode, no threads. Perl CGI script that
writes some debugging information to stderr. Sometimes it hangs on that very
thing, writing to stderr -- if I run strace this is what I see on the script:

am@croco:/home/httpd> sudo strace -p 12038
write(2, "Web::Page::parse - path=\'/bits/m"..., 54

At the same time, apache that forked off that perl script:

am@croco:~> sudo strace -p 12019

If I wait long enough apache gets (I guess) an alarm and breaks out of that poll
with EINTR, then sometimes it hangs again sometimes works fine through the end
of that script.

The same script always hangs in the same place, if I modify it -- it starts to
hang in a different place -- so I guess it depends not on timing, but on memory
allocation somehow.

Any ideas? I can reproduce it steadily.
Comment 1 Jeff Trawick 2003-09-29 15:05:45 UTC
CGI I/O is messed up when CGI scripts fill the kernel's pipe buffer for stderr,
causing a deadlock.

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