Skip to content

broken build: unit tests windows — zccache daemon flakes on Windows runner mid-link #2805

Closed

Description

@zackees

Summary

The unit tests windows workflow (unit_test_windows.yml) is intermittently red on master. Current latest red run: https://github.com/FastLED/FastLED/actions/runs/27006203330.

This is the last README-listed badge from the sweep that hasn't been addressed:
✅ AVR family (#2780 merged) · ✅ STM32 GIGA (#2785 merged) · ✅ Apollo3 (#2788 merged) · ⏳ RP2040 (#2793 open) · ⏳ uno AVR8JS (#2800 open) · ⏳ size checks (#2804 open) · this: unit tests windows

Symptom

Two test DLLs intermittently fail to link (build-stage failure, not test execution):

529.74 [BUILD] FAILED: [code=1] tests/fl_math_trig8.dll 
529.74 [BUILD] zccache[err][R]: lost connection to daemon (no response).
              Often a daemon-CLI protocol version mismatch - try `zccache stop`
530.80 [BUILD] FAILED: [code=1] tests/fl_math_transform.dll 
530.80 [BUILD] zccache[err][R]: lost connection to daemon (no response).

The actual error is in zccache, the compiler-cache wrapper — its daemon drops the connection mid-link. The link command never actually runs to a real linker error.

This is flaky, not deterministic

unit_test_windows.yml history on master (last ~20 runs):

❌ 09:10  787de450d1
❌ 08:50  5d271671d1
✅ 08:30  8c87cbfddb   ← same source class as adjacent reds
❌ 08:17  a4bdea8458
❌ 08:14  a4c723308a
❌ 07:43  d471d94356
✅ 07:10  99ddad4487   ← also intermittently green
❌ 06:52  b5e51c3339
... (mostly red, occasionally green)

The same source class passes some runs and fails others — confirming this is an infrastructure-side flake, not a FastLED source bug. The two DLLs that fail are not consistent across runs either (they're just the ones that lost the race to the daemon dropping).

Hypothesis

The Windows hosted runner starts a fresh zccache daemon per job. Under heavy link load (many -shared -fsanitize=address ASan-instrumented DLLs linked in close sequence with libc++ + lld), the daemon's named-pipe IPC drops. The "protocol version mismatch" wording in the error is the daemon's catch-all for any connection-failure case, not necessarily a real version skew.

A recent commit (a27cbff8d0 — "chore(deps): bump zccache to >=1.11.11 (depfile-on-cache-hit fix) (#2742)") bumped zccache; the flakes appear to predate it though, so this is likely a longstanding Windows-runner issue rather than a regression from that bump.

Proposed mitigation (this PR)

The narrowest action that improves reliability without changing test behavior is to reset the zccache daemon at the start of the Windows job. The daemon's own error message recommends exactly this: "try zccache stop".

Add a Windows-only step in .github/workflows/template_unit_test.yml between the ./install step and the ./test ... step:

- name: Reset zccache daemon (Windows mitigation for FastLED#<N>)
  if: runner.os == 'Windows'
  shell: bash
  run: |
    # The zccache daemon's named-pipe IPC drops under heavy parallel
    # link load on Windows runners. Restart it cleanly so the build
    # starts with a known-good daemon state.
    zccache stop || true

This is a mitigation, not a guaranteed cure — true daemon-flake under load may still occur and need follow-up (retry-on-failure, daemon-less mode, or a deeper fix in zccache itself). But based on the daemon's own diagnostic recommendation it's the right first step.

Acceptance criteria

  • unit tests windows workflow goes green at a higher rate than the current ~30% success rate.
  • If flakes persist after this PR lands, follow-up should consider: pinning a specific zccache version, daemon-less mode, or per-job retry.

Out of scope


Filed via /loop README badge sweep — final unaddressed badge.

Activity

  1. moved this from Triage to Done in FastLED Trackeron Jun 5, 2026
  2. added a commit that references this issue on Jun 5, 2026
    069a04e
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