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
{{ message }}
Repository navigation
bug(opcache): the first redefine() does not take effect when opcache is active in the process (RedefineLeakPlateauTest child) #242
Summary (corrected — originally mis-attributed to PHP 8.5.9)
With opcache active in the process, tests/HotSwap/scripts/redefine-plateau.php fails at the very first warm-up cycle: after ReflectionFunction::redefine($body), calling plateau_function() still executes the original body (warm-up dispatch failed). Without opcache the script is green.
Reproduced on PHP 8.4.19 and 8.4.24 (CI, PR #244's opcache-active runner job) and 8.5.9 — both lines, deterministic. Opcache in the child is the only variable.
Why it was first blamed on 8.5.9
The child spawn inherited opcache.enable_cli from php.ini. Ubuntu's PHP 8.5 package ships opcache.enable_cli=On while the 8.4 package ships Off, so a local master run failed and the local 8.4 run passed — which looked like a PHP-minor regression. PR #244's opcache-active CI job (which writes opcache.enable_cli=1 into php.ini, inherited by children) reproduced it on PHP 8.4.24 and exposed the real variable. Since #244 the child pins -d opcache.enable_cli=0 (with a TODO(#242) to unpin), so the leak measurement is hermetic; this issue tracks the underlying opcache bug.
Suspected area
Interesting contrast with the green OpcacheSupportMatrixTest leg, which redefines an opcache-shared function successfully: there the redefined function lives in a separate cached include, while plateau_function() is declared in the same cached file as the executing top level and the dispatch closures. Likely a stale resolution path (e.g. a run-time cache slot or call-site memoization inside the same shared script) that copy-out's bucket/name-cache repointing does not refresh. Needs a proper root-cause pass.
Found while enabling the opcache-active runner CI job (opcache epic). Companion opcache-in-child failure from the same runs: #243.
changed the title [-]bug(master): RedefineLeakPlateauTest fails on PHP 8.5.9 — first redefine() does not take effect ("warm-up dispatch failed")[/-][+]bug(opcache): the first redefine() does not take effect when opcache is active in the process (RedefineLeakPlateauTest child)[/+]on Aug 19, 2026
Activity
test: pin opcache off in the plateau and request-cycle children
[-]bug(master): RedefineLeakPlateauTest fails on PHP 8.5.9 — first redefine() does not take effect ("warm-up dispatch failed")[/-][+]bug(opcache): the first redefine() does not take effect when opcache is active in the process (RedefineLeakPlateauTest child)[/+]