Repository navigation
Description
Summary
When the zccache daemon dies mid-build during the all-with-examples alias target (245 test DLLs + 96 example DLLs linking in parallel), individual tests/<name>.dll link steps fail with lost connection to daemon. The build tool reports FAILED for those targets — but the downstream test runner does NOT treat the missing/stale DLL as a build error. It silently runs whatever .dll is on disk from a previous build, which can produce false test failures (and worse, false test passes in the opposite case).
This was discovered while debugging what looked like 9 audio test failures (fft, audio_reactive, deficiencies, vibe, vocal, beat, audio_processor, detectors, audio). Re-running each test in isolation after the daemon recovered showed all 9 pass. The original "failures" were assertions from stale binaries built before an unrelated math.cpp.hpp edit that prompted the run.
What the log looks like
Detected stale lock 'build:libfastled_build' (dead PIDs: [66680]). Removing...
...
[BUILD] Linking tests...
[BUILD] [6/316] Linking target .build\meson-quick\tests\fl_audio_audio_reactive.dll
...
FAILED: [code=1] tests/fl_audio_audio_reactive.dll
"...\zccache.exe" "...\ctc-clang++.exe" -o tests/fl_audio_audio_reactive.dll ...
zccache[err][R]: lost connection to daemon (no response). The daemon may have crashed
or been killed mid-request — run `zccache status` to check, or
`zccache stop` then retry to restart it.
[7/316] Linking target tests/fl_audio_url.dll
FAILED: [code=1] tests/fl_audio_url.dll
... (same pattern for 9+ DLLs)
[MESON] Some tests failed (0/0 tests in 92.31s)
[MESON] Test failure details (9 tests): ...
FAIL: audio::Sample - rms for known signal at ...:405
...:420: 500042.64 < 9000.00
Note (0/0 tests in 92.31s) — runner reports zero tests built, but then dumps 9 tests worth of stale assertion output. The disconnect is the bug.
Why it is worse than a noisy log
- False-failure direction: wastes investigation time. Stale binary fails new assertions, looks like the diff broke something it did not.
- False-pass direction (more dangerous): if the diff would have caused a new assertion failure but the link silently failed, the stale binary passes its old assertions and green-lights a broken change.
- Compounds with hooks: the project Stop hook auto-runs tests when a session ends. A spurious failure cascade derails the entire session fix-all-errors recovery loop.
Reproduction
Likely race / load-driven, not 100 % deterministic. Triggers seen:
bash testinvocation that hits theall-with-examplesalias (default for the stop hook)- Daemon dies under the parallel-link storm (~245 test DLL link invocations + 96 example DLLs racing against one daemon)
- Pre-existing stale lock from a prior crashed build (
Detected stale lock 'build:libfastled_build') seems to correlate
Environment where observed:
- Windows 10 Pro 10.0.19045
- zccache v1.12.1 (protocol v15)
- clang-tool-chain
- Build parallelism at host default (16 on this machine)
Suggested fixes (pick one or stack)
- Make the test runner fail hard when its DLL is missing or stale. Compare DLL mtime vs the build tool reported success; if the build tool said
FAILEDfortests/<name>.dll, refuse to run<name>.dll. This is the highest-leverage fix — it stops the false-pass/false-fail behavior independently of the underlying zccache flakiness. - Cap link parallelism for the
all-with-examplesalias. A pool withdepth = 4-8would dramatically reduce simultaneous daemon-bound link invocations without much wall-time cost (link is fast, the parallel storm is what hurts). - Auto-restart zccache on
lost connection to daemon— wrap the linker invocation in a retry-once shim that callszccache stopand retries when the daemon dies. Lower priority; address root cause instead.
Filed by Claude Code agent ([email protected]) on feat/lpc845-autoresearch-harness. Best-guess defaults; edit the body freely if assumptions are wrong.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
refactor(lpc): rename FL_LPC* macros to FL_IS_ARM_LPC_* per #2999 con…
fix(test-runner): refuse stale/missing DLLs in streaming path (closes #…
fix(wrap): auto-retry link/compile-ephemeral on lost-connection (#752) (
fix(wedge): probe daemon with Ping before sending Shutdown (#753) (#757)
fix(build): restore mtime and exec bit on zccache-served link results (…
fix(channels): give RP's two SPI blocks real device info (#4211)