[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Fixed in Debian a long time ago. ** Changed in: php5 (Ubuntu) Status: Confirmed = Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in Ubuntu. https://bugs.launchpad.net/bugs/162082 Title: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed To manage notifications about this bug go to: https://bugs.launchpad.net/php/+bug/162082/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Fixed in Debian a long time ago. ** Changed in: php5 (Ubuntu) Status: Confirmed = Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/162082 Title: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed To manage notifications about this bug go to: https://bugs.launchpad.net/php/+bug/162082/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Changed in: debian Status: Confirmed = Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in Ubuntu. https://bugs.launchpad.net/bugs/162082 Title: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed To manage notifications about this bug go to: https://bugs.launchpad.net/php/+bug/162082/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Changed in: debian Status: Confirmed = Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/162082 Title: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed To manage notifications about this bug go to: https://bugs.launchpad.net/php/+bug/162082/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
JFI: you may want to use php-fpm instead. E.g. via the packages provided at dotdeb.org. -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Bug watch added: bugs.php.net/ #40286 http://bugs.php.net/bug.php?id=40286 ** Changed in: php Importance: Undecided = Unknown ** Changed in: php Status: New = Unknown ** Changed in: php Remote watch: None = bugs.php.net/ #40286 -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
JFI: you may want to use php-fpm instead. E.g. via the packages provided at dotdeb.org. -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Bug watch added: bugs.php.net/ #40286 http://bugs.php.net/bug.php?id=40286 ** Changed in: php Importance: Undecided = Unknown ** Changed in: php Status: New = Unknown ** Changed in: php Remote watch: None = bugs.php.net/ #40286 -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
I have the same issue but without PHP_FCGI_CHILDREN set. y...@jok:/proc/15237$ ps -ef | fgrep 15237 ufr_doc 15237 1 0 04:20 ?00:00:00 /usr/lib/cgi-bin/php5 -d magic_quotes_gpc=off yann 26564 24593 0 14:15 pts/000:00:00 fgrep 15237 y...@jok:/proc/15237$ sudo cat environ PATH=/usr/local/bin:/usr/bin:/binPWD=/nfs/www/fr/doc/binSHLVL=0PHP_FCGI_MAX_REQUESTS=1000 -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Ah, and it seems to affect python processes, too. -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
I have the same issue but without PHP_FCGI_CHILDREN set. y...@jok:/proc/15237$ ps -ef | fgrep 15237 ufr_doc 15237 1 0 04:20 ?00:00:00 /usr/lib/cgi-bin/php5 -d magic_quotes_gpc=off yann 26564 24593 0 14:15 pts/000:00:00 fgrep 15237 y...@jok:/proc/15237$ sudo cat environ PATH=/usr/local/bin:/usr/bin:/binPWD=/nfs/www/fr/doc/binSHLVL=0PHP_FCGI_MAX_REQUESTS=1000 -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Ah, and it seems to affect python processes, too. -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Changed in: debian Status: New = Confirmed -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Changed in: debian Status: New = Confirmed -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Description changed: - Binary package hint: php5-cgi + This Bug is already reported here: http://bugs.php.net/bug.php?id=40286 + and here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431799 (inactive) - This Bug is already reported here: http://bugs.php.net/bug.php?id=40286 - and here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431799 + I see it in Ubuntu Hardy now: + PHP 5.2.4-2ubuntu5 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) - I see it in Ubuntu Dapper - $ php-cgi --version - PHP 5.1.2 (cgi-fcgi) (built: Jul 17 2007 17:21:59) - - Quoting from: http://bugs.php.net/bug.php?id=40286 - - Context: + Quoting from: http://bugs.php.net/bug.php?id=40286 : When running PHP in FastCGI mode with a fastCGI apache module (such a mod_fcgid), all is running fine when PHP_FCGI_CHILDREN unset : only 1 process spawned. When using PHP_FCGI_CHILDREN=n, the PHP parent process forks n childs, and the parent acts as a manager between the child processes, wait()ing to respawn them if they are killed or exit. The problem happens when the FastCGI process manager handled by the apache module has to kill the parent PHP process (it only knows the parent's PID) for any reason such as idle timeout, max lifetime, etc. Problem: While the PHP parent process is properly killed by the FastCGI process manager, the children aren't killed, but instead stay alive, waiting for - a new request which will never come (because the socket shared with the - parent is removed at the same time parent is killed). - + a new request which will never come. + This sooner or later uses up all availible RAM and lead to a DOS. + + Workaround: See comments. -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Description changed: - Binary package hint: php5-cgi + This Bug is already reported here: http://bugs.php.net/bug.php?id=40286 + and here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431799 (inactive) - This Bug is already reported here: http://bugs.php.net/bug.php?id=40286 - and here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431799 + I see it in Ubuntu Hardy now: + PHP 5.2.4-2ubuntu5 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) - I see it in Ubuntu Dapper - $ php-cgi --version - PHP 5.1.2 (cgi-fcgi) (built: Jul 17 2007 17:21:59) - - Quoting from: http://bugs.php.net/bug.php?id=40286 - - Context: + Quoting from: http://bugs.php.net/bug.php?id=40286 : When running PHP in FastCGI mode with a fastCGI apache module (such a mod_fcgid), all is running fine when PHP_FCGI_CHILDREN unset : only 1 process spawned. When using PHP_FCGI_CHILDREN=n, the PHP parent process forks n childs, and the parent acts as a manager between the child processes, wait()ing to respawn them if they are killed or exit. The problem happens when the FastCGI process manager handled by the apache module has to kill the parent PHP process (it only knows the parent's PID) for any reason such as idle timeout, max lifetime, etc. Problem: While the PHP parent process is properly killed by the FastCGI process manager, the children aren't killed, but instead stay alive, waiting for - a new request which will never come (because the socket shared with the - parent is removed at the same time parent is killed). - + a new request which will never come. + This sooner or later uses up all availible RAM and lead to a DOS. + + Workaround: See comments. -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Last version of the kill-all-orphaned-phps workaround attached. I recommend to run it hourly to catch php parents that die suddenly AND (more important) to add it in your /etc/logrotate.d/apache2 in postrotate after apache restart, because this creates lots of orphaned processes most of the time. ** Attachment added: phpkiller.sh http://launchpadlibrarian.net/14265535/phpkiller.sh ** Changed in: php5 (Ubuntu) Status: Incomplete = Confirmed -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Still exists in Hardy. Attached is a pstree (phpkiller.sh output - see next post) showing lots of orphaned php processes (some usernames #'d). ** Attachment added: phpkiller.log http://launchpadlibrarian.net/14265483/phpkiller.log -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Last version of the kill-all-orphaned-phps workaround attached. I recommend to run it hourly to catch php parents that die suddenly AND (more important) to add it in your /etc/logrotate.d/apache2 in postrotate after apache restart, because this creates lots of orphaned processes most of the time. ** Attachment added: phpkiller.sh http://launchpadlibrarian.net/14265535/phpkiller.sh ** Changed in: php5 (Ubuntu) Status: Incomplete = Confirmed -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
If possible could you test this with hardy? Thanks chuck ** Changed in: php5 (Ubuntu) Status: New = Incomplete -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to php5 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
If possible could you test this with hardy? Thanks chuck ** Changed in: php5 (Ubuntu) Status: New = Incomplete -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
** Changed in: debian Status: Unknown = New -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
See http://bugs.php.net/bug.php?id=40286 ** Also affects: php Importance: Undecided Status: New -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
(That was to be added to the Comment on most recent change for Affects/php, but it didn't quite work as expected) -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
Workaround: Kill those lurking process regularily using a cronjob. This works for me, it should be reasonably safe to use (who has php started by init?). #!/bin/bash pkill -f -x /usr/lib/cgi-bin/php -P 1 -- PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed https://bugs.launchpad.net/bugs/162082 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs