Bug #70185 [Com]: php-fpm restarts master process in a loop when exec() and using ssh multiplexing

From: Date: Mon, 13 Mar 2017 14:31:13 +0000
Subject: Bug #70185 [Com]: php-fpm restarts master process in a loop when exec() and using ssh multiplexing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207815@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70185&edit=1

 ID:                 70185
 Comment by:         php at grindau dot com
 Reported by:        kobenews at cox dot net
 Summary:            php-fpm restarts master process in a loop when
                     exec() and using ssh multiplexing
 Status:             Open
 Type:               Bug
 Package:            FPM related
 Operating System:   CentOS release 6.6 (Final)
 PHP Version:        5.4.43
 Block user comment: N
 Private report:     N

 New Comment:

Well, there is no shell-scripts, this code runs inside of my classes.

I was able to narrow it down to all shell functions like
passthru(), exec(), shell_exec(), system(), etc, it happens with every of them.

i tried to run this cli-module on my arch linux:
https://github.com/css/csso
by executing this
/usr/lib/node_modules/csso/bin/csso infile.css --output outfile.css
the same happened with UglifyCSS: https://github.com/fmarcia/UglifyCSS
but not with UglifyJS: https://github.com/mishoo/UglifyJS

I am also running java jars inside those functions for years without any issue.
Like Yuicompressor: http://yui.github.io/yuicompressor/

Hope that helps.
Regards
Sascha


Previous Comments:
------------------------------------------------------------------------
[2017-03-10 23:14:05] kobenews at cox dot net

php@grindau dot com: I'd love to get a test case script, without requiring lots of setup and
dependencies. Anybody have ideas?

This does seem to indicate a bug though.

------------------------------------------------------------------------
[2017-03-10 20:03:47] php at grindau dot com

I am having the same issue! It took me ages to find out whats the reason.
I am running the latest php-7.1.2 under archx64.

Executing this command: 				

shell_exec('/usr/lib/node_modules/csso/bin/csso
'.ROOT_PATH.'/tmp/style-critical-unoptimized.css --output
'.ROOT_PATH.'/tmp/style-critical.css');

which should just easily grap a normal css file and compress it down causes the master process to
restart itself hundred times a second or even more causing 100% cpu load on the server.

------------------------------------------------------------------------
[2017-02-24 13:52:08] sylvain at com-ocean dot com

Same bug by executing a bash script calling rsync command.
with PHP 5.6.30 and Debian 7.10

------------------------------------------------------------------------
[2016-01-22 08:06:02] i dot priladnyh at gmail dot com

Ubuntu 14.04
php5-fpm 5.5.9
Same problem with launch ssh session using ControlMaster. FPM load CPU to 100%.
Problem with FPM solved by launch SSH session with flag -f (background). But then SSH connection
multiplexing don`t correctly works.

------------------------------------------------------------------------
[2015-09-09 02:18:52] kobenews at cox dot net

php at plainview dot se: glad I'm not the only one experiencing this bug. Now the trick, is to
get a fix.

I am running:

PHP 5.4.43 on CentOS 6.7

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=70185


--
Edit this bug report at https://bugs.php.net/bug.php?id=70185&edit=1


Thread (28 messages)

« previous php.bugs (#207815) next »