You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "J. Nick Koston" <ni...@cpanel.net> on 2003/07/20 18:51:49 UTC

[users@httpd] Re: Perl Processes "Zombie-Out"...

I've been seeing the same problem.  It seems to be related to something
not being able to send sigterm on a broken pipe (sigpipe).

[pid 12139] gettimeofday({1058718820, 273235}, NULL) = 0
[pid 12139] times({tms_utime=0, tms_stime=0, tms_cutime=0,
tms_cstime=0}) = 164894393
[pid 12139] close(3)                    = 0
[pid 12139] rt_sigaction(SIGUSR1, {0x80967b4, [],
SA_INTERRUPT|0x4000000}, {SIG_IGN}, 8) = 0
[pid 12139] wait4(12147, NULL, WNOHANG, NULL) = -1 ECHILD (No child
processes)
[pid 12139] kill(12147, SIGTERM)        = -1 EPERM (Operation not
permitted)
[pid 12139] close(3)                    = -1 EBADF (Bad file descriptor)


Forwarded Message Follows:
Lately, I have been noticing that all Perl applications executed as CGIs
via
Apache have randomly taken to go zombie.  That is,  % ps ax | grep cgi has
come to return a list such as the following:

11359 ?        Z      0:00 [Pollitssi.cgi <defunct>]
11412 ?        Z      0:00 [Pollitssi.cgi <defunct>]
11415 ?        Z      0:00 [Pollitssi.cgi <defunct>]
11465 ?        Z      0:00 [Pollitssi.cgi <defunct>]
11509 ?        Z      0:00 [index.cgi <defunct>]
11511 ?        Z      0:00 [Pollitssi.cgi <defunct>]
11544 ?        Z      0:00 [Pollitssi.cgi <defunct>]
11600 ?        Z      0:00 [Pollitssi.cgi <defunct>]
11663 ?        Z      0:00 [Pollitssi.cgi <defunct>]

Note that the above is only a segment of the list and that as the server's
uptime prolongs, so does the listing's length (as is obvious, for more users
are accessing more parts of the server).  When I restart Apache, all the
CGI-based defunct processes disappear, as should be expected.  However, I'm
certain there must be some way to correct this error besides invoking
frequent Apache restarts and/or restoring my Apache install. :-)  Any
thoughts on what could be causing this situation and how it should be
rectified?

Thank you!

Regards,
Brad Galiette


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
-- 
J. Nick Koston <ni...@cpanel.net>
cPanel, Inc.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Perl Processes "Zombie-Out"...

Posted by Joshua Slive <jo...@slive.ca>.
On Sun, 20 Jul 2003, J. Nick Koston wrote:

> I've posted a better patch to
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21737
>
> I've also explained why this happens on the bug.

Thanks.  I've also forwarded your message to the development mailing list,
so someone should pick it up.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Perl Processes "Zombie-Out"...

Posted by "J. Nick Koston" <ni...@cpanel.net>.
I've posted a better patch to 

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21737

I've also explained why this happens on the bug.

/Nick

On Sun, 2003-07-20 at 13:51, J. Nick Koston wrote:
> Here is what I know so far
> 
> 1. Its a bug in 1.3.28, 1.2.37 is NOT AFFECTED.
> 2. This appears to only happen when using suexec (I have not tested that
> theory yet though)
> 3. The bug is in src/main/alloc.c.
> 4. The attached patch which has been backported from 1.3.27 fixes the
> problem.
> 5. This should be considered serious enough to release 1.3.29 as I've
> watched about 10 systems spiral down to their doom as a result of this.
> 6.  A Quick How to replicate the problem:
> 
> a) Put a this script in your cgi-bin
> --cut here--
> #!/usr/bin/php
> <?php phpinfo(); ?>
> --cut here--
> 
> b) Go to it your web browser.  Click reload over and over again (this
> will eventually cause a sigpipe). 
> 
> c) watch the zombies build up
> 
> Thanks!
> /Nick
> 
> On Sun, 2003-07-20 at 13:13, Joshua Slive wrote:
> > To start, you need to identify exactly what version of apache you are
> > running.
> > 
> > I've seen a couple reports in the apache bug database of zombie cgi
> > scripts after upgrading from 1.3.27 to 1.3.28.  Is that your case, or did
> > the problem exist with earlier versions?
> > 
> > Joshua.
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
-- 
J. Nick Koston <ni...@cpanel.net>
cPanel, Inc.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Perl Processes "Zombie-Out"...

Posted by "J. Nick Koston" <ni...@cpanel.net>.
Here is what I know so far

1. Its a bug in 1.3.28, 1.2.37 is NOT AFFECTED.
2. This appears to only happen when using suexec (I have not tested that
theory yet though)
3. The bug is in src/main/alloc.c.
4. The attached patch which has been backported from 1.3.27 fixes the
problem.
5. This should be considered serious enough to release 1.3.29 as I've
watched about 10 systems spiral down to their doom as a result of this.
6.  A Quick How to replicate the problem:

a) Put a this script in your cgi-bin
--cut here--
#!/usr/bin/php
<?php phpinfo(); ?>
--cut here--

b) Go to it your web browser.  Click reload over and over again (this
will eventually cause a sigpipe). 

c) watch the zombies build up

Thanks!
/Nick

On Sun, 2003-07-20 at 13:13, Joshua Slive wrote:
> To start, you need to identify exactly what version of apache you are
> running.
> 
> I've seen a couple reports in the apache bug database of zombie cgi
> scripts after upgrading from 1.3.27 to 1.3.28.  Is that your case, or did
> the problem exist with earlier versions?
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
-- 
J. Nick Koston <ni...@cpanel.net>
cPanel, Inc.

Re: [users@httpd] Re: Perl Processes "Zombie-Out"...

Posted by Joshua Slive <jo...@slive.ca>.
To start, you need to identify exactly what version of apache you are
running.

I've seen a couple reports in the apache bug database of zombie cgi
scripts after upgrading from 1.3.27 to 1.3.28.  Is that your case, or did
the problem exist with earlier versions?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org