Bug #74594 [NEW]: SEGFAULT on /usr/lib/apache2/modules/libphp7.so (sljit_generate_code)

From: Date: Mon, 15 May 2017 09:29:51 +0000
Subject: Bug #74594 [NEW]: SEGFAULT on /usr/lib/apache2/modules/libphp7.so (sljit_generate_code)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209122@lists.php.net to get a copy of this message
From: antonio dot tauro at ophion dot ch Operating system: Debian GNU/Linux 8 PHP version: 7.1.5 Package: PCRE related Bug Type: Bug Bug description:SEGFAULT on /usr/lib/apache2/modules/libphp7.so (sljit_generate_code) Description: ------------ We have a Wordpress (up-to-date) installation where segfault happen sometimes while using the Admin interface (Updating a Plugin, activating a Plugin etc.) It isn't reproducible. But it happens quite often. A Segfault is thrown on the running apache process and our nginx reverse proxy gives back a HTTP 502. I'm not sure if the bug should also be reported to the Wordpress team, but the gdb trace shows, that the SIGSEGV happens in #0 0x00007fdacc214fab in sljit_generate_code () from /usr/lib/apache2/modules/libphp7.so OS (Docker Container): root@68cf7ac54815:/var/www/html# cat /etc/issue Debian GNU/Linux 8 \n \l Docker Image: wordpress:php7.1 PHP Version: root@68cf7ac54815:/var/www/html# php -v PHP 7.1.4 (cli) (built: Apr 25 2017 03:23:01) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.4, Copyright (c) 1999-2017, by Zend Technologies Apache Version: root@68cf7ac54815:/var/www/html# apache2 -v Server version: Apache/2.4.10 (Debian) Server built: Feb 24 2017 18:40:28 === FULL GDB TRACE === root@68cf7ac54815:/var/www/html# gdb /usr/sbin/apache2 core \GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 Copyright (C) 2014 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-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/sbin/apache2...(no debugging symbols found)...done. [New LWP 941] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `apache2 -DFOREGROUND'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007fdacc214fab in sljit_generate_code () from /usr/lib/apache2/modules/libphp7.so (gdb) bt #0 0x00007fdacc214fab in sljit_generate_code () from /usr/lib/apache2/modules/libphp7.so #1 0x00007fdacc239a0c in _pcre_jit_compile () from /usr/lib/apache2/modules/libphp7.so #2 0x00007fdacc213b5d in php_pcre_study () from /usr/lib/apache2/modules/libphp7.so #3 0x00007fdacc23be20 in pcre_get_compiled_regex_cache () from /usr/lib/apache2/modules/libphp7.so #4 0x00007fdacc23d619 in php_do_pcre_match () from /usr/lib/apache2/modules/libphp7.so #5 0x00007fdacc57bdc6 in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () from /usr/lib/apache2/modules/libphp7.so #6 0x00007fdacc56a8fb in execute_ex () from /usr/lib/apache2/modules/libphp7.so #7 0x00007fdacc5c69f0 in zend_execute () from /usr/lib/apache2/modules/libphp7.so #8 0x00007fdacc521353 in zend_execute_scripts () from /usr/lib/apache2/modules/libphp7.so #9 0x00007fdacc4bd5f0 in php_execute_script () from /usr/lib/apache2/modules/libphp7.so #10 0x00007fdacc5c890a in php_handler () from /usr/lib/apache2/modules/libphp7.so #11 0x00007fdad0c51690 in ap_run_handler () #12 0x00007fdad0c51bd9 in ap_invoke_handler () #13 0x00007fdad0c67ab2 in ap_process_async_request () #14 0x00007fdad0c67c50 in ap_process_request () #15 0x00007fdad0c64552 in ?? () #16 0x00007fdad0c5af40 in ap_run_process_connection () #17 0x00007fdacd0647ba in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #18 0x00007fdacd064a01 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #19 0x00007fdacd064a72 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #20 0x00007fdacd06573c in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #21 0x00007fdad0c357ee in ap_run_mpm () #22 0x00007fdad0c2e5f3 in main () Expected result: ---------------- Process shouldn't end with a Segmentation Fault. Request should be treated without problems. Actual result: -------------- Segmentation Fault is thrown. Upstream doesn't give back a response. Reverse Proxy request results with a 502. -- Edit bug report at https://bugs.php.net/bug.php?id=74594&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74594&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74594&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74594&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74594&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74594&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74594&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74594&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74594&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74594&r=support Expected behavior: https://bugs.php.net/fix.php?id=74594&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74594&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74594&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74594&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74594&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74594&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74594&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74594&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74594&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74594&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74594&r=mysqlcfg

« previous php.bugs (#209122) next »