Repository navigation
fix(ci): the coverage job still restores the poisoned duckdb tree - #425
Merged
Merged
Conversation
#424 cured the seven compile jobs by deleting rust-cache. `coverage` is the one job that keeps it — deliberately, since an instrumented cold build has no cache to fall back on and `llvm-cov` already measures 22m10 warm against a 60-minute timeout — so it is the one place the poisoning survives. It has not fired yet, and the reason is a dated prediction rather than luck: #376 bumped duckdb at 01:07 today, after that day's nightly. Tonight's scheduled run therefore gets a NEW source-tree key, unpacks cleanly, passes, and SAVES the stripped tree. The run after that restores it and dies before a test. As ever the breakage does not land on the run that caused it. Also corrects the mechanism in the seven `# No rust-cache` comments. They say a restored target carries a populated `build/libduckdb-sys-*/out`, which is where I sent two wrong fixes: `libduckdb-sys` does not unpack into `OUT_DIR` at all. `src/build_paths.rs:40` walks UP from it to a tree shared across the target dir, `target/duckdb-sources/<key>/`, guarded by a `.complete` dotfile. Absent sentinel, the script unpacks to a staging dir and `fs::rename`s it over `<key>/` — ENOTEMPTY, Linux errno 39. `fs::rename` in `publish()` is the only syscall in that function that can return 39, so the panic's "unpacking bundled DuckDB sources" names the wrong operation. The deleting fix does not depend on that distinction, but the comments explain why rust-cache is absent, and someone re-adding a target-dir cache will read them. The repair's own condition is the build script's precondition, so an intact tree keeps the fast path, and it echoes per tree because both earlier attempts went green having done nothing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin
force-pushed
the
bm/ci-duckdb-outdir
branch
from
November 3, 2026 02:37
e6d0334 to
00ef1d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#424 fixed seven of eight restoring jobs
#424 cured the compile jobs by deleting rust-cache, and that is the right fix for them.
coverageis the one job that keeps rust-cache — deliberately, for the reasons written at its own call site: an instrumented cold build has no cache to fall back on,llvm-covownsRUSTFLAGSso every unit including dependencies rebuilds, and the step already measures 22m10 warm against a 60-minute timeout. Dropping its entry trades 1.8 GiB for a timeout failure.So it is the one place the poisoning survives, and it needs the repair rather than removal.
It has not fired yet, and that is a prediction rather than luck
coverageruns onschedule/workflow_dispatchonly, and its key includeshashFiles('rust/Cargo.toml').Breakage does not land on the run that caused it — the same property that made this look like each PR's own fault.
The mechanism, and the correction to seven comments
The
# No rust-cachecomments say a restoredtarget/carries a populatedbuild/libduckdb-sys-*/out. That is where I sent two wrong fixes, and it is not where the sources live:libduckdb-sysdoes not unpack intoOUT_DIR.src/build_paths.rs:40walks up from it to a tree shared across the whole target dir:target/duckdb-sources/<key>/..completedotfile is the sentinel. Present → early return. Absent → unpack to a fresh staging dir, thenfs::renamethat over<key>/.fs::renameinpublish()is the only syscall in that function that can return 39 — the staging dir is uniquely minted, soarchive.unpackcannot — and the?carries it to an.expect("unpacking bundled DuckDB sources")atbuild_bundled_cc.rs:65.So the panic text names the wrong operation. The poisoned state is a populated
<key>/with no.complete, which is what a cache round-trip leaves behind.The deleting fix does not depend on that distinction. The comments do: they are what someone re-adding a target-dir cache will read.
Why the repair goes after the restore
rust-cache writes the cache in its post-step, after every step this workflow can declare. Cleaning before the save is impossible, so repairing after the restore is the only place that works.
The condition tested is exactly the build script's own precondition, so an intact tree is left alone and keeps the fast path. Dropping one costs the tarball unpack (seconds), not the compile (minutes) — the C++ objects come from sccache.
Verified against the real failing state
An earlier revision of this branch applied the same step to all eight jobs and was observed fixing a genuinely poisoned restore, which is what confirms the diagnosis rather than a cold-cache coincidence:
That distinction matters here: #422's green run was green because its entry was momentarily empty, and I reported it as confirmation. A cold cache passing is not evidence about a poisoned-cache failure.
The step echoes
intact/REPAIRED/noneper tree for the same reason — both earlier attempts went green having done nothing, and one of them printed the.ofiles it removed while the panic still happened.🤖 Generated with Claude Code