Verify containers share cargo's package-cache lock: mount the shared volume as CARGO_HOME #43
Loading…
Reference in a new issue
No description provided.
Delete branch "eureka-substrate/mutants-sccache"
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?
Cause: not sccache. The verify containers mount the shared volume
eureka-cargo-registryat/usr/local/cargo/registry, butCARGO_HOME=/usr/local/cargo, so cargo's package-cache lock ($CARGO_HOME/.package-cache) lives in each container's own layer. Sibling containers (cargo-mutants stages, concurrent ygg-verify jobs) therefore hold no common lock. Cargo unpacks a crate by removing a directory that lacks.cargo-okand extracting again, so one container removes a directory another is unpacking or building from. Registry dependencies compile with the package root as cwd, so rustc then fails to spawn ("could not execute process ... (never executed)", ENOENT).Reproduction, Yggdrasil,
eureka-verify-rust:b99d30ec441e, 6 containers started together on one 17-crate project, an empty throwaway registry per trial, 3 trials per configuration (18 containers each):RUSTC_WRAPPER=: 15 of 18 failed (the wrapper is irrelevant)CARGO_HOME, wrapper on: 0 of 18 failedThe reproduced symptom is the unpack-time form (
failed to unpack package,failed to open .../.cargo-ok); the compile-time ENOENT in the live logs is the same directory removal seen by a container already building. One live symptom, a dep-info file missing in a container's own target dir, is not explained by this and is not reproduced.Lock test: a container holding an flock on
$CARGO_HOME/.package-cacheof the shared volume made a second container'scargo fetchprint "Blocking waiting for file lock on package cache" and wait for it.Fix at the owner:
tools/stopgap/ygg-verify.shandtools/cargo-mutants.shmounteureka-cargo-homeat/cargo-homeand setCARGO_HOMEandPATH(restating the image's, since cargo's bin stays in/usr/local/cargo/bin) for the rust image. The retry withoutRUSTC_WRAPPER, its NOTE and diag plumbing and its two tests are gone; a failed build is red. Container errors keep a 25-line tail.Cost once: the new volume starts empty, so crates are downloaded again on demand (the old
eureka-cargo-registryholds 1.26 GB and is no longer mounted; remove it when convenient).tools/mutation-table.shhas the same registry-only mount and is not changed here.Proof: a one-file-pair scoped cargo-mutants run through ygg-verify with sibling stage containers on the cold volume, green, 14 mutants tested.
🤖 Generated with Claude Code
cargo-mutants.sh: retry a failed build once without the rustc wrapperto Verify containers share cargo's package-cache lock: mount the shared volume as CARGO_HOME