sandbox: run tini as PID 1 (init: true) so Chromium zombies get reaped
ci / gates (pull_request) Successful in 13s
ci / frontend (pull_request) Successful in 28s
ci / rust (pull_request) Failing after 1m20s
ci / e2e (pull_request) Has been skipped
ci / publish (pull_request) Has been skipped

Docker sandboxes run `sleep infinity` as PID 1. `sleep` never wait()s
on re-parented children, so Chromium's short-lived helper/crashpad
processes accumulate as zombies in long-lived browser sandboxes. With
`pids_limit` set, this eventually exhausts the slot and the container
can no longer fork — the browser tool starts failing before it looks
"unhealthy" anywhere else.

Setting HostConfig.init = Some(true) makes Docker inject tini, which
reaps re-parented children.

Note: existing sandbox containers keep their old spec (init is set at
create time). Cycle them post-deploy to pick up tini.
This commit is contained in:
Omar Sobh
2026-07-11 11:30:26 -07:00
parent 212e68f6b1
commit 9a5e24eeba
+5
View File
@@ -133,6 +133,11 @@ impl SandboxDriver for DockerDriver {
memory: Some(spec.memory_bytes),
nano_cpus: Some(spec.nano_cpus),
pids_limit: Some(spec.pids_limit),
// Run tini as PID 1 so it reaps re-parented children (Chromium
// spawns short-lived helper/crashpad processes). `sleep infinity`
// never wait()s, so without this they accumulate as zombies and
// eventually exhaust `pids_limit` in long-lived browser sandboxes.
init: Some(true),
..Default::default()
};
let body = ContainerCreateBody {