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
build: zccache in a persistent Docker volume treats a reused PID from an earlier container as a live daemon #3383
In a docker_task.py container whose ZCCACHE_CACHE_DIR is on a persistent volume (the zccache stack volume, or any dir under /build), every compile fails with exit 125 from the second container onwards:
zccache[err][D]: daemon unavailable at /build/zccache-3191/v1.15.5/daemon-v1.15.5.sock (cannot start daemon ...: daemon recovery already failed on this cache root and is in its cool-down: daemon process 403 exists but not accepting connections after retrying)
Cause (observed)
v1.15.5/daemon.running-process.json records the daemon as pid plus boot_id. Every container shares the host's boot_id, but each starts a fresh PID namespace. The daemon from container 1 was pid 403. In container 2, pid 403 belongs to some other process, so zccache decides the daemon still exists but isn't listening. It writes daemon-v1.15.5.lock.spawn-failed (cooldown_ms: 60000) and refuses to start a new daemon, so the whole build fails.
Reproduced three times in a row on 2026-11-01 with a fresh cache dir: the first container builds, and every later one fails. Deleting daemon-*.lock, *.spawn-failed, daemon.running-process.json and the socket before the build fixes it.
Impact
Local container builds on shared machines: docker_task.py with --stack-volume zccache:/zccache (the documented #3260 workflow). On 2026-11-01 the shared zccache volume was stuck in this state, which blocks every worker using it. CI runners start each job on a fresh volume and are not affected.
Proposed fix
Local workaround in this repo: docker_task.py (or the container entrypoint) removes the daemon's runtime state files under ZCCACHE_CACHE_DIR/v*/ at container start. No daemon from an earlier container can be alive in a new PID namespace.
Upstream: zccache should identify the daemon by PID-namespace inode plus pid (or check the socket connect) instead of boot_id plus pid. I'll file that on zccache once this is confirmed.
Activity
zackees commentedon Nov 1, 2026
Upstream issue: forge-ci/zccache#2035. The local workaround is #3384.
ci(docker-task): clear a dead zccache daemon's state before the task (o…