Hi Guys,
After doing an Apache rebuild this morning through EasyApache 3.38.4 we've noticed Apache processes segfaulting an awful lot. I got the following backtrace from one of the faults (included at the end) which seems to indicate the fault lies within php and I had the sneaking suspicion it could be opcache based.
I cleared out old cache from /tmp/eaccelerator which seemed to alleviate the issues somewhat (but not completely) however disabling eAccelerator entirely made the problem vanish. Playing around with some of the configuration seems to indicate that having eaccelerater.optimizer enabled was the cause of these segfaults. Everything is fine with optimisations off but starts segfaulting when enabled.
Has anyone seen similar behaviour in this configuration recently? Especially since the 5.4.38 update? I fear that eAccelerator just doesn't play nicely with the latest version of PHP (and looking through the EasyApache changelog this wouldn't be the first time either).
Hope someone can help, many thanks in advance,
Dan
-- backtrace follows --
Program received signal SIGSEGV, Segmentation fault.
0x00002b7e0f9da59f in do_bind_function (op_array=<value optimized out>, opline=<value optimized out>, function_table=0x15aaa2b0, compile_time=0 '\000')
at /home/cpeasyapache/src/php-5.4.38/Zend/zend_compile.c:4266
4266 (*function->op_array.refcount)++;
(gdb) bt
#0 0x00002b7e0f9da59f in do_bind_function (op_array=<value optimized out>, opline=<value optimized out>, function_table=0x15aaa2b0, compile_time=0 '\000')
at /home/cpeasyapache/src/php-5.4.38/Zend/zend_compile.c:4266
#1 0x00002b7e0fa257a0 in ZEND_DECLARE_FUNCTION_SPEC_HANDLER (execute_data=0x2b7e115f8150) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:965
#2 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162e050) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#3 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#4 0x00002b7e0fa4f67a in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0x2b7e115f4358) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:27484
#5 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162d6a8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#6 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#7 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f3fc0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#8 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162cec0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#9 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#10 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f34e0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#11 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162c8d0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#12 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#13 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f32c8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#14 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162c3f8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#15 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#16 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f31b8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#17 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162bc58) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#18 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#19 0x00002b7e0f9f9e2f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/cpeasyapache/src/php-5.4.38/Zend/zend.c:1329
#20 0x00002b7e0f99cca8 in php_execute_script (primary_file=0x7ffff9595850) at /home/cpeasyapache/src/php-5.4.38/main/main.c:2502
#21 0x00002b7e0faa2a1d in php_handler (r=0x15beb038) at /home/cpeasyapache/src/php-5.4.38/sapi/apache2handler/sapi_apache2.c:667
#22 0x000000000044bfe7 in ap_run_handler ()
#23 0x000000000044c8b0 in ap_invoke_handler ()
#24 0x00000000004b7ae5 in ap_internal_redirect ()
#25 0x00000000004f7b79 in handler_redirect ()
#26 0x000000000044bfe7 in ap_run_handler ()
#27 0x000000000044c8b0 in ap_invoke_handler ()
#28 0x00000000004b6f9a in ap_process_request ()
#29 0x00000000004b37c5 in ap_process_http_connection ()
#30 0x0000000000455aa3 in ap_run_process_connection ()
#31 0x0000000000455f07 in ap_process_connection ()
#32 0x00000000004f9291 in child_main ()
#33 0x00000000004f945b in make_child ()
#34 0x00000000004f96ee in perform_idle_server_maintenance ()
#35 0x00000000004f9c2d in ap_mpm_run ()
#36 0x00000000004312fb in main ()
After doing an Apache rebuild this morning through EasyApache 3.38.4 we've noticed Apache processes segfaulting an awful lot. I got the following backtrace from one of the faults (included at the end) which seems to indicate the fault lies within php and I had the sneaking suspicion it could be opcache based.
I cleared out old cache from /tmp/eaccelerator which seemed to alleviate the issues somewhat (but not completely) however disabling eAccelerator entirely made the problem vanish. Playing around with some of the configuration seems to indicate that having eaccelerater.optimizer enabled was the cause of these segfaults. Everything is fine with optimisations off but starts segfaulting when enabled.
Has anyone seen similar behaviour in this configuration recently? Especially since the 5.4.38 update? I fear that eAccelerator just doesn't play nicely with the latest version of PHP (and looking through the EasyApache changelog this wouldn't be the first time either).
Hope someone can help, many thanks in advance,
Dan
-- backtrace follows --
Program received signal SIGSEGV, Segmentation fault.
0x00002b7e0f9da59f in do_bind_function (op_array=<value optimized out>, opline=<value optimized out>, function_table=0x15aaa2b0, compile_time=0 '\000')
at /home/cpeasyapache/src/php-5.4.38/Zend/zend_compile.c:4266
4266 (*function->op_array.refcount)++;
(gdb) bt
#0 0x00002b7e0f9da59f in do_bind_function (op_array=<value optimized out>, opline=<value optimized out>, function_table=0x15aaa2b0, compile_time=0 '\000')
at /home/cpeasyapache/src/php-5.4.38/Zend/zend_compile.c:4266
#1 0x00002b7e0fa257a0 in ZEND_DECLARE_FUNCTION_SPEC_HANDLER (execute_data=0x2b7e115f8150) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:965
#2 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162e050) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#3 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#4 0x00002b7e0fa4f67a in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0x2b7e115f4358) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:27484
#5 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162d6a8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#6 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#7 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f3fc0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#8 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162cec0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#9 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#10 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f34e0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#11 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162c8d0) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#12 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#13 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f32c8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#14 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162c3f8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#15 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#16 0x00002b7e0fa45a5a in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0x2b7e115f31b8) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:7080
#17 0x00002b7e0fa2e990 in execute (op_array=0x2b7e1162bc58) at /home/cpeasyapache/src/php-5.4.38/Zend/zend_vm_execute.h:410
#18 0x00002b7e14fb23e6 in zend_oe () from /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
#19 0x00002b7e0f9f9e2f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/cpeasyapache/src/php-5.4.38/Zend/zend.c:1329
#20 0x00002b7e0f99cca8 in php_execute_script (primary_file=0x7ffff9595850) at /home/cpeasyapache/src/php-5.4.38/main/main.c:2502
#21 0x00002b7e0faa2a1d in php_handler (r=0x15beb038) at /home/cpeasyapache/src/php-5.4.38/sapi/apache2handler/sapi_apache2.c:667
#22 0x000000000044bfe7 in ap_run_handler ()
#23 0x000000000044c8b0 in ap_invoke_handler ()
#24 0x00000000004b7ae5 in ap_internal_redirect ()
#25 0x00000000004f7b79 in handler_redirect ()
#26 0x000000000044bfe7 in ap_run_handler ()
#27 0x000000000044c8b0 in ap_invoke_handler ()
#28 0x00000000004b6f9a in ap_process_request ()
#29 0x00000000004b37c5 in ap_process_http_connection ()
#30 0x0000000000455aa3 in ap_run_process_connection ()
#31 0x0000000000455f07 in ap_process_connection ()
#32 0x00000000004f9291 in child_main ()
#33 0x00000000004f945b in make_child ()
#34 0x00000000004f96ee in perform_idle_server_maintenance ()
#35 0x00000000004f9c2d in ap_mpm_run ()
#36 0x00000000004312fb in main ()