[suPHP] suPHP Zombies

Max Korzhanoff mk at garmtech.lv
Tue May 6 14:03:31 CEST 2008


As I wrote before, we had the same behavior with few PHP4 releases and 
now few PHP5 releases behave the same. And here's the output with ppid.

# ps ax -o pid,ppid,fname,wchan,comm| grep -i php-cgi
 5740  3705 php-cgi  exit   php-cgi <defunct>
 5749 26239 php-cgi  exit   php-cgi <defunct>
 5751  5689 php-cgi  -      php-cgi
 5752 28375 php-cgi  -      php-cgi
 5753 28419 php-cgi  -      php-cgi

# ps auxwww | grep 3705
apache    3705  2.0  3.5 287988 150268 ?     S    14:56   0:01 
/usr/sbin/httpd
root      5831  0.0  0.0  1660  516 pts/1    S+   14:58   0:00 grep 3705

Any more thoughts on that?

Jeremy Chadwick wrote:
> I can confirm this behaviour, although I'm not so sure the problem is
> related to suPHP.  I'd have to look at the code to see if wait() or
> waitpid() is being called in the parent when fork() is used.
>
> I'm more inclined to believe the problem is with PHP itself, possibly
> when called as a CGI.  I see some Google results which confirm this.
>
> In the case of real-life scenarios: we have a couple users who use web
> board scripts which do retarded things, and most of those scripts result
> in defunct (zombie) processes.  However, those processes automatically
> get reaped when they exit.  I have not seen them "stick around", except
> for the very early days when we used FreeBSD 4.x and very old PHP.
>
> Your below ps does not include parent PIDs, which would be useful,
> although the parent process may be httpd (which won't tell much).
>   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mk.vcf
Type: text/x-vcard
Size: 253 bytes
Desc: not available
Url : http://lists.marsching.com/pipermail/suphp/attachments/20080506/160dee5c/attachment.vcf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3225 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.marsching.com/pipermail/suphp/attachments/20080506/160dee5c/attachment.bin 


More information about the suPHP mailing list