Bug #70192 [Opn->Fbk]: Opcache Segmentation error!

From: Date: Wed, 06 Jan 2021 15:20:29 +0000
Subject: Bug #70192 [Opn->Fbk]: Opcache Segmentation error!
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231410@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70192&edit=1

 ID:                 70192
 Updated by:         cmb@php.net
 Reported by:        shu dot ko at tis dot co dot jp
 Summary:            Opcache Segmentation error!
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            opcache
 Operating System:   CentOs6.6
 PHP Version:        5.6Git-2015-08-05 (Git)
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Is that still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>


Previous Comments:
------------------------------------------------------------------------
[2017-08-18 03:13:24] tommynewman181 at gmail dot com

Description:
------------
We have similar issue occurred. When is occurred, the coming request also response segfault.

environment:
------------
PHP 5.6.12-1+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:16:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

opcache
--------
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 0 => 0
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 4 => 4
opcache.load_comments => 1 => 1
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 2000 => 2000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 64 => 64
opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 2 => 2
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_timestamps => On => On

xhprof
-------
xhprof => 0.9.2

yar
-------
yar support => enabled
yar.allow_persistent => 0 => 0
yar.connect_timeout => 1000 => 1000
yar.content_type => application/octet-stream => application/octet-stream
yar.debug => Off => Off
yar.expose_info => On => On
yar.packager => php => php
yar.timeout => 5000 => 5000
yar.transport => curl => curl

------------------------------------------

(gdb) bt
#0  0x00007fa26ca5718e in __strcat_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:1676
#1  0x00000000006b561f in _estrndup ()
#2  0x00007fa26c57fc03 in ?? () from /usr/lib/php5/20131226/opcache.so
#3  0x00007fa26c57fbd0 in ?? () from /usr/lib/php5/20131226/opcache.so
#4  0x00007fa26c580296 in ?? () from /usr/lib/php5/20131226/opcache.so
#5  0x00007fa26c57f770 in ?? () from /usr/lib/php5/20131226/opcache.so
#6  0x00007fa26c57f8f0 in ?? () from /usr/lib/php5/20131226/opcache.so
#7  0x00007fa26c581560 in zend_accel_load_script () from /usr/lib/php5/20131226/opcache.so
#8  0x00007fa26c5785ee in persistent_compile_file () from /usr/lib/php5/20131226/opcache.so
#9  0x00007fa261678265 in hp_compile_file (file_handle=0x7ffd2bb88340, type=8) at
/tmp/pear/temp/xhprof/extension/xhprof.c:1761
#10 0x00000000006a4577 in compile_filename ()
#11 0x000000000077eef0 in ?? ()
#12 0x00000000007158a8 in execute_ex ()
#13 0x00000000006ca849 in dtrace_execute_ex ()
#14 0x00007fa261677e90 in hp_execute_ex (execute_data=0x7fa26f50af28) at
/tmp/pear/temp/xhprof/extension/xhprof.c:1664
#15 0x00000000006cc573 in zend_call_function ()
#16 0x00000000006f2405 in zend_call_method ()
#17 0x00000000005c7156 in zif_spl_autoload_call ()
#18 0x00000000006ca94b in dtrace_execute_internal ()
#19 0x00007fa261678064 in hp_execute_internal (execute_data=0x7ffd2bb88a00, fci=0x7ffd2bb88b90,
ret=1) at /tmp/pear/temp/xhprof/extension/xhprof.c:1728
#20 0x00000000006cc655 in zend_call_function ()
#21 0x00000000006cce32 in zend_lookup_class_ex ()
#22 0x00000000006cd522 in zend_fetch_class_by_name ()
#23 0x0000000000723d34 in ?? ()
#24 0x00000000007158a8 in execute_ex ()
#25 0x00000000006ca849 in dtrace_execute_ex ()
#26 0x00007fa261677e90 in hp_execute_ex (execute_data=0x7fa26f50ad00) at
/tmp/pear/temp/xhprof/extension/xhprof.c:1664
#27 0x0000000000780277 in ?? ()
#28 0x00000000007158a8 in execute_ex ()
#29 0x00000000006ca849 in dtrace_execute_ex ()
#30 0x00007fa261677e90 in hp_execute_ex (execute_data=0x7fa26f50ab60) at
/tmp/pear/temp/xhprof/extension/xhprof.c:1664
#31 0x0000000000780277 in ?? ()
#32 0x00000000007158a8 in execute_ex ()
#33 0x00000000006ca849 in dtrace_execute_ex ()
#34 0x00000000006dcbf0 in zend_execute_scripts ()
#35 0x000000000067ae52 in php_execute_script ()
#36 0x0000000000464861 in main ()

