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
Foundation: Zend gen-0 of compiler_minimal hangs after compiletofile_done (link gate never finishes) #31726
Foundation: · bootstrap-selfhost-link · Zend gen-0 fallback hang
Problem
When committed prelinked/bootstrap-gen0 is lowering-fingerprint stale, ./script/bootstrap-selfhost-gate.sh link falls back to Zend AOT of test/selfhost/compiler_minimal/main.php. Under PHP_COMPILER_DOCKER_MEM=16g the emit succeeds (build/selfhost runs and prints compiler_minimal bundle OK) and progress reaches runtime_standalone_compiletofile_done, but php bin/compile.php never exits — it stays at ~100% CPU / ~4.7 GiB RSS for 15+ minutes after the artifact is stable. The link gate therefore never reaches the smoke loop or prints bootstrap-selfhost-link: OK.
Probed 2026-08-17 on master @81c0eecf41 (post-#31725).
Step
Result
Default 10g docker mem
Fail-fast #31714 (expected)
Remount 16g + Zend gen-0
Artifact written + runs OK; compile.php hung after compiletofile_done
bin/compile.php / lib/AOT/ / lib/JIT/ path after runtime_standalone_compiletofile_done — must exit 0 once -o artifact is linked
Optionally script/bootstrap-resolve-compile-invoke.sh / link gate: treat stable executable + progress marker as success with a bounded wait (do not hang forever)
No new runtime/*.c
Repro
docker info >/dev/null
# ensure gen-0 fingerprint is stale (normal tip drift)
PHP_COMPILER_DOCKER_MEM=16g PHP_COMPILER_DOCKER_MEM_SWAP=16g \
./script/docker-exec.sh -- bash -lc './script/bootstrap-selfhost-gate.sh link'# observe: build/selfhost becomes runnable while php bin/compile.php continues at 100% CPU
Done when
Zend gen-0 of compiler_minimal exits 0 shortly after writing a runnable -o binary
./script/bootstrap-selfhost-gate.sh link at 16g prints bootstrap-selfhost-link: OK (or native gen-0 path when fingerprint fresh)
No fingerprint restamp; php-src-strict N/A (tooling/pipeline)
Fix:_exit(0) at end of Runtime::standalone() after successful selfhost compileToFile, before JIT Context destructor (LLVM teardown hang / #21925 abort).
Verified:SelfhostAotFastExitTest OK; tiny test/selfhost/ AOT exits with progress runtime_standalone_fast_exit.
Activity
PurHur commentedon Aug 17, 2026
claim: lane-B compile/link implementer — starting this run (bootstrap fallback; first red was #31714@10g, then Zend hang after successful emit)
PurHur commentedon Aug 17, 2026
claim: lane-B implementer — continuing #31726 (post-compiletofile_done hang; investigating _exit before LLVM/PHP teardown)
Foundation: fast-exit selfhost AOT before LLVM context teardown (#31726…
PurHur commentedon Aug 17, 2026
Merged #31741.
Fix:
_exit(0)at end ofRuntime::standalone()after successful selfhostcompileToFile, before JIT Context destructor (LLVM teardown hang / #21925 abort).Verified:
SelfhostAotFastExitTestOK; tinytest/selfhost/AOT exits with progressruntime_standalone_fast_exit.PurHur commentedon Aug 17, 2026
Merged #31742
Verification
./script/phpunit.sh --filter SelfhostAotFastExitTest— OK (6)rc=0in ~14s afterruntime_standalone_compiletofile_donePHP_COMPILER_DOCKER_MEM=16g PHP_COMPILER_DOCKER_MEM_SWAP=16g ./script/docker-exec.sh -- bash -lc './script/bootstrap-selfhost-gate.sh link'→bootstrap-selfhost-link: OK/compiler_minimal bundle OK(clean_exit; watchdog not needed)Fix: warm libc
_exitbefore LLVM; exit immediately after successful selfhost emit; Zend invoke watchdog as backup.Foundation: fast-exit Zend gen-0 after selfhost AOT emit (#31726)
Foundation: fast-exit Zend gen-0 after selfhost AOT emit (#31726) (#3…
PurHur commentedon Aug 17, 2026
Follow-up merged: #31742 (on top of #31741)
Hardening beyond the initial
_exitinRuntime::standalone:lib/AOT/AotEmitFastExitwarms libc_exitvialibc.so.6before LLVM FFI growsbootstrap_compile_invoke_zendpost-emit hang watchdog (BOOTSTRAP_SELFHOST_POST_EMIT_GRACE_SEC)Full link gate (this worker):
PHP_COMPILER_DOCKER_MEM=16g PHP_COMPILER_DOCKER_MEM_SWAP=16g ./script/docker-exec.sh -- bash -lc './script/bootstrap-selfhost-gate.sh link'→
bootstrap-selfhost-link: OK/compiler_minimal bundle OK/EXIT:0Split-TU: fast-exit after SPINE_CHUNK AOT emit (#36155) (#36234)