Problem
#497 documented a host OOM incident: parallel docker run … ./script/ci-fast.sh containers with memory_limit=-1 in src/cli.php let bin/vm.php children grow to 40+ GiB RSS. The issue is closed as design accepted, but the repo still has:
ini_set('memory_limit', '-1') in src/cli.php
PHP_COMPILER_CI_RAM_GB ulimit applied only before LLVM phases (not VM/fast CI)
- No
script/ci-docker-safe.sh wrapper with docker run -m …
#500 tracks profiling; this issue ships the caps.
Goal
Bounded, predictable memory for local/Docker CI without relying on GitHub Actions.
Scope
Acceptance criteria
make docker-build-22
./script/ci-docker-safe.sh ./script/ci-fast.sh
- No
memory_limit=-1 in CI subprocesses (grep php -i inside container)
- Parallel-run warning prints when a second CI container starts
- Full gate still passes:
./script/ci-docker-safe.sh ./script/ci-local.sh
Verification (local / Docker only)
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev ./script/ci-fast.sh
Do not add .github/workflows/*.
Dependencies
Related
Problem
#497 documented a host OOM incident: parallel
docker run … ./script/ci-fast.shcontainers withmemory_limit=-1insrc/cli.phpletbin/vm.phpchildren grow to 40+ GiB RSS. The issue is closed as design accepted, but the repo still has:ini_set('memory_limit', '-1')insrc/cli.phpPHP_COMPILER_CI_RAM_GBulimit applied only before LLVM phases (not VM/fast CI)script/ci-docker-safe.shwrapper withdocker run -m …#500 tracks profiling; this issue ships the caps.
Goal
Bounded, predictable memory for local/Docker CI without relying on GitHub Actions.
Scope
ci_prepare_test_runtimeinscript/ci-common.sh— set finitememory_limitfor VM/compliance (e.g.1536M), higher cap for LLVM phases (e.g.4096M)ci-fast.shandci-local.sh(before PHPUnit)PHP_COMPILER_CI_RAM_GB→ 8 GiBulimit -v(down from 30) with README notescript/ci-docker-safe.sh— wrapsdocker run -m 10g --cpus …+ warns if anotherphp-compiler:22.04-devCI container is runningmake test-docker-safe(optional alias)Acceptance criteria
memory_limit=-1in CI subprocesses (grepphp -iinside container)./script/ci-docker-safe.sh ./script/ci-local.shVerification (local / Docker only)
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev ./script/ci-fast.shDo not add
.github/workflows/*.Dependencies
Related