www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gergely Madarasz <go...@caesar.elte.hu>
Subject general/1802: apache looses children
Date Fri, 13 Feb 1998 21:42:56 GMT

>Number:         1802
>Category:       general
>Synopsis:       apache looses children
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Feb 13 13:50:00 PST 1998
>Originator:     gorgo@caesar.elte.hu
>Release:        1.2.4, 1.3b3
debian/gnu linux, kernel version 2.0.32, glibc 2.0.5, 2.0.6, 2.0.7pre1
There are two indications of the problem:

The first: after running for a while the master daemon looses all its children,
strace shows that it just wait4()'s in an endless loop. Sending it a HUP signal
corrects the problem. I made a workaround, check for the number of running 
apache processes from cron and if it is 1, then send it a HUP, but this is 
not a solution.

The second: I compiled php3 support into apache. From a php3 script I call an
external program, then I check the return value. When I start apache it works
0fine, but after a while the return value is always -1. I have a strace log to 
show this problem:

pipe([5, 6])                            = 0
fork()                                  = 9904
close(6)                                = 0
fstat(5, {st_mode=0, st_size=0, ...})   = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x401a4000
read(5, "", 4096)                       = 0
--- SIGCHLD (Child exited) ---
close(5)                                = 0
wait4(9904, 0xbfffd440, 0, NULL)        = -1 ECHILD (No child processes)

actually these are all handled with the popen() and pclose() libc functions, 
called from the php module. php has nothing setup to handle SIGCHLD's, and as 
I see, apache doesn't either. I cannot quite understand what could cause this
a child exits and then wait4() reports there are no children. It looks as 
somehow SIGCHLD gets managed by SIG_IGN or something... afaik the child should 
be in <zombie> state until wait4()-ed, unless the SIGCHLD is handled by SIG_IGN


[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]

View raw message