------------------------------------------

(gdb) bt
#0  0x00007fa26ca5718e in __strcat_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:1676
#1  0x00000000006b561f in _estrndup ()
#2  0x00007fa26c57fc03 in ?? () from /usr/lib/php5/20131226/opcache.so
#3  0x00007fa26c57fbd0 in ?? () from /usr/lib/php5/20131226/opcache.so
#4  0x00007fa26c580296 in ?? () from /usr/lib/php5/20131226/opcache.so
#5  0x00007fa26c57f770 in ?? () from /usr/lib/php5/20131226/opcache.so
#6  0x00007fa26c57f8f0 in ?? () from /usr/lib/php5/20131226/opcache.so
#7  0x00007fa26c581560 in zend_accel_load_script () from /usr/lib/php5/20131226/opcache.so
#8  0x00007fa26c5785ee in persistent_compile_file () from /usr/lib/php5/20131226/opcache.so
#9  0x00000000006a4577 in compile_filename ()
#10 0x000000000077eef0 in ?? ()
#11 0x00000000007158a8 in execute_ex ()
#12 0x00000000006ca849 in dtrace_execute_ex ()
#13 0x00000000006cc573 in zend_call_function ()
#14 0x00000000006f2405 in zend_call_method ()
#15 0x00000000005c7156 in zif_spl_autoload_call ()
#16 0x00000000006ca94b in dtrace_execute_internal ()
#17 0x00000000006cc655 in zend_call_function ()
#18 0x00000000006cce32 in zend_lookup_class_ex ()
#19 0x00000000006cd522 in zend_fetch_class_by_name ()
#20 0x0000000000723d34 in ?? ()
#21 0x00000000007158a8 in execute_ex ()
#22 0x00000000006ca849 in dtrace_execute_ex ()
#23 0x00000000006cc573 in zend_call_function ()
#24 0x00000000006cc75e in call_user_function_ex ()
#25 0x00007fa261468cae in php_yar_server_handle (obj=0x31717f8) at /tmp/yar-1.2.4/yar_server.c:404
#26 0x00007fa261468e48 in zim_yar_server_handle (ht=<optimized out>, return_value=0x323d1f0,
return_value_ptr=<optimized out>, this_ptr=<optimized out>,
return_value_used=<optimized out>) at /tmp/yar-1.2.4/yar_server.c:682
#27 0x0000000000e81dfc in ?? ()
#28 0x0000000000e9c640 in ?? ()
#29 0x0000000002f3bc10 in ?? ()
#30 0x00000000006ca94b in dtrace_execute_internal ()
#31 0x000000000077fd54 in ?? ()
#32 0x00000000007158a8 in execute_ex ()
#33 0x00000000006ca849 in dtrace_execute_ex ()
#34 0x00000000006dcbf0 in zend_execute_scripts ()
#35 0x000000000067ae52 in php_execute_script ()
#36 0x0000000000464861 in main ()

------------------------------------------

------------------------------------------------------------------------
[2016-08-14 04:22:30] php-bugs at lists dot php dot net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.

