|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-08-05 05:13 UTC] shu dot ko at tis dot co dot jp
Description: ------------ I am using opcache, when i do a stress test(peek thughput: 300request/secend)Segmentation(11) error happend. when i set opacahe off, the error do not happen. I got the backtrace infomations, please see fellow. Actual result: -------------- -------------------------------------- core was generated by `/usr/sbin/httpd'. Program terminated with signal 11, Segmentation fault. #0 0x00007fbe4cbb067e in memcpy () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install httpd-2.2.15-39.el6.centos.x86_64 (gdb) bt #0 0x00007fbe4cbb067e in memcpy () from /lib64/libc.so.6 #1 0x00007fbe48858b90 in _estrndup () from /etc/httpd/modules/libphp5.so #2 0x00007fbe46491e6b in ?? () from /usr/lib64/php/modules/opcache.so #3 0x00007fbe46491e17 in ?? () from /usr/lib64/php/modules/opcache.so #4 0x00007fbe46492786 in ?? () from /usr/lib64/php/modules/opcache.so #5 0x00007fbe46491650 in ?? () from /usr/lib64/php/modules/opcache.so #6 0x00007fbe464917cc in ?? () from /usr/lib64/php/modules/opcache.so #7 0x00007fbe46492121 in ?? () from /usr/lib64/php/modules/opcache.so #8 0x00007fbe4648b0cf in ?? () from /usr/lib64/php/modules/opcache.so #9 0x00007fbe4884f5be in compile_filename () from /etc/httpd/modules/libphp5.so #10 0x00007fbe488ed6e3 in ?? () from /etc/httpd/modules/libphp5.so #11 0x00007fbe488eded8 in execute_ex () from /etc/httpd/modules/libphp5.so #12 0x00007fbe4886fb1e in dtrace_execute_ex () from /etc/httpd/modules/libphp5.so #13 0x00007fbe488ed871 in ?? () from /etc/httpd/modules/libphp5.so #14 0x00007fbe488eded8 in execute_ex () from /etc/httpd/modules/libphp5.so #15 0x00007fbe4886fb1e in dtrace_execute_ex () from /etc/httpd/modules/libphp5.so #16 0x00007fbe488ed871 in ?? () from /etc/httpd/modules/libphp5.so #17 0x00007fbe488eded8 in execute_ex () from /etc/httpd/modules/libphp5.so #18 0x00007fbe4886fb1e in dtrace_execute_ex () from /etc/httpd/modules/libphp5.so #19 0x00007fbe4887f26c in zend_execute_scripts () from /etc/httpd/modules/libphp5.so #20 0x00007fbe4881d9da in php_execute_script () from /etc/httpd/modules/libphp5.so #21 0x00007fbe489257dd in ?? () from /etc/httpd/modules/libphp5.so #22 0x00007fbe4e617cd0 in ap_run_handler () #23 0x00007fbe4e61b58e in ap_invoke_handler () #24 0x00007fbe4e626c50 in ap_process_request () #25 0x00007fbe4e623ac8 in ?? () #26 0x00007fbe4e61f7d8 in ap_run_process_connection () #27 0x00007fbe4e62bad7 in ?? () #28 0x00007fbe4e62bdea in ?? () #29 0x00007fbe4e62ca6c in ap_mpm_run () #30 0x00007fbe4e6039b0 in main () -------------------------------------- PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 17:00:01 2025 UTC |
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 ()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 () ------------------------------------------