Bug #77577 [NEW]: SIGSEGV with FPM on php_module_shutdown
| From: | odoucet@php.net | Date: | Wed, 06 Feb 2019 15:57:04 +0000 |
| Subject: | Bug #77577 [NEW]: SIGSEGV with FPM on php_module_shutdown | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-219392@lists.php.net to get a copy of this message | ||
From: odoucet@php.net
Operating system: Linux
PHP version: 7.2.14
Package: Reproducible crash
Bug Type: Bug
Bug description:SIGSEGV with FPM on php_module_shutdown
Description:
------------
After upgrading a large website to PHP 7.2, we encountered several
segfaults in logs. This does not reflect in front because it seems these
errors happens on process shutdown/cleanup.
It is only happening with FPM (no problem on CGI).
The backtrace is available below.
It happens only on PHP 7.2 (no problem with tons of websites on 7.1).
Loaded modules when this happens :
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
hash
iconv
igbinary
imagick
intl
json
libxml
mbstring
mcrypt
memcache
memcached
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
It seems to happen when an additional module is loaded inside FPM :
php_admin_value[extension] = imagick.so
(but I was unable to test without).
Test script:
---------------
Expected result:
----------------
Working :)
Actual result:
--------------
Program terminated with signal 11, Segmentation fault.
#0 zend_string_release (s=0x0) at
/usr/src/debug/php-7.2.14/Zend/zend_string.h:289
289 if (!ZSTR_IS_INTERNED(s)) {
Missing separate debuginfos, use: debuginfo-install
systemd-libs-219-62.el7_6.2.x86_64
(gdb) bt
#0 zend_string_release (s=0x0) at
/usr/src/debug/php-7.2.14/Zend/zend_string.h:289
#1 destroy_zend_class (zv=<optimized out>) at
/usr/src/debug/php-7.2.14/Zend/zend_opcode.c:334
#2 0x000055dd5c01c540 in ?? ()
#3 0x000055dd5c37a6b0 in ?? ()
#4 0x000055dd5c01c540 in ?? ()
#5 0x000055dd5c37a7f0 in ?? ()
#6 0x000055dd5c2be291 in ?? ()
#7 0x000055dd5a3e9fd6 in zend_hash_destroy (ht=0x0) at
/usr/src/debug/php-7.2.14/Zend/zend_hash.c:1247
#8 0x000055dd5a81a880 in ?? ()
#9 0x000055dd5a81a240 in ?? ()
#10 0x000055dd5c2be187 in ?? ()
#11 0x000055dd5a3d8151 in zend_shutdown () at
/usr/src/debug/php-7.2.14/Zend/zend.c:911
#12 0x000055dd5c2be32f in ?? ()
#13 0x000055dd5a819d20 in ?? ()
#14 0x000055dd5c2be32f in ?? ()
#15 0x000055dd5a372f1b in php_module_shutdown () at
/usr/src/debug/php-7.2.14/main/main.c:2453
#16 0x000055dd5a819d20 in ?? ()
#17 0x000055dd5a1e7ae1 in main (argc=<optimized out>, argv=<optimized
out>) at /usr/src/debug/php-7.2.14/sapi/fpm/fpm/fpm_main.c:2043
I was unable to find missing symbols, even after installing ALL symbols
from package php* (we are using CentOS7 + repository remi-php72).
I kept backtrace available (privately) if it can help.
--
Edit bug report at https://bugs.php.net/bug.php?id=77577&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77577&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77577&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77577&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77577&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77577&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77577&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77577&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77577&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77577&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77577&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77577&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77577&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77577&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77577&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77577&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77577&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77577&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77577&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77577&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77577&r=mysqlcfg