fix(ci): add --init to container jobs to reap zombie processes - #7848
Conversation
The job container uses `tail -f /dev/null` as PID 1, which never calls wait() to reap orphaned children. After npm ci / npm run build, dead child processes become zombies. The pre-agent safety check (pgrep -u node) sees them, but pkill -KILL cannot reap zombies, so the agent refuses to start. Adding `options: --init` makes Docker inject tini as PID 1, which properly reaps orphaned/zombie processes. Applied to both tmux-testing and verify container jobs.
|
Thanks for the PR! Template: the body uses Problem: observed bug with clear evidence. The linked failed run shows the pre-agent safety check tripping on zombie processes left behind by Direction: aligned. This is CI infrastructure hygiene — zombie processes blocking agent startup is a real operational problem on the self-hosted runners. Size: not applicable — no core module paths touched. Approach: minimal and correct. Moving on to code review. 🔍 中文说明感谢贡献! 模板:PR 正文使用了 问题:已观测到的 bug,有明确证据。关联的失败运行显示预检安全检查被容器内 方向:对齐。这是 CI 基础设施维护——僵尸进程阻塞 agent 启动是自托管 runner 上的实际运维问题。 规模:不适用——未触及核心模块路径。 方案:最小且正确。 进入代码审查 🔍 — Qwen Code · qwen3.8-max-preview Reviewed at |
Code ReviewIndependent proposal: given "zombie processes in Docker containers because PID 1 doesn't reap," the standard fix is Diff review: the PR does exactly this — adds No findings. Clean diff. TestingThis is a CI infrastructure change — no user-visible behavior to test in tmux. N/A for real-scenario testing. CI status at review time (commit
Windows/macOS tests and integration tests are skipped — expected for a workflow-file-only change. The ubuntu unit test suite is still running. The change cannot affect test outcomes (it only alters the container runtime config, not any application code), but waiting for green before approving. 中文说明代码审查独立方案: 针对"Docker 容器中 PID 1 不回收导致僵尸进程"的问题,标准修复是 Diff 审查: PR 正是这样做的——在两个容器 job 定义( 无发现。干净的 diff。 测试这是 CI 基础设施变更——无用户可见行为需要 tmux 测试。真实场景测试不适用。 审查时 CI 状态:ubuntu 单元测试仍在运行,Windows/macOS 测试和集成测试已跳过(仅工作流文件变更,符合预期)。改动不影响测试结果(仅改变容器运行时配置),但等待绿灯后再批准。 — Qwen Code · qwen3.8-max-preview Reviewed at |
|
Confidence: 5/5 — textbook fix for a well-understood Docker problem, two lines, clear evidence, nothing to second-guess. This is exactly the kind of PR I like to see: a real operational problem (zombie processes blocking agent startup on self-hosted runners), a linked failed run as evidence, and the minimal standard fix. Approval deferred until CI lands green on 中文说明置信度:5/5 — 针对已知 Docker 问题的教科书式修复,两行改动,证据清晰,无可置疑。 这正是我希望看到的 PR:真实的运维问题(僵尸进程阻塞自托管 runner 上的 agent 启动)、关联的失败运行作为证据、以及最小化的标准修复。 批准延迟至 CI 在 — Qwen Code · qwen3.8-max-preview Reviewed at |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Released in v0.21.1. |
|
This is just a release notification — PR #7848 ( ✅ completed |
Problem
The job container's PID 1 is
tail -f /dev/null(from the runner's--entrypoint "tail" ... "-f" "/dev/null").tailnever callswait(), so orphaned child processes fromnpm ci/npm run buildbecome zombies. The pre-agent safety check detects them:Failed run: https://github.com/QwenLM/qwen-code/actions/runs/30267953352/job/89983126665
Fix
Add
options: '--init'to thecontainer:config of bothtmux-testingandverifyjobs. Docker injectstinias PID 1, which properly reaps orphaned and zombie processes.Verified locally: