Repository navigation
Description
Location
rust/tools/linux-validate/run.sh (the tier2-linux lane of ci/local_gate.py) reuses a per-checkout build volume (obs-rust-linux-validate-build-<id>). In that tree, ninja has zero recorded header dependencies for 11 objects, all of them libobs unity groups or the libobs PCH:
$ ninja -t deps | grep '#deps 0,'
libobs/CMakeFiles/libobs-objects.dir/cmake_pch.h.gch: #deps 0
libobs/CMakeFiles/libobs-objects.dir/build/libobs.core+.h.c.o: #deps 0
libobs/CMakeFiles/libobs-objects.dir/build/libobs.core-source+.h.c.o: #deps 0
libobs/CMakeFiles/libobs-objects.dir/build/libobs.core-output+.h.c.o: #deps 0
libobs/CMakeFiles/libobs-objects.dir/build/libobs.graphics+.h.c.o: #deps 0
libobs/CMakeFiles/libobs-c-reference.dir/build/libobs.ported-util+.h.c.o: #deps 0
... (11 in all)
Every other object has its usual 15-660 deps. build.ninja does set DEP_FILE for these objects, and they are compiled through LAUNCHER = zccache.
Effect
An edit to any .c.h that one of these unity files includes never triggers a recompile. Tier 2 then runs the new tests against the old libobs and reports a wrong RED/GREEN.
Seen while working on #2185:
libobs.so.30in the volume stayed at 19:38 UTC through four runs after edits tolibobs/obs-source-transition.c.h.- A temporary
fprintfadded there never appeared, and its string isn't in eitherlibobs.so. - Touching
libobs/build/libobs.core-source+.h.cforced a recompile, which then failed with redefinition errors fromobs-internal.h. That fits the PCH (also#deps 0) being stale as well.
CI is not affected (fresh build trees). The local gate stamp is affected: it can attest Tier 2 for a commit whose libobs changes were never compiled.
Likely cause (unverified)
On a cache hit, zccache restores the .o but not the -MD -MF depfile, or writes an empty one. Ninja then records 0 deps for that edge. Objects whose last compile was a miss keep their deps, which explains why only some objects are affected.
Proposed fix and failing test
- RED: in a scratch tree, build libobs twice through zccache, the second time from a warm cache in a fresh build dir.
ninja -t depsforlibobs.core-source+.h.c.othen shows#deps 0. Alternatively: edit a.c.hand check thatninja -n libobsschedules no rebuild. - GREEN: zccache restores (or regenerates) the depfile on a hit, so the object lists its headers and the edit schedules a rebuild. If zccache can't be fixed quickly,
validate.shcould detect#deps 0edges after the build and fail, or force--clean.
Workaround: rust/tools/linux-validate/run.sh --clean.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 24, 2026
Claiming: #2244. 1) reproduce with zccache directly: compile a file with -MD -MF twice through zccache, cold then warm, and check the depfile on the hit; 2) if zccache drops it, file that upstream (zackees/zccache) with the repro, and land a guard here so Tier 2 can't test stale libobs: validate.sh fails, or rebuilds, when ninja records 0 deps for an object it compiled; 3) RED/GREEN for the guard.
tier2: rebuild objects ninja recorded with no header dependencies (ob…
zackees commentedon Oct 26, 2026
Status of the claim plan:
-MT/-MF, and 64 parallel compiles over four rounds (none missing or empty when the client returned). The bug is real, though. Build volume…-e829c156d95d(last built 2026-10-21) has#deps 0for libcaption, glad,libobs.nsgif, two PCHs and a cmocka stub, all written in one 1.5 s window at the start of the build.drop-depless-objects.shdeletes#deps 0objects before each Tier 2 build, so the local gate can no longer test stale libobs. The three volumes built since (2026-10-25) have no#deps 0entries.Nothing more is needed here. The root cause is tracked upstream, so I'm closing this.