Verify containers share cargo's package-cache lock: the shared volume is CARGO_HOME, and the wrapper retry goes
A registry-only mount at /usr/local/cargo/registry left the package-cache lock under CARGO_HOME=/usr/local/cargo in each container's own layer, so sibling containers (cargo-mutants stages, concurrent ygg-verify jobs) shared no lock and removed each other's half-unpacked crate directories. Reproduced on Yggdrasil from an empty registry: 15 of 18 containers failed with a registry mount, 15 of 18 with RUSTC_WRAPPER= too, 0 of 18 with the volume as CARGO_HOME. ygg-verify.sh and cargo-mutants.sh mount eureka-cargo-home at /cargo-home and set CARGO_HOME and PATH for the rust image. Removed: the retry without RUSTC_WRAPPER, its note and diag plumbing, and its two tests and the FAKE_CM_DEADWRAP switch. Kept: container errors tail 25 lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e1e7962238
commit
83b00d2f54
4 changed files with 15 additions and 33 deletions
|
|
@ -20,7 +20,7 @@
|
|||
# the commit out detached. It is a real clone, not a worktree, because a
|
||||
# worktree's .git file points at a host path the container cannot see.
|
||||
# 3. Runs <command> in <image> under a CPU and memory cap, niced. Each
|
||||
# toolchain gets one shared registry cache. The build output directory
|
||||
# toolchain gets one shared cargo home (registry and package-cache lock). The build output directory
|
||||
# stays inside the work directory and is never shared between checkouts.
|
||||
# CARGO_TARGET_DIR is deliberately NOT set: cargo's default (<workspace>/
|
||||
# target) is already inside /src, and forcing it made cargo-mutants' --jobs
|
||||
|
|
@ -405,10 +405,14 @@ else
|
|||
# Priority is set inside the container: nice on the docker client does not reach a process
|
||||
# containerd starts. Jobs run at nice 10 and idle IO class, so the swarm's daemons and turns
|
||||
# on the same disk go first (2026-10-31: three verify jobs held IO pressure at ~75% full).
|
||||
# Cargo's package-cache lock lives in $CARGO_HOME, so the shared volume is CARGO_HOME itself: a registry-only mount left the
|
||||
# lock in each container's layer and sibling containers unpacking one crate removed each other's directories (2026-11-03).
|
||||
# PATH restates the image's; only the rust image needs it.
|
||||
case $image in eureka-verify-rust:*) cargo_env=(-e CARGO_HOME=/cargo-home -e PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin) ;; *) cargo_env=() ;; esac
|
||||
sudo docker run --rm --name "$cname" --label "$label" --cpus="$cpus" --memory="$mem" \
|
||||
-v "$work:/src" -v /etc/machine-id:/etc/machine-id:ro \
|
||||
-v eureka-cargo-registry:/usr/local/cargo/registry -v eureka-nuget:/root/.nuget/packages \
|
||||
-v eureka-sccache:/sccache \
|
||||
-v eureka-cargo-home:/cargo-home -v eureka-nuget:/root/.nuget/packages \
|
||||
-v eureka-sccache:/sccache "${cargo_env[@]}" \
|
||||
-e BASH_ENV=/tmp/.ygg-bash-env ${nonce:+-e YGG_NONCE=$nonce} \
|
||||
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0='*' \
|
||||
$docker_args \
|
||||
|
|
|
|||
Loading…
Reference in a new issue