httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: cvs commit: httpd-2.0/server/mpm/worker pod.c
Date Fri, 21 Mar 2003 16:48:21 GMT
Joe Orton wrote:
> On Fri, Mar 21, 2003 at 11:15:09AM -0500, Jeff Trawick wrote:
>>Aaron Bannert wrote:
>>>The PODs in the worker MPM are getting closed and the parent is then
>>>unable to kill its children when it needs to (don't you love how
>>>morbid that sounds?). I see one of these every second in the error log:
>>>[Thu Mar 20 18:09:25 2003] [warn] (32)Broken pipe: write pipe_of_death
>>lots of theories :)
>>what I see with HEAD is that the pipe gets file descriptor 2 (stderr), 
>>and we later make sure that the error log is file descriptor 2, 
>>resulting in one side of the pipe getting closed
> Sounds like this is a different manifestation of the problem I can see.  
> Does it work if you back down to r1.56 of filedup.c?

yes, backing off the patch I posted reintroduces the problem and then 
reverting filedup.c back to r1.56 "fixes" the problem

>>I would guess that some other changes with closing descriptors let us 
>>get fd 2 for one of the pipe handles, and that this conceivably could 
>>have happened with all sorts of code changes.
> In the r1.57 filedup.c change, a cleanup is registered for the "new"  
> fd coming out of apr_file_dup2(), which wasn't happening previously.  
> I'm guessing that this cleanup is closing fd 2 when pconf is cleared, or
> something like that.

backtracking uses of fd 2 up through this time is somewhat funny

it looks like

a) we set the error log to file descriptor 2

b) we close file descriptor 2 and set it to /dev/null via the freopen() 
in apr_proc_detach

c) we close file descriptor 2 (because of cleanup registered around step 

d) we create the pod, with file descriptor 2 as one side of the pipe

e) we again set the error log to file descriptor 2, losing that side of 
the pipe

View raw message