fix(ci): name the disk-exhaustion failure instead of crashing in the linker #500
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-740-ci-disk-headroom"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PMS-740. Makes the twice-seen linker crash describe itself, and captures the measurement that would have identified it the first time.
The failure this addresses
integration.ymlhas failed twice with every test binary dying at LINK time rather than any test failing (runs #3666 and #3719):rust-lldwrites its output through an mmap, so a filesystem that fills mid-write surfaces as SIGBUS inside the linker. It reads as a toolchain crash, and both occurrences were triaged by hand as a possible code defect before being ruled out.Root cause is confirmed, and it is the host
Measured on the runner host while investigating this:
Docker's data root, every container volume, the runner's workspace and the developer's home directory are one 875G filesystem, currently under 10G free. 233G of that is reclaimable Docker volumes, almost entirely unused cargo target caches. Details and the reclamation caveat (a bare
docker volume prunewould also takedev-mokosh-postgres-data-*, which is real data) are on PMS-740.Fixing the capacity is a host matter and is not what this PR does.
What this PR changes
Nothing about what is built or tested. Two additions to the job:
A precondition step fails the job when the workspace filesystem has under 25G free, naming runner capacity as the cause in one line rather than spending twenty minutes of compilation to reach a confusing crash. Verified against the current host state, where it correctly fires at 10G free. 25G is roughly twice the peak this suite's link stage has been seen to need; raise it if the suite grows rather than lowering it after a near miss.
A sampler records free space every 5 seconds for the life of the build and reports the low-water mark. This is the measurement both previous occurrences lacked: checking after a failed run always looked healthy (I measured ~130G free after run #3666) because the run's temporary output is released during cleanup, so the peak was never observed. When the build fails and that mark was under 5G, the log says so explicitly and points at the linker output.
Verification
The
df/awkparsing and the integer comparison were run directly on the runner host; the guard evaluates correctly and fires at the current 10G. YAML parses.check-runner-labels,check-oci-build-cache,check-migration-prefixesandcheck-migration-immutabilityall pass.Not run: the cargo gates. They need the very disk this PR is about, and the change is YAML-only with no Rust touched.
Note
The first CI run of this PR may well fail at the new guard rather than reaching the tests. That would be the guard working: the runner genuinely does not have the space today, and the point is that it now says so instead of crashing in the linker twenty minutes later.