Bug #75744 [Opn]: Sporadic crashes when opcache enabled
| From: | nikic@php.net | Date: | Thu, 28 Dec 2017 20:15:44 +0000 |
| Subject: | Bug #75744 [Opn]: Sporadic crashes when opcache enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213316@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75744&edit=1
ID: 75744
Updated by: nikic@php.net
Reported by: kochuev at gmail dot com
Summary: Sporadic crashes when opcache enabled
Status: Open
Type: Bug
Package: opcache
Operating System: Oracle Linux
PHP Version: 7.0.26
Block user comment: N
Private report: N
New Comment:
These shutdown crashes are likely triggered by some form of memory corruption at an earlier point in
time, so it will be hard to track down the root cause of this issue.
Two things to try would be:
* Set opcache.optimization_level=0, to exclude one relatively common source of issues.
* Set opcache.protect_memory=1 to immediately abort if the SHM memory is corrupted.
Previous Comments:
------------------------------------------------------------------------
[2017-12-28 20:07:04] kochuev at gmail dot com
Yes, correct version for the traces given is 7.0.25 which is still on our prod servers, crashes
started at 7.0.12 and still in place up to 7.0.26 (but I don't have core dumps for it).
------------------------------------------------------------------------
[2017-12-28 19:57:29] spam2 at rhsoft dot net
PHP Version: 7.0.26
zend_hash_destroy (ht=0x7f9987280ab8) at /usr/src/debug/php-7.0.25/
i guess 7.0.26 is a lie then and so the question is if it still happens with the latest version
------------------------------------------------------------------------
[2017-12-28 19:47:32] kochuev at gmail dot com
Description:
------------
There are sporadic crashed with the traces:
Program terminated with signal 11, Segmentation fault.
#0 0xfffffff80000001a in ?? ()
#0 0xfffffff80000001a in ?? ()
#1 0x00005563484baa4d in zend_hash_destroy (ht=0x7f9987280ab8) at
/usr/src/debug/php-7.0.25/Zend/zend_hash.c:1264
#2 0x00005563484bad19 in zend_array_destroy (ht=0x7f9987280ab8) at
/usr/src/debug/php-7.0.25/Zend/zend_hash.c:1324
#3 0x00005563484bac98 in i_zval_ptr_dtor (zval_ptr=0x7f998726bf60) at
/usr/src/debug/php-7.0.25/Zend/zend_variables.h:58
#4 zend_array_destroy (ht=0x7f9987280150) at /usr/src/debug/php-7.0.25/Zend/zend_hash.c:1338
#5 0x00005563484dfed4 in i_zval_ptr_dtor (zval_ptr=0x7f9987281118) at
/usr/src/debug/php-7.0.25/Zend/zend_variables.h:58
#6 zend_object_std_dtor (object=0x7f99872810c0) at /usr/src/debug/php-7.0.25/Zend/zend_objects.c:69
#7 0x00005563484e4c11 in zend_objects_store_del (object=0x7f99872810c0) at
/usr/src/debug/php-7.0.25/Zend/zend_objects_API.c:178
#8 0x000055634849d140 in i_zval_ptr_dtor (zval_ptr=0x7f99872696a0) at
/usr/src/debug/php-7.0.25/Zend/zend_variables.h:58
#9 zend_cleanup_user_class_data (ce=0x7f998720a800) at
/usr/src/debug/php-7.0.25/Zend/zend_opcode.c:167
#10 0x0000556348499415 in shutdown_executor () at
/usr/src/debug/php-7.0.25/Zend/zend_execute_API.c:336
#11 0x00005563484a9598 in zend_deactivate () at /usr/src/debug/php-7.0.25/Zend/zend.c:985
#12 0x0000556348448411 in php_request_shutdown (dummy=dummy@entry=0x0) at
/usr/src/debug/php-7.0.25/main/main.c:1856
#13 0x00005563482e8cde in main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/php-7.0.25/sapi/fpm/fpm/fpm_main.c:1995
Another example:
Program terminated with signal 11, Segmentation fault.
#0 zend_string_release (s=0x4) at /usr/src/debug/php-7.0.25/Zend/zend_string.h:269
269 if (!ZSTR_IS_INTERNED(s)) {
#0 zend_string_release (s=0x4) at /usr/src/debug/php-7.0.25/Zend/zend_string.h:269
#1 free_zend_constant (zv=<optimized out>) at
/usr/src/debug/php-7.0.25/Zend/zend_constants.c:41
#2 0x00005563484bbf85 in _zend_hash_del_el_ex (prev=<optimized out>, p=<optimized out>,
idx=<optimized out>, ht=<optimized out>) at
/usr/src/debug/php-7.0.25/Zend/zend_hash.c:1025
#3 _zend_hash_del_el (p=0x7f998be85b90, idx=3164, ht=0x55634a3265a0) at
/usr/src/debug/php-7.0.25/Zend/zend_hash.c:1049
#4 zend_hash_reverse_apply (ht=0x55634a3265a0, apply_func=apply_func@entry=0x556348497440
<clean_non_persistent_constant>) at /usr/src/debug/php-7.0.25/Zend/zend_hash.c:1631
#5 0x00005563484977c3 in clean_non_persistent_constants () at
/usr/src/debug/php-7.0.25/Zend/zend_constants.c:161
#6 0x00005563484997a5 in shutdown_executor () at
/usr/src/debug/php-7.0.25/Zend/zend_execute_API.c:347
#7 0x00005563484a9598 in zend_deactivate () at /usr/src/debug/php-7.0.25/Zend/zend.c:985
#8 0x0000556348448411 in php_request_shutdown (dummy=dummy@entry=0x0) at
/usr/src/debug/php-7.0.25/main/main.c:1856
#9 0x00005563482e8cde in main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/php-7.0.25/sapi/fpm/fpm/fpm_main.c:1995
/var/www/corefiles_storage/core.php-fpm.6071.web138.eta.prod.ed2.etadirect.com.80.1514298742
Crashes are NOT gone if fast_shutdown is set to 0
Increasing interned_strings_buffer to a large values or settign it to zero does not help.
Disabling opcache makes crashes go
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75744&edit=1