Bug report, with core dump and backtrace

Discussion in 'Bug Reports' started by Crimson, Mar 20, 2008.

  1. Crimson

    Crimson New Member

    I'm running LiteSpeed Standard v3.3.8 on a CentOS 5 64-bit server. Using PHP v5.2.5 with the LSAPI interface.

    I keep getting these segfaults and core dumps filling up my server and driving my server load up and making it unusable. The only way to fix is to restart the LiteSpeed web daemon.

    There are no errors in error.log.

    Here's the gdb command:
    Code:
    GNU gdb Red Hat Linux (6.5-25.el5_1.1rh)
    Copyright (C) 2006 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/libthread_db.so.1".
    
    Reading symbols from /lib64/libcrypt.so.1...done.
    Loaded symbols for /lib64/libcrypt.so.1
    Reading symbols from /usr/lib64/libmm.so.14...done.
    Loaded symbols for /usr/lib64/libmm.so.14
    Reading symbols from /lib64/librt.so.1...done.
    Loaded symbols for /lib64/librt.so.1
    Reading symbols from /usr/lib64/mysql/libmysqlclient.so.15...done.
    Loaded symbols for /usr/lib64/mysql/libmysqlclient.so.15
    Reading symbols from /usr/lib64/libfreetype.so.6...done.
    Loaded symbols for /usr/lib64/libfreetype.so.6
    Reading symbols from /usr/lib64/libpng12.so.0...done.
    Loaded symbols for /usr/lib64/libpng12.so.0
    Reading symbols from /usr/lib64/libz.so.1...done.
    Loaded symbols for /usr/lib64/libz.so.1
    Reading symbols from /usr/lib64/libjpeg.so.62...done.
    Loaded symbols for /usr/lib64/libjpeg.so.62
    Reading symbols from /usr/lib64/libcurl.so.3...done.
    Loaded symbols for /usr/lib64/libcurl.so.3
    Reading symbols from /usr/lib64/libbz2.so.1...done.
    Loaded symbols for /usr/lib64/libbz2.so.1
    Reading symbols from /lib64/libresolv.so.2...done.
    Loaded symbols for /lib64/libresolv.so.2
    Reading symbols from /lib64/libm.so.6...done.
    Loaded symbols for /lib64/libm.so.6
    Reading symbols from /lib64/libdl.so.2...done.
    Loaded symbols for /lib64/libdl.so.2
    Reading symbols from /lib64/libnsl.so.1...done.
    Loaded symbols for /lib64/libnsl.so.1
    Reading symbols from /usr/lib64/libxml2.so.2...done.
    Loaded symbols for /usr/lib64/libxml2.so.2
    Reading symbols from /usr/lib64/libgssapi_krb5.so.2...done.
    Loaded symbols for /usr/lib64/libgssapi_krb5.so.2
    Reading symbols from /usr/lib64/libkrb5.so.3...done.
    Loaded symbols for /usr/lib64/libkrb5.so.3
    Reading symbols from /usr/lib64/libk5crypto.so.3...done.
    Loaded symbols for /usr/lib64/libk5crypto.so.3
    Reading symbols from /lib64/libcom_err.so.2...done.
    Loaded symbols for /lib64/libcom_err.so.2
    Reading symbols from /usr/lib64/libidn.so.11...done.
    Loaded symbols for /usr/lib64/libidn.so.11
    Reading symbols from /lib64/libssl.so.6...done.
    Loaded symbols for /lib64/libssl.so.6
    Reading symbols from /lib64/libcrypto.so.6...done.
    Loaded symbols for /lib64/libcrypto.so.6
    Reading symbols from /lib64/libc.so.6...done.
    Loaded symbols for /lib64/libc.so.6
    Reading symbols from /lib64/libpthread.so.0...done.
    Loaded symbols for /lib64/libpthread.so.0
    Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
    Loaded symbols for /lib64/ld-linux-x86-64.so.2
    Reading symbols from /usr/lib64/libkrb5support.so.0...done.
    Loaded symbols for /usr/lib64/libkrb5support.so.0
    Reading symbols from /lib64/libkeyutils.so.1...done.
    Loaded symbols for /lib64/libkeyutils.so.1
    Reading symbols from /lib64/libselinux.so.1...done.
    Loaded symbols for /lib64/libselinux.so.1
    Reading symbols from /lib64/libsepol.so.1...done.
    Loaded symbols for /lib64/libsepol.so.1
    Reading symbols from /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so...done.
    Loaded symbols for /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so
    Reading symbols from /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/memcache.so...done.
    Loaded symbols for /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/memcache.so
    Reading symbols from /lib64/libnss_files.so.2...done.
    Loaded symbols for /lib64/libnss_files.so.2
    Core was generated by `lsphp5'.
    Program terminated with signal 11, Segmentation fault.
    #0  _zend_mm_free_int (heap=0x19bea6f0, p=0x2aaaaf0b4d18) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_alloc.c:1944
    1944    /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_alloc.c: No such file or directory.
            in /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_alloc.c
    
  2. Crimson

    Crimson New Member

    The bt command
    Code:
    (gdb) bt
    #0  _zend_mm_free_int (heap=0x19bea6f0, p=0x2aaaaf0b4d18) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_alloc.c:1944
    #1  0x00000000006a222d in _zval_ptr_dtor (zval_ptr=0x1a21ae78) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_variables.h:35
    #2  0x00000000006b8d28 in zend_hash_destroy (ht=0x1a2bdef0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_hash.c:526
    #3  0x00000000006ae2b6 in _zval_dtor_func (zvalue=0x1a251070) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_variables.c:43
    #4  0x00000000006a222d in _zval_ptr_dtor (zval_ptr=0x1a2b7370) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_variables.h:35
    #5  0x00000000006b8d28 in zend_hash_destroy (ht=0x1a2b6a48) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_hash.c:526
    #6  0x00000000006a41cc in zend_call_function (fci=0x7fff5e541c50, fci_cache=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:992
    #7  0x00000000006a4a66 in call_user_function_ex (function_table=<value optimized out>, object_pp=<value optimized out>, function_name=0x1a2ba370, retval_ptr_ptr=0x1, param_count=2936753416, 
        params=0x67fb20, no_separation=0, symbol_table=0x0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:617
    #8  0x000000000060b519 in zif_call_user_func_array (ht=<value optimized out>, return_value=0x1a251100, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, 
        return_value_used=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/ext/standard/basic_functions.c:5153
    #9  0x00000000006cd49b in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e541f10) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:200
    #10 0x00000000006cc593 in execute (op_array=0x1a1845f0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #11 0x00000000006ccf56 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e542380) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:234
    #12 0x00000000006cc593 in execute (op_array=0x1a0db770) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #13 0x00000000006a3b38 in zend_call_function (fci=0x7fff5e542540, fci_cache=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:990
    #14 0x00000000006a4a66 in call_user_function_ex (function_table=<value optimized out>, object_pp=<value optimized out>, function_name=0x1a2ba370, retval_ptr_ptr=0x1, param_count=2936753416, 
        params=0x67fb20, no_separation=0, symbol_table=0x0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:617
    #15 0x000000000060b519 in zif_call_user_func_array (ht=<value optimized out>, return_value=0x1a2b8640, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, 
        return_value_used=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/ext/standard/basic_functions.c:5153
    #16 0x00000000006cd49b in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e542800) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:200
    #17 0x00000000006cc593 in execute (op_array=0x1a1845f0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #18 0x00000000006ccf56 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e542ae0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:234
    #19 0x00000000006cc593 in execute (op_array=0x19f49030) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #20 0x00000000006a3b38 in zend_call_function (fci=0x7fff5e542ca0, fci_cache=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:990
    #21 0x00000000006a4a66 in call_user_function_ex (function_table=<value optimized out>, object_pp=<value optimized out>, function_name=0x1a2ba370, retval_ptr_ptr=0x1, param_count=2936753416, 
        params=0x67fb20, no_separation=0, symbol_table=0x0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:617
    #22 0x000000000060b519 in zif_call_user_func_array (ht=<value optimized out>, return_value=0x1a2baa68, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, 
        return_value_used=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/ext/standard/basic_functions.c:5153
    #23 0x00000000006cd49b in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e542f60) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:200
    #24 0x00000000006cc593 in execute (op_array=0x1a1845f0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #25 0x00000000006ccf56 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e543180) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:234
    #26 0x00000000006cc593 in execute (op_array=0x19f6d720) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #27 0x00000000006a3b38 in zend_call_function (fci=0x7fff5e543340, fci_cache=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:990
    #28 0x00000000006a4a66 in call_user_function_ex (function_table=<value optimized out>, object_pp=<value optimized out>, function_name=0x1a2ba370, retval_ptr_ptr=0x1, param_count=2936753416, 
        params=0x67fb20, no_separation=0, symbol_table=0x0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:617
    #29 0x000000000060b519 in zif_call_user_func_array (ht=<value optimized out>, return_value=0x1a2c9f98, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, 
        return_value_used=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/ext/standard/basic_functions.c:5153
    #30 0x00000000006cd49b in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e543600) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:200
    #31 0x00000000006cc593 in execute (op_array=0x1a1845f0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #32 0x00000000006ccf56 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e543f60) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:234
    #33 0x00000000006cc593 in execute (op_array=0x19f65490) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #34 0x00000000006ccf56 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e5441b0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:234
    #35 0x00000000006cc593 in execute (op_array=0x1a18dab0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #36 0x00000000006ccf56 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e5443d0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:234
    #37 0x00000000006cc593 in execute (op_array=0x1a052d50) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #38 0x00000000006a3b38 in zend_call_function (fci=0x7fff5e544590, fci_cache=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:990
    #39 0x00000000006a4a66 in call_user_function_ex (function_table=<value optimized out>, object_pp=<value optimized out>, function_name=0x1a2ba370, retval_ptr_ptr=0x1, param_count=2936753416, 
        params=0x67fb20, no_separation=0, symbol_table=0x0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_execute_API.c:617
    #40 0x000000000060b519 in zif_call_user_func_array (ht=<value optimized out>, return_value=0x1a08b1b0, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, 
        return_value_used=<value optimized out>) at /usr/local/lsws/phpbuild/php-5.2.5/ext/standard/basic_functions.c:5153
    #41 0x00000000006cd49b in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e5449e0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:200
    #42 0x00000000006cc593 in execute (op_array=0x19e66310) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #43 0x00000000006ccf56 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fff5e544c50) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:234
    #44 0x00000000006cc593 in execute (op_array=0x19e98588) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    #45 0x00000000006ae593 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend.c:1134
    ---Type <return> to continue, or q <return> to quit---
    #46 0x000000000066e5cb in php_execute_script (primary_file=0x7fff5e5470f0) at /usr/local/lsws/phpbuild/php-5.2.5/main/main.c:2004
    #47 0x00000000007284ce in lsapi_module_main (show_source=0) at /usr/local/lsws/phpbuild/php-5.2.5/sapi/litespeed/lsapi_main.c:358
    #48 0x00000000007288d4 in processReq () at /usr/local/lsws/phpbuild/php-5.2.5/sapi/litespeed/lsapi_main.c:406
    #49 0x0000000000728a53 in main (argc=1, argv=0x0) at /usr/local/lsws/phpbuild/php-5.2.5/sapi/litespeed/lsapi_main.c:786
    
    And the frame 10 command
    Code:
    (gdb) frame 10
    #10 0x00000000006cc593 in execute (op_array=0x1a1845f0) at /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h:92
    92      /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h: No such file or directory.
            in /usr/local/lsws/phpbuild/php-5.2.5/Zend/zend_vm_execute.h
    
    I'm also going to send core dump links to bug@litespeedtech.com to see if you can fix it. This problem has been hassling me forever and it seems to be appearing so often now.
  3. mistwang

    mistwang LiteSpeed Staff

    It is a problem with PHP zend engine, not a LiteSpeed bug. You should contact PHP developers.
  4. Crimson

    Crimson New Member

    Thank you for directing me in the right direction. I'm going to try a PHP CVS snapshot first and see if it appears again.
  5. Crimson

    Crimson New Member

    The PHP CVS snapshot seems to have everything fixed and I'm no longer having any issues with core dumps and the like.
  6. mistwang

    mistwang LiteSpeed Staff

    Thanks for the update.

Share This Page