------------------------------------------------------------------------
[2016-08-09 06:37:58] anime-php-report_my at dena dot jp

Yes, We happened.
zend_extension loaded but not enabled to xdebug(dtrace are enabled).

we declared php.ini below:
zend_extension=opcache.so
zend_extension=xdebug.so
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.fast_shutdown=1

We found a work-around solution.
declare to php-fpm.conf below:
php_value[opcache.optimization_level] = 0xFFFFFFF0

------------------------------------------------------------------------
[2016-08-06 01:34:19] kalle@php.net

Does this issue also happen without dtrace and xdebug enabled?

------------------------------------------------------------------------
[2015-11-18 08:26:37] anime-php-report_my at dena dot jp

We have similar issue occurred. but happen with php-5.6.11 and php-fpm.
After the first segfault, each additional request also results in a segfault.
The only solution is to restart PHP-FPM.

php configuration:
----
$ php -v
PHP 5.6.11 (cli) (built: Jul 22 2015 13:24:20) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

$ php -i | grep opc | egrep "optim|fast"
opcache.fast_shutdown => 1 => 1
opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF

back trace:
----
(gdb) bt
#0  0x00007fabd35db95e in memcpy () from /lib64/libc.so.6
#1  0x00000000005b8220 in _estrndup ()
#2  0x00007fabd2456e6b in zend_hash_clone_zval (ht=0x7fabac941a90, source=<value optimized
out>, bind=0)
    at /home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/zend_accelerator_util_funcs.c:425
#3  0x00007fabd2456e17 in zend_hash_clone_zval (ht=0x7fabac941960, source=<value optimized
out>, bind=0)
    at /home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/zend_accelerator_util_funcs.c:433
#4  0x00007fabd2456e17 in zend_hash_clone_zval (ht=0x7fabac93fc80, source=<value optimized
out>, bind=0)
    at /home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/zend_accelerator_util_funcs.c:433
#5  0x00007fabd2457786 in zend_class_copy_ctor (pce=<value optimized out>) at
/home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/zend_accelerator_util_funcs.c:752
#6  0x00007fabd2456650 in zend_hash_unique_copy (target=0x1d9fc90, source=<value optimized
out>, pCopyConstructor=0x7fabd2457320 <zend_class_copy_ctor>, size=8, ignore_dups=0, 
    fail_data=0x7fff29141dc8, conflict_data=0x7fff29141dc0) at
/home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/zend_accelerator_util_funcs.c:922
#7  0x00007fabd24567cc in zend_accel_class_hash_copy (target=<value optimized out>,
source=<value optimized out>, pCopyConstructor=<value optimized out>)
    at /home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/zend_accelerator_util_funcs.c:962
#8  0x00007fabd2457121 in zend_accel_load_script (persistent_script=0x7fabae789690,
from_shared_memory=1)
    at /home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/zend_accelerator_util_funcs.c:1009
#9  0x00007fabd24500cf in persistent_compile_file (file_handle=<value optimized out>,
type=<value optimized out>)
    at /home/infra/rpmbuild-php56/BUILD/php-5.6.11/ext/opcache/ZendAccelerator.c:1701
#10 0x00007fabd221acfd in xdebug_compile_file (file_handle=<value optimized out>,
type=<value optimized out>)
    at /home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1826
#11 0x00000000005aeb7e in compile_filename ()
#12 0x000000000064c17b in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER ()
#13 0x000000000064d5a8 in execute_ex ()
#14 0x00000000005cf1ae in dtrace_execute_ex ()
#15 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca62e8) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#16 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#17 0x000000000064d5a8 in execute_ex ()
#18 0x00000000005cf1ae in dtrace_execute_ex ()
#19 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca61f0) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#20 0x00000000005d1c13 in zend_call_function ()
#21 0x00000000005f7aa7 in zend_call_method ()
#22 0x00000000004eb6d6 in zif_spl_autoload_call ()
#23 0x00000000005cf079 in dtrace_execute_internal ()
#24 0x00007fabd221b0b6 in xdebug_execute_internal (current_execute_data=0x7fff291429f0,
fci=0x7fff29142b50, return_value_used=1)
    at /home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1767
