Bug #76339 [NEW]: segfault during shutdown
| From: | ray dot ward at bigcommerce dot com | Date: | Mon, 14 May 2018 05:12:32 +0000 |
| Subject: | Bug #76339 [NEW]: segfault during shutdown | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-215242@lists.php.net to get a copy of this message | ||
From: ray dot ward at bigcommerce dot com
Operating system: Debian 8.10
PHP version: 7.2.5
Package: opcache
Bug Type: Bug
Bug description:segfault during shutdown
Description:
------------
We're experiencing occasional segfaults during php shutdown
php-fpm7.2[12494]: segfault at 0 ip 0000000000605e5b sp 00007fff78ece470
error 6 in php-fpm7.2[400000+35e000]
Unfortunately I don't have much to go on apart from a GDB trace:
Program received signal SIGSEGV, Segmentation fault.
gc_mark_grey (ref=0x0) at ./Zend/zend_gc.c:562
#0 gc_mark_grey (ref=0x0) at ./Zend/zend_gc.c:562
#1 0x0000000000606ce8 in gc_mark_roots () at ./Zend/zend_gc.c:583
#2 zend_gc_collect_cycles () at ./Zend/zend_gc.c:1057
#3 0x0000000000606921 in gc_possible_root (ref=0x0) at
./Zend/zend_gc.c:286
#4 0x00000000005cab18 in gc_check_possible_root (ref=<optimized out>)
at ./Zend/zend_gc.h:158
#5 i_zval_ptr_dtor (zval_ptr=0x7f318cfb6320, zval_ptr=0x7f318cfb6320)
at ./Zend/zend_variables.h:51
#6 _zval_ptr_dtor (zval_ptr=zval_ptr@entry=0x7f318cfb6320) at
./Zend/zend_execute_API.c:532
#7 0x00000000004e633c in spl_object_storage_dtor (element=<optimized
out>) at ./ext/spl/spl_observer.c:153
#8 0x00000000005ee825 in zend_hash_destroy (ht=ht@entry=0x7f3211c7c640)
at ./Zend/zend_hash.c:1234
#9 0x00000000004e630a in spl_SplObjectStorage_free_storage
(object=0x7f3211c7c6a8) at ./ext/spl/spl_observer.c:112
#10 0x000000000061ba8b in zend_objects_store_free_object_storage
(objects=0x0, objects@entry=0xa0e0b8 <executor_globals+824>,
fast_shutdown=152 '\230', fast_shutdown@entry=1 '\001')
at ./Zend/zend_objects_API.c:105
#11 0x00000000005cb034 in shutdown_executor () at
./Zend/zend_execute_API.c:265
#12 0x00000000005dccbb in zend_deactivate () at ./Zend/zend.c:1036
#13 0x0000000000576e0a in php_request_shutdown (dummy=<optimized out>)
at ./main/main.c:1904
#14 0x000000000042dd78 in main (argc=17133702, argv=0x1057043) at
./sapi/fpm/fpm/fpm_main.c:1994
_May_ be opcache related, disabling opcache eliminated the segfault.
We rely on complex shutdown functions. Perhaps an object being
referenced in a function has been GC'd already?
--
Edit bug report at https://bugs.php.net/bug.php?id=76339&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76339&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76339&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76339&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76339&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76339&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76339&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76339&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76339&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76339&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76339&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76339&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76339&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76339&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76339&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76339&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76339&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76339&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76339&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76339&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76339&r=mysqlcfg