zendtech / ZendOptimizerPlus

Other
914 stars 142 forks source link

FPM crashes because of seg faults in zendoptimizer #163

Open rishabhdua-zz opened 10 years ago

rishabhdua-zz commented 10 years ago

I am using

Here is the GDB trace of the segfault

Program received signal SIGSEGV, Segmentation fault.
0x0000000000586bb5 in ?? ()
(gdb) bt
#0  0x0000000000586bb5 in ?? ()
#1  0x00007fdc385d292d in accel_new_interned_string (arKey=<value optimized out>, nKeyLength=9, free_src=1)
    at /vagrant/install/zend/ZendOptimizerPlus/ZendAccelerator.c:330
#2  0x00007fdc385d9edc in zend_persist_zval_calc (z=0x7fdc2a5cae18) at /vagrant/install/zend/ZendOptimizerPlus/zend_persist_calc.c:107
#3  0x00007fdc385da654 in zend_persist_op_array_calc (op_array=0x345f708) at /vagrant/install/zend/ZendOptimizerPlus/zend_persist_calc.c:148
#4  0x00007fdc385d9ce3 in zend_hash_persist_calc (ht=0x345f3e8, pPersistElement=0x7fdc385da2d0 <zend_persist_op_array_calc>, el_size=240)
    at /vagrant/install/zend/ZendOptimizerPlus/zend_persist_calc.c:79
#5  0x00007fdc385da00f in zend_persist_class_entry_calc (pce=<value optimized out>)
    at /vagrant/install/zend/ZendOptimizerPlus/zend_persist_calc.c:241
#6  0x00007fdc385d9ce3 in zend_hash_persist_calc (ht=0x345f238, pPersistElement=0x7fdc385d9f90 <zend_persist_class_entry_calc>, el_size=8)
    at /vagrant/install/zend/ZendOptimizerPlus/zend_persist_calc.c:79
#7  0x00007fdc385da6dd in zend_accel_persist_class_table_calc (new_persistent_script=0x345f0e8, 
    key=0x7fdc387eaef4 "/vagrant/programs/liger/repo/1/src/modules/myproduct/classes/model/myclass.php", key_length=129) at /vagrant/install/zend/ZendOptimizerPlus/zend_persist_calc.c:330
#8  zend_accel_script_persist_calc (new_persistent_script=0x345f0e8, 
    key=0x7fdc387eaef4 "/vagrant/programs/liger/repo/1/src/modules/myproject/classes/model/myclass.php", key_length=129) at /vagrant/install/zend/ZendOptimizerPlus/zend_persist_calc.c:338
#9  0x00007fdc385d4cd4 in cache_script_in_shared_memory (file_handle=0x7fffe2548590, type=8, 
    key=0x7fdc387eaef4 "/vagrant/programs/liger/repo/1/src/modules/myproject/classes/model/myclass.php", key_length=129, op_array_p=0x7fffe2548530, from_shared_memory=0x7fffe2548538)
    at /vagrant/install/zend/ZendOptimizerPlus/ZendAccelerator.c:1169
#10 compile_and_cache_file (file_handle=0x7fffe2548590, type=8, 
    key=0x7fdc387eaef4 "/vagrant/programs/liger/repo/1/src/modules/myproject/classes/model/myclass.php", key_length=129, op_array_p=0x7fffe2548530, from_shared_memory=0x7fffe2548538)
    at /vagrant/install/zend/ZendOptimizerPlus/ZendAccelerator.c:1464
#11 0x00007fdc385d5993 in persistent_compile_file (file_handle=0x7fffe2548590, type=8)
    at /vagrant/install/zend/ZendOptimizerPlus/ZendAccelerator.c:1641
#12 0x000000000057f15e in compile_filename ()
#13 0x00000000005f7afb in ?? ()
#14 0x0000000000615708 in execute ()
#15 0x00000000005a07fc in zend_call_function ()
#16 0x00000000005c4177 in zend_call_method ()
#17 0x00000000004bcc16 in ?? ()
#18 0x00000000005a08a5 in zend_call_function ()
#19 0x00000000005a0e36 in zend_lookup_class_ex ()
#20 0x00000000005a127f in zend_fetch_class_by_name ()
#21 0x00000000005df4bb in ?? ()
#22 0x0000000000615708 in execute ()
#23 0x00000000005a07fc in zend_call_function ()
#24 0x00000000004afff6 in ?? ()
#25 0x0000000000627fbc in ?? ()
#26 0x0000000000615708 in execute ()
#27 0x00000000005ab640 in zend_execute_scripts ()
#28 0x000000000054e3c8 in php_execute_script ()
#29 0x000000000065f882 in ?? ()
#30 0x00007fdc3f547d1d in __libc_start_main () from /lib64/libc.so.6
#31 0x0000000000420a59 in _start ()
dstogov commented 10 years ago

Is this crash well reproducible? can you show the PHP script (or better its important part) that causes that causes the crash?

rishabhdua-zz commented 10 years ago

The crash was reproducible but stopped happening for now after I restarted php-fpm.

I wont be able to give you random piece of code, as it wont make sense. There just too many dependent classes being called in that flow.

dstogov commented 10 years ago

you may get the file and line number from the backtrace, but if it's not reproducible anymore it probably won't help.

p executor_globals.current_execute_data.op_array.filename p executor_globals.current_execute_data.opline lineno

Thanks. Dmitry.

On Fri, Jan 24, 2014 at 1:11 PM, rishabhdua notifications@github.comwrote:

The crash was reproducible but stopped happening for now after I restarted php-fpm.

I wont be able to give you random piece of code, as it wont make sense. If you can point to the line number may be I can be of help.

— Reply to this email directly or view it on GitHubhttps://github.com/zendtech/ZendOptimizerPlus/issues/163#issuecomment-33207435 .

rishabhdua-zz commented 10 years ago

Now its not crashing. Will update when it crashes hopefully soon :+1: