Skip to content

Foundation: Zend gen-0 of compiler_minimal hangs after compiletofile_done (link gate never finishes) #31726

Description

@PurHur

Category

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
Manual ./build/selfhost compiler_minimal bundle OK (exit 0)

php-src reference

N/A (compiler pipeline / AOT teardown). Related history: #21925 (intermittent post-OK abort), #31714 (16g remount).

PHP implementation target

  • 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolingTooling / CI / docsbugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions