Skip to content

infra(windows): zccache daemon balloons + locks; PATH-version mismatch breaks fbuild builds #2853

Closed

Description

@zackees

Symptom

On Windows, repeated fbuild build invocations against a working tree that has cumulatively drifted from the last cached build (e.g. after git pull brings in many master commits at once) leave the zccache daemon in an unrecoverable state:

build error: build failed: compilation failed for ...\src\main.cpp:
zccache[err][R]: lost connection to daemon (no response). Often a daemon-CLI protocol version mismatch - try `zccache stop`

And separately:

zccache[err][C]: cannot connect to daemon at \.\pipe\zccache-<user>:
I/O error: cannot connect to daemon at \.\pipe\zccache-<user>:
all pipe instances busy after 50 retries (~12s).
The daemon may be overloaded — reduce parallel compilation jobs or restart the daemon with `zccache stop && zccache start`

Reproduced multiple times in a single /loop session against FastLED/FastLED master after merging ~10 PRs of upstream churn between local builds. Once the daemon enters this state:

  • zccache stop reports daemon stopped but a new zccache start fails with failed to start daemon: daemon started but not accepting connections after 10s and daemon not running at \.\pipe\zccache-<user>: I/O error: The system cannot find the file specified. (os error 2).
  • The daemon process (zccache-daemon.*.exe) is observed using 5.4 GB of RAM (tasklist mem column) while the build sits at zero compilation progress for 5+ minutes.
  • Killing the daemon process via PowerShell Stop-Process -Force is the only reliable recovery; rebuilding takes 15+ minutes because the cache is effectively cold.

Secondary issue: two zccache versions on PATH

Independent of the lock, this session had two zccache binaries racing on PATH:

  • C:\tools\python13\Scripts\zccache.exe — v1.11.8 (older, system-wide)
  • <repo>\.venv\Scripts\zccache.exe — v1.11.14, then upgraded to v1.11.15 (newer, project venv)

The daemon endpoint (\.\pipe\zccache-<user>) is shared between them. After running zccache stop (which picked up the system v1.11.8) and zccache start (which picked up the venv v1.11.14), the status output showed v1.11.8 was still serving — i.e. one of them re-started a stale daemon under the same pipe name. Cross-version state corruption is a plausible cause of the lock-up above.

Reproduction (sketch)

  1. Clean checkout of FastLED master.
  2. Set up project venv as usual; install via uv pip install -e . (pulls fbuild 2.2.17, zccache 1.11.14).
  3. Confirm a second zccache is on PATH ahead of (or behind) the venv version (typical for users with clang-tool-chain installed globally).
  4. Run uv run python -m ci.ci-compile esp32dev --examples Blink against a stale build tree (e.g. after a multi-PR git pull --ff-only).
  5. Observe failure within seconds of first compile invocation; observe daemon RAM growing in tasklist while build sits idle.

Suggested fix surface

Two angles, either one would close the user-visible bug:

  1. Project side — at fbuild invocation time, prefer the venv-installed zccache.exe and refuse to fall through to a stale system one. Possibly via the get_fbuild_executable()-style helper already in ci/util/fbuild_runner.py.
  2. Upstream — file at FastLED/zccache (or wherever zccache lives) for the daemon-balloon + locked-pipe behaviour itself. Worth a separate root-cause investigation; the FastLED-side workaround alone is sufficient unblock.

Workaround used during this session

Get-Process -Name 'fbuild*','zccache*' -ErrorAction SilentlyContinue |
  ForEach-Object { Stop-Process -Id $_.Id -Force }

Followed by a from-cold rebuild. Loses 15+ minutes per occurrence.

Scope

Part of a small infra sweep tracked at #2855.

🤖 Filed by Claude Code via /goal session

Activity

  1. moved this from Triage to Done in FastLED Trackeron Jun 6, 2026
  2. added a commit that references this issue on Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions