[php-src] Issue #14471: Crash with opcache_reset() under high load in fpm

From: Date: Tue, 04 Jun 2024 21:18:10 +0000
Subject: [php-src] Issue #14471: Crash with opcache_reset() under high load in fpm
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247032@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14471 Author: nielsdos ### Description The following code: ```php <?php class T { } new T; opcache_reset(); ``` Executed under php-fpm with the following fpm configuration: ``` [global] error_log = /tmp/php-fpm-error_log.txt [www] listen = 127.0.0.1:9000 pm = static pm.max_children = 20 ``` Ran using: valgrind ./php-fpm -F with opcache enabled. Put under load with: ab -c 24 -n 200000 http://localhost/index.php` Resulted in this output: ``` ==150641== Process terminating with default action of signal 6 (SIGABRT) ==150641== at 0x4CCDE44: __pthread_kill_implementation (pthread_kill.c:44) ==150641== by 0x4C75A2F: raise (raise.c:26) ==150641== by 0x4C5D4C2: abort (abort.c:79) ==150641== by 0x4C5D3DE: __assert_fail_base.cold (assert.c:94) ==150641== by 0x4C6DC66: __assert_fail (assert.c:103) ==150641== by 0x702B6D: zend_gc_delref (zend_types.h:1228) ==150641== by 0x70317D: zend_string_release_ex (zend_string.h:332) ==150641== by 0x708F6E: _php_stream_open_wrapper_ex (streams.c:2291) ==150641== by 0x6E412B: php_stream_open_for_zend_ex (main.c:1564) ==150641== by 0x6E407E: php_stream_open_for_zend (main.c:1552) ==150641== by 0x7B538F9: persistent_stream_open_function (ZendAccelerator.c:2520) ==150641== by 0x8514F6: zend_stream_open (zend_stream.c:88) ``` And some similar crashes, also got one crash on time in zend_accelerator_util_funcs.c in ZSTR_SET_CE_CACHE_EX(ce->name, ce, 0);. But I expected this output instead: ``` Obviously not that ``` ### PHP Version 8.2 ### Operating System _No response_

« previous php.bugs (#247032) next »