Bug #78204 [NEW]: Segmentation fault in php-fpm with opcache enabled
| From: | ixghzx at gmail dot com | Date: | Tue, 25 Jun 2019 09:10:07 +0000 |
| Subject: | Bug #78204 [NEW]: Segmentation fault in php-fpm with opcache enabled | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221476@lists.php.net to get a copy of this message | ||
From: ixghzx at gmail dot com
Operating system: CentOS 7
PHP version: 7.3.6
Package: *General Issues
Bug Type: Bug
Bug description:Segmentation fault in php-fpm with opcache enabled
Description:
------------
With Magento projects, php-fpm processes start crashing in several
minutes(usually 10-15 minutes) after starting the master php-fpm
process. They keep crashing until the master process is restarted.
Crashes never happen with opcache disabled or in PHP 7.2(configured and
compiled with the same options). This behavior doesn't depend on
compiler options(crashes occurred with binaries made with gcc and
clang). This issue prevents us from upgrading to PHP 7.3.
php-fpm pool is configured as 'pm = ondemand'
This backtrace report was obtained from the core dump of the binary
compiled with options "-g -01"
Program terminated with signal 11, Segmentation fault.
#0 zend_mm_alloc_small (heap=<optimized out>, size=<optimized out>,
bin_num=7) at Zend/zend_alloc.c:1289
(gdb) bt
#0 zend_mm_alloc_small (heap=<optimized out>, size=<optimized out>,
bin_num=7) at Zend/zend_alloc.c:1289
#1 zend_mm_alloc_heap (heap=0x7f651ac00040, size=<optimized out>) at
Zend/zend_alloc.c:1360
#2 _emalloc (size=<optimized out>) at Zend/zend_alloc.c:2500
#3 0x000000000081e722 in zend_string_alloc (len=<optimized out>,
persistent=<optimized out>) at Zend/zend_string.h:133
#4 zend_string_tolower_ex (str=0x7f65075d71d8, persistent=0) at
Zend/zend_operators.c:2677
#5 0x0000000000805e36 in zend_add_class_name_literal
(op_array=0x7f650607a2a0, name=0x106d718) at Zend/zend_compile.c:563
#6 0x00000000008097c3 in zend_compile_class_decl (ast=0x7f6505cddf68)
at Zend/zend_compile.c:6416
#7 0x000000000080ae64 in zend_compile_stmt (ast=0x7f6505cddf68) at
Zend/zend_compile.c:8289
#8 0x000000000080f011 in zend_compile_top_stmt (ast=0x7f6505cddf68) at
Zend/zend_compile.c:8195
#9 0x000000000080effa in zend_compile_top_stmt (ast=0x7f6505cdd018) at
Zend/zend_compile.c:8190
#10 0x00000000007f0cd4 in zend_compile (type=2) at
Zend/zend_language_scanner.l:602
#11 0x00000000007f0baf in compile_file (file_handle=0x7ffd85ed0728,
type=2) at Zend/zend_language_scanner.l:636
#12 0x00000000006b17b8 in phar_compile_file (file_handle=0x7ffd85ed0728,
type=2) at ext/phar/phar.c:3347
#13 0x00007f6514464790 in opcache_compile_file
(file_handle=0x7ffd85ed0728, type=<optimized out>, key=<optimized out>,
op_array_p=0x7ffd85ed0648) at ext/opcache/ZendAccelerator.c:1760
#14 0x00007f6514464fa2 in persistent_compile_file
(file_handle=0x7ffd85ed0728, type=2) at
ext/opcache/ZendAccelerator.c:2105
#15 0x00000000007f0dde in compile_filename (type=2,
filename=0x7f651ac1f720) at Zend/zend_language_scanner.l:661
#16 0x00000000008a4724 in zend_include_or_eval
(inc_filename=0x7f651ac1f720, type=2) at Zend/zend_execute.c:3192
#17 0x0000000000873922 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER
(execute_data=0x7f651ac1f6c0) at Zend/zend_vm_execute.h:37667
#18 0x000000000085d658 in execute_ex (ex=0x7f651ac1f6c0) at
Zend/zend_vm_execute.h:55334
#19 0x0000000000814e0c in zend_call_function (fci=<optimized out>,
fci_cache=0x7ffd85ed0a10) at Zend/zend_execute_API.c:756
#20 0x0000000000716598 in zif_spl_autoload_call (execute_data=<optimized
out>, return_value=<optimized out>) at ext/spl/php_spl.c:448
#21 0x0000000000814e79 in zend_call_function (fci=<optimized out>,
fci_cache=0x7ffd85ed0c38) at Zend/zend_execute_API.c:770
#22 0x0000000000815602 in zend_lookup_class_ex (name=<optimized out>,
key=0x0, use_autoload=<optimized out>) at Zend/zend_execute_API.c:926
#23 0x000000000083626c in zif_class_exists (execute_data=<optimized
out>, return_value=0x7f651ac1f5e0) at
Zend/zend_builtin_functions.c:1446
#24 0x00000000008860ea in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER
(execute_data=0x7f651ac1f550) at Zend/zend_vm_execute.h:690
#25 0x000000000085d658 in execute_ex (ex=0x7f651ac1f550) at
Zend/zend_vm_execute.h:55334
#26 0x000000000085d7ec in zend_execute (op_array=0x7f651ac611c0,
return_value=0x0) at Zend/zend_vm_execute.h:60881
#27 0x0000000000821bd7 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at Zend/zend.c:1568
#28 0x00000000007d0a03 in php_execute_script (primary_file=<optimized
out>) at main/main.c:2630
#29 0x00000000008b5a5d in main (argc=<optimized out>, argv=<optimized
out>) at sapi/fpm/fpm/fpm_main.c:1950
--
Edit bug report at https://bugs.php.net/bug.php?id=78204&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78204&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78204&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78204&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78204&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78204&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78204&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78204&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78204&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78204&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78204&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78204&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78204&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78204&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78204&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78204&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78204&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78204&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78204&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78204&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78204&r=mysqlcfg