#25 0x00000000005d1e14 in zend_call_function ()
#26 0x00000000005d2125 in zend_lookup_class_ex ()
#27 0x00000000005d257f in zend_fetch_class_by_name ()
#28 0x000000000062abdb in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER ()
#29 0x000000000064d5a8 in execute_ex ()
#30 0x00000000005cf1ae in dtrace_execute_ex ()
#31 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca60c8) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#32 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#33 0x000000000064d5a8 in execute_ex ()
#34 0x00000000005cf1ae in dtrace_execute_ex ()
#35 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5f08) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#36 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#37 0x000000000064d5a8 in execute_ex ()
#38 0x00000000005cf1ae in dtrace_execute_ex ()
#39 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5b00) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#40 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#41 0x000000000064d5a8 in execute_ex ()
#42 0x00000000005cf1ae in dtrace_execute_ex ()
#43 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5950) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#44 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#45 0x000000000064d5a8 in execute_ex ()
#46 0x00000000005cf1ae in dtrace_execute_ex ()
#47 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5800) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#48 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#49 0x000000000064d5a8 in execute_ex ()
#50 0x00000000005cf1ae in dtrace_execute_ex ()
#51 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5648) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#52 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#53 0x000000000064d5a8 in execute_ex ()
#54 0x00000000005cf1ae in dtrace_execute_ex ()
#55 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5508) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#56 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#57 0x000000000064d5a8 in execute_ex ()
#58 0x00000000005cf1ae in dtrace_execute_ex ()
#59 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca53f8) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#60 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#61 0x000000000064d5a8 in execute_ex ()
#62 0x00000000005cf1ae in dtrace_execute_ex ()
#63 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5268) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#64 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#65 0x000000000064d5a8 in execute_ex ()
#66 0x00000000005cf1ae in dtrace_execute_ex ()
#67 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca5128) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#68 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#69 0x000000000064d5a8 in execute_ex ()
#70 0x00000000005cf1ae in dtrace_execute_ex ()
#71 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca4f88) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#72 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#73 0x000000000064d5a8 in execute_ex ()
#74 0x00000000005cf1ae in dtrace_execute_ex ()
#75 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca4e58) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#76 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#77 0x000000000064d5a8 in execute_ex ()
#78 0x00000000005cf1ae in dtrace_execute_ex ()
#79 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca4d50) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#80 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#81 0x000000000064d5a8 in execute_ex ()
#82 0x00000000005cf1ae in dtrace_execute_ex ()
#83 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca4c08) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#84 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#85 0x000000000064d5a8 in execute_ex ()
#86 0x00000000005cf1ae in dtrace_execute_ex ()
#87 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca4af0) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#88 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#89 0x000000000064d5a8 in execute_ex ()
#90 0x00000000005cf1ae in dtrace_execute_ex ()
#91 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca49d8) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#92 0x000000000065e144 in zend_do_fcall_common_helper_SPEC ()
#93 0x000000000064d5a8 in execute_ex ()
#94 0x00000000005cf1ae in dtrace_execute_ex ()
#95 0x00007fabd221ba43 in xdebug_execute_ex (execute_data=0x7fabd5ca48e8) at
/home/infra/rpmbuild-php56/BUILD/php56u-pecl-xdebug-2.3.3/NTS/xdebug.c:1644
#96 0x00000000005de8fc in zend_execute_scripts ()
#97 0x000000000057cf9a in php_execute_script ()
#98 0x000000000068e227 in main ()

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=70192


--
Edit this bug report at https://bugs.php.net/bug.php?id=70192&edit=1


Thread (10 messages)

« previous php.bugs (#231410) next »