[php-src] Issue #8461: Segmentation fault in PHP 8.1

From: Date: Fri, 29 Apr 2022 12:53:42 +0000
Subject: [php-src] Issue #8461: Segmentation fault in PHP 8.1
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241325@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8461 Author: oleg-st ### Description The problem is quite difficult to reproduce. Need to change php files when running specific application in php-fpm. Steps to reproduce: 1) Turn on JIT, Opcache ``` opcache.jit_buffer_size=100M opcache.jit=1255 ``` 2) Extract [bugphp.zip](https://github.com/php/php-src/files/8590803/bugphp.zip) 3) Use ab to reach run.php from bugphp.zip: ```bash ab -n 5000 -c 20 http://localhost/run.php ``` Segmentation faults: ``` [29-Apr-2022 15:07:30] NOTICE: ready to handle connections [29-Apr-2022 15:07:33] WARNING: [pool www] child 338824 exited on signal 11 (SIGSEGV - core dumped) after 2.980459 seconds from start [29-Apr-2022 15:07:33] NOTICE: [pool www] child 338841 started [29-Apr-2022 15:07:33] WARNING: [pool www] child 338827 exited on signal 11 (SIGSEGV - core dumped) after 2.980157 seconds from start [29-Apr-2022 15:07:33] NOTICE: [pool www] child 338842 started [29-Apr-2022 15:07:33] WARNING: [pool www] child 338826 exited on signal 11 (SIGSEGV - core dumped) after 2.999109 seconds from start ``` Backtrace: ``` #0 0x00000000008a47d1 in ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST_HANDLER () at /home/Oleg.Stepanischev/php-src/Zend/zend_vm_execute.h:33346 #1 0x00000000008cdcd3 in execute_ex (ex=0x7fb8c7c14020) at /home/Oleg.Stepanischev/php-src/Zend/zend_vm_execute.h:58689 #2 0x00000000008cf41b in zend_execute (op_array=0x7fb8c7c67000, return_value=0x0) at /home/Oleg.Stepanischev/php-src/Zend/zend_vm_execute.h:60123 #3 0x00000000008231b3 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/Oleg.Stepanischev/php-src/Zend/zend.c:1792 #4 0x000000000078bbd4 in php_execute_script (primary_file=0x7ffdc50da360) at /home/Oleg.Stepanischev/php-src/main/main.c:2538 #5 0x00000000009901d9 in main (argc=2, argv=0x7ffdc50da578) at /home/Oleg.Stepanischev/php-src/sapi/fpm/fpm/fpm_main.c:1914 ``` Bisect found the commit that contains the problem: 4b79dba93202ed5640dff317046ce2fdd42e1d82 Disabling inheritance cache solves the problem. Possible related to https://github.com/php/php-src/issues/7817 ### PHP Version PHP 8.1 ### Operating System AlmaLinux release 8.5 (Arctic Sphynx)

« previous php.bugs (#241325) next »