Repository navigation
Description
Symptom
bash test --cpp fails all tests without running any:
[1/383] x cled_controller FAILED
[MESON] Stale test artifact: .build/meson-quick/tests/cled_controller.so
DLL mtime (1788816732.21) predates this build's start (1788837138.54).
The current link likely failed and left a previous build's DLL behind --
running it would produce misleading results (see FastLED #3011).
Resolve the underlying link failure (`zccache stop` + retry usually clears
the daemon-crash variant) and re-run.
Ten such failures, then the runner halts early. This is #3011's guard firing. The guard is working as designed; the question is why it fires on a tree with no link failure.
What I verified
There is no link failure. The build log contains no FAILED:, link failed, lost connection, or ninja: build stopped. The only match for those patterns is the runner's own Failed: 10 summary. Linking progressed normally ([586/824] Linking target ...).
Not caused by any local change. Reproduced identically with my working changes stashed (clean tree, git status empty) -- same tests, same message.
The suggested remedies do not clear it.
zccache stop->daemon stopped, then the identical failure on retry.bash test --clean --cpp-> the failure moved from unit tests to examples (example-AdafruitBridge,example-ParallelSPI,example-MoodRing, ...), still 10 x "Stale test artifact".- Across all three runs the reported DLL mtime was unchanged (
1788816732.21), i.e. the artifacts are not being relinked.
The artifacts really are old. cled_controller.so and fastled_core.so both carry mtime 1788813865 (13:44), while the failing build started at 1788837394 (20:16) -- about 6.5 hours earlier.
But an earlier run passed with those same artifacts. A bash test --cpp at 14:33 reported 385/385 unit + examples passed with Compilation | 0.34s, i.e. mostly up-to-date, against artifacts already carrying the 13:44 mtime. So "artifact older than build start" is not by itself sufficient to trigger this.
One possibly relevant log line, offered as an observation and not a diagnosis:
[BUILD] Stabilized 2 output mtimes (zccache mtime fix)
zccache deliberately normalises some output mtimes, which is the kind of thing that could interact with an mtime-vs-build-start check. I did not establish that it is the cause and am not claiming it.
What I am not claiming
I could not identify the trigger. The difference between the 14:33 pass and the 20:16 failure is not accounted for by anything I measured, and I would rather leave that open than guess at it.
Why it matters
bash test is unusable on this bench, and the failure presents as "your change broke 10 tests". It cost a stash/restore cycle and a full --clean rebuild to establish that a src/fl/channels/bus_info.h change was unrelated -- the first plausible reading of the output is that the change is at fault. A message distinguishing "artifact older than build start" from "link demonstrably failed during this run" would make that call much cheaper; only the second warrants suspecting the current build.
Environment
NixOS, zccache 1.13.22, quick mode, .build/meson-quick. Same bench as #4205 (link wrapper stripping exec bits from test executables), which is a separate fault that also presents as broken tests.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Sep 8, 2026
Sharper diagnosis, and it reproduces on a clean tree at merged master. Updating my original report, which said I could not identify a trigger.
Now reproduces without any local change
Clean checkout of
3ee4009a83(merge of #4208),git statusempty.bash test --cppstill fails with 10 x "Stale test artifact".--cleandoes not produce fresh artifactsci/meson/meson_setup_execute.py:523documents the intent:But after two separate
bash test --clean --cppruns, every artifact still carries its original mtime:Roughly 7 hours old, unchanged across every run. Unit tests and examples alike.
Likely mechanism (evidence-backed, but see the caveat)
If
--cleanreally wipes the inner build dir, these files cannot have been preserved -- they must have been restored. That points at zccache returning cached link outputs together with their original mtimes. The build log states it does manipulate output mtimes:which would produce exactly this: a successful build whose outputs legitimately predate the build's start, and a #3011 guard that reads "mtime older than build start" as "the link failed and left an old DLL behind". Both components are individually correct; the interaction is what fails.
One thing this still does not explain
A run at 14:33 today reported
385/385 unit + examples passedwithCompilation | 0.34sagainst artifacts already carrying the 13:44 mtime. If "mtime predates build start" were sufficient on its own, that run should have failed too. Something else gates whether the guard fires, and I have not identified it. Flagging the gap rather than papering over it.A second, different failure from the same build state
Before the clean, the same tree produced compile errors instead:
bus_info.hhas#pragma onceand the test includes it normally (directly, and transitively viabus_info.json.h).#pragma oncededupes by file identity, so a redefinition here suggests the same header resolving under two different paths -- possibly related to theNormalized private include paths for zccache strict modestep.bash test --cleancleared this one (0 occurrences afterwards) while leaving the stale-artifact failure intact.Suggested handling
Either way the current behaviour makes
bash testunusable here and presents as "your change broke 10 tests", which is what cost me a stash/restore cycle and two full clean rebuilds to disprove.zackees commentedon Sep 8, 2026
Correction to my previous comment, plus a confirmed sibling bug.
I said above that the stale-artifact failures were explained by zccache restoring outputs with their original mtimes. That mechanism is real, but I overstated how much it explains — I found and fixed a concrete bug in the stabilizer and the failures still recurred. Correcting that here rather than leaving it standing.
Confirmed bug (fixed in #4213)
ci/meson/mtime_stabilizer.py, the module whose entire purpose is repairing this, globbed only:Linux emits
.so, macOS.dylib. Measured against the live build dir: 0 of 383 outputs matched. The module was a silent no-op on two of three hosts._KEY_INPUTShad the same flaw — it looked forfastled.dll.p/fastled.dll.symbolswhen the file isfastled.so.p/fastled.so.symbols, so the only input mtime it ever found waslibcrash_handler.a.Fixed by deriving both from
("dll", "so", "dylib"). Verified: 0 → 383 matched, symbols file resolves.Why that does not close this issue
The two components test different things:
A cache-restored output can satisfy the first and still fail the second. So fixing the stabilizer's glob was necessary but not sufficient, and I have not established that the mtime path is the whole story for the guard failures. Flagging the gap rather than declaring victory.
Confirmed sibling: the same restore also drops the executable bit (#4205)
Chasing a different failure on the same tree —
ERROR: Unhandled python OSError ... return code 13— turned up:A build-dir survey found 4 ELF executables, 4 without
+x, 0 with it. So a zccache-served link loses both the mtime and the mode. That makes the underlying defect a good deal more concrete than "something restores old mtimes": cached link results come back without the attributes the linker sets, and each lost attribute fails the build in its own way.Suggested handling (unchanged)
🤖 Generated with Claude Code
https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51
fix(build): restore mtime and exec bit on zccache-served link results (…