LiteSpeed LSPHP Segmentation Fault (SIGSEGV)

Discussion in 'PHP' started by ITS, May 17, 2018 at 4:43 PM.

  1. ITS

    ITS New Member

    Hello,

    Recently, we have started experiencing an LSPHP/LSAPI issue on all our servers that have LiteSpeed (they all have LiteSpeed+LSPHP). The 'abrt-cli' tool reports that LSPHP children constantly get multiple SIGSEGV's. A strange thing is that in /var/log/messages those errors are only reported by 'abrt-cli'; with it being disabled, we get no errors. Nevertheless, the issue exists, and we need your assitance.

    Our system configuration, an entry for a particular PID from the LiteSpeed error log, as well as an LSPHP code dump for that PID are provided below:

    ============================================================================================================
    SYSTEM

    ## OS: CloudLinux 7.4

    ## Control panel: cPanel

    ## LiteSpeed
    Code:
    /usr/local/lsws/bin/lshttpd --version
    LiteSpeed/5.2.7 Enterprise
    We had LiteSpeed version 5.2.3, so we upgraded it to 5.2.7, but this did not fix the issue.

    ## LSPHP
    Code:
    /opt/alt/php70/usr/bin/lsphp -v
    PHP 7.0.30 (litespeed) (built: Apr 26 2018 16:12:40)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    ============================================================================================================

    PID 445923: LiteSpeed Error Log
    Code:
    grep 445923 /var/log/apache2/error_log
    2018-04-30 20:20:34.000344 [INFO] [CLEANUP] Send signal: 15 to process: 445923
    2018-04-30 20:20:33.208712 [INFO] [89.160.196.213:59257] Abort request processing by PID:445923, kill: 1, begin time: 1, sent time: 1, req processed: 0
    2018-04-30 20:20:35.000276 [INFO] [CLEANUP] Send signal: 9 to process: 445923
    ============================================================================================================

    PID 445923: CORE DUMP analyzed with gdb
    Code:
    gdb /opt/alt/php70/usr/bin/lsphp /var/spool/abrt/ccpp-2018-04-30-20:20:34-445923/coredump
    GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    http://www.gnu.org/software/gdb/bugs/...
    Reading symbols from /opt/alt/php70/usr/bin/lsphp...Reading symbols from /opt/alt/php70/usr/bin/lsphp...(no debugging symbols found)...done.
    (no debugging symbols found)...done.
    [New LWP 445923]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    Core was generated by `lsphp '.
    Program terminated with signal 11, Segmentation fault.
    
    0 0x00000000006d5ff8 in zend_objects_store_call_destructors ()
    Missing separate debuginfos, use: debuginfo-install alt-php70-cli-7.0.29-3.el7.x86_64
    (gdb) bt
    
    0 0x00000000006d5ff8 in zend_objects_store_call_destructors ()
    1 0x000000000068a8cb in shutdown_destructors ()
    2 0x000000000069ab27 in zend_call_destructors ()
    3 0x0000000000639e05 in php_request_shutdown ()
    4 0x0000000000725e26 in lsapi_sigterm ()
    5 <signal handler called>
    6 0x00007fcad3fab783 in __select_nocancel () from /lib64/libc.so.6
    7 0x000000000072d889 in LSAPI_Prefork_Accept_r ()
    8 0x000000000043459c in main ()
    (gdb)

    ============================================================================================================

    PID 445923: The same CORE DUMP analyzed with eu-stack
    Code:
    eu-stack --verbose --core=/var/spool/abrt/ccpp-2018-04-30-20:20:34-445923/coredump
    PID 445923 - core
    TID 445923:
    
    0 0x00000000006d5ff8 zend_objects_store_call_destructors - /opt/alt/php70/usr/bin/lsphp
    1 0x000000000068a8cb - 1 shutdown_destructors - /opt/alt/php70/usr/bin/lsphp
    2 0x000000000069ab27 - 1 zend_call_destructors - /opt/alt/php70/usr/bin/lsphp
    3 0x0000000000639e05 - 1 php_request_shutdown - /opt/alt/php70/usr/bin/lsphp
    4 0x0000000000725e26 - 1 lsapi_sigterm - /opt/alt/php70/usr/bin/lsphp
    5 0x00007fcad3ef1270 __restore_rt - libc.so.6
    6 0x00007fcad3fab783 __select - libc.so.6
    7 0x000000000072d889 - 1 LSAPI_Prefork_Accept_r - /opt/alt/php70/usr/bin/lsphp
    8 0x000000000043459c - 1 main - /opt/alt/php70/usr/bin/lsphp
    9 0x00007fcad3eddc05 - 1 __libc_start_main - libc.so.6
    10 0x00000000004347f7 - 1 _start - /opt/alt/php70/usr/bin/lsphp
     
    Last edited by a moderator: May 18, 2018 at 1:51 PM
  2. mistwang

    mistwang LiteSpeed Staff

    It is PHP internal crash when handle the SIGTERM signal. Maybe try different PHP version see if crash stops.
    If crash continue, you may submit a bug report to php.net .
     

Share This Page