user4737714
user4737714

Reputation:

php-fpm reload "unable to read what child say"

Php-fpm sometimes throw the error:

ERROR: unable to read what child say: Bad file descriptor (9)

When: service php-fpm reload

Also every ~ hour I see this error in php-fpm error log:

[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "*** stack smashing detected ***: php-fpm: p
ool www terminated"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "======= Backtrace: ========="
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "/lib64/libc.so.6(__fortify_fail+0x37)[0x386
6302527]"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "/lib64/libc.so.6(__fortify_fail+0x0)[0x3866
3024f0]"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "php-fpm: pool www[0x6d8a2e]"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "php-fpm: pool www[0x6da2c5]"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "/lib64/libc.so.6(__libc_start_main+0xfd)[0x
386621ed5d]"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "php-fpm: pool www[0x422899]"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "======= Memory map: ========"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "00400000-007a5000 r-xp 00000000 fd:01 31856
323                           /usr/sbin/php-fpm"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "009a5000-009fd000 rw-p 003a5000 fd:01 31856
323                           /usr/sbin/php-fpm"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "009fd000-00a19000 rw-p 00000000 00:00 0 "
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "00dfc000-00e07000 rw-p 003fc000 fd:01 31856323                           /usr/sbin/php-fpm"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "017f4000-01aee000 rw-p 00000000 00:00 0 "
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "01aee000-02a14000 rw-p 00000000 00:00 0 "
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "374a400000-374a462000 r-xp 00000000 fd:01 31856136                       /usr/lib64/libssl.so.1.0.1e"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "374a462000-374a661000 ---p 00062000 fd:01 31856136                       /usr/lib64/libssl.so.1.0.1e"
[30-Jun-2016 08:33:56] WARNING: [pool www] child 8218 said into stderr: "374a661000-374a665000 r--p 00061000 fd:01 31856136                       /usr/lib64/libssl.so.1.0.1e"

Stack smashing detected, but no idea what cause of this "smashing". Before reload php-fpm I saw ~20 times 504 erros in nginx, mean that request from nginx not pass to php-fpm. Client waiting for timeout and get 504 error (Gateway Timeout). After reloading this error gone away but I think that it come back again.

What mean the error ERROR: unable to read what child say: Bad file descriptor (9)? Maybe need to check filesystem?

Seems this error is not related to pm.min/max_spare_servers parameter.

Upvotes: 1

Views: 6304

Answers (1)

peitworker
peitworker

Reputation: 11

This should be a version problem, can try to upgrade。PHP 7.0.13 also appeared the problem, to upgrade to PHP 7.0.14 version problem solving 。(fpm-race-condition.patch)

Upvotes: 1

Related Questions