You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Symfony 8 API running in worker mode (worker /app/public/index.php 4, symfony/runtime 8.1) dies with SIGSEGV after some uptime. The core dump's top frames are zend_unfinished_execution_gc ← zend_generator_get_gc ← gc_collect_cycles, called from symfony/runtime's FrankenPhpWorkerRunner, which runs gc_collect_cycles() after every request. The same application on regular (non-worker) threads never crashes. Serving the crashing endpoint has nothing special about it: no fibers, no retained generators, no shutdown functions.
This is the mechanism described in #2621: accel_is_inactive() probes with POSIX fcntl locks, which never conflict inside one process, so the deferred opcache restart is carried out at the next RINIT on any thread while workers keep running. Workers never reach accel_post_deactivate, so their op_arrays and interned strings are recycled underneath them, and the next gc_collect_cycles() walks a live frame through stale pointers.
Version bisect on the same image line: 1.12.6 (which still has the reboot hook from #2364) does not crash for us; 1.12.7 (#2564 removed the hook) does. We do not load pecl_http, the extension behind the deadlock reports in #2568 that motivated the removal.
Why I am filing this
#2621 was closed on 2026-09-06 in favour of #2634 (the log line), with a note that field reports arrive as "segfault" or "slow" with nothing tying them to an opcache restart. This one is tied to it: worker mode + an opcache restart + a GC pass after the request = SIGSEGV, reproducible on 1.12.7, gone on 1.12.6. Is there an issue tracking the crash itself, and would the hook be acceptable behind an opt-in setting for deployments that do not load pecl_http, until php-src handles thread-safe restarts (php/php-src#22281)?
Workarounds that work for us
pin 1.12.6 (no pecl_http in the image), or
run the same app without the worker directive, or
size opcache.memory_consumption / opcache.interned_strings_buffer so a restart never happens (fragile: an invisible restart is exactly what fix: log and count opcache restarts #2634 addresses).
What happens
A Symfony 8 API running in worker mode (
worker /app/public/index.php 4, symfony/runtime 8.1) dies with SIGSEGV after some uptime. The core dump's top frames arezend_unfinished_execution_gc←zend_generator_get_gc←gc_collect_cycles, called from symfony/runtime'sFrankenPhpWorkerRunner, which runsgc_collect_cycles()after every request. The same application on regular (non-worker) threads never crashes. Serving the crashing endpoint has nothing special about it: no fibers, no retained generators, no shutdown functions.Environment
dunglas/frankenphp:1-php8.5-bookworm), PHP 8.5.9 ZTS, linux/arm64opcache.jit=function, otherwise default opcache settingspecl_http/raphfWhat we believe is going on
This is the mechanism described in #2621:
accel_is_inactive()probes with POSIXfcntllocks, which never conflict inside one process, so the deferred opcache restart is carried out at the nextRINITon any thread while workers keep running. Workers never reachaccel_post_deactivate, so their op_arrays and interned strings are recycled underneath them, and the nextgc_collect_cycles()walks a live frame through stale pointers.Version bisect on the same image line: 1.12.6 (which still has the reboot hook from #2364) does not crash for us; 1.12.7 (#2564 removed the hook) does. We do not load
pecl_http, the extension behind the deadlock reports in #2568 that motivated the removal.Why I am filing this
#2621 was closed on 2026-09-06 in favour of #2634 (the log line), with a note that field reports arrive as "segfault" or "slow" with nothing tying them to an opcache restart. This one is tied to it: worker mode + an opcache restart + a GC pass after the request = SIGSEGV, reproducible on 1.12.7, gone on 1.12.6. Is there an issue tracking the crash itself, and would the hook be acceptable behind an opt-in setting for deployments that do not load
pecl_http, until php-src handles thread-safe restarts (php/php-src#22281)?Workarounds that work for us
1.12.6(nopecl_httpin the image), orworkerdirective, oropcache.memory_consumption/opcache.interned_strings_bufferso a restart never happens (fragile: an invisible restart is exactly what fix: log and count opcache restarts #2634 addresses).