Skip to content

release.yml: flock apt-get to serialize concurrent coin package jobs - #670

Merged
frstrtr merged 1 commit into
masterfrom
ci-steward/release-apt-flock
Jul 11, 2026
Merged

release.yml: flock apt-get to serialize concurrent coin package jobs#670
frstrtr merged 1 commit into
masterfrom
ci-steward/release-apt-flock

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Root-fix for the recurring self-hosted Linux apt-lock contention that flaked the LTC Linux package on v0.2.0 (run 29148852306).

Problem

The five Linux coin package cells (btc/ltc/dgb/dash/bch) run concurrently on the single `c2pool-build` self-hosted host and race on `/var/lib/apt/lists/lock`. The loser fails at Install system dependencies before its build starts; the same concurrency also produces the sibling `srcpkgcache.bin` corruption.

Fix

Wrap the two `apt-get` calls in a host-wide `flock /tmp/c2pool-apt.lock`, making the install atomic across concurrent jobs. Chosen over containerize / prebake-image because it is the smallest durable change and kills the whole class (lock race + srcpkgcache corruption) with no image-maintenance or drift cost. No-op on github-hosted runners (lock is per-VM, uncontended).

Follow-up (not this PR)

Other workflows that apt-install on the same host (build.yml smoke, gate workflows) can adopt the same `/tmp/c2pool-apt.lock` path to extend serialization cross-workflow. Scoped out to keep this change to the reported release flake.

Merge-gated — awaiting operator push-approval.

The 5 Linux coin package cells run concurrently on the single c2pool-build
self-hosted host and race on /var/lib/apt/lists/lock, corrupting srcpkgcache.bin;
the loser fails at Install system dependencies before the build starts (LTC on
v0.2.0, run 29148852306). Wrap apt-get in a host-wide flock so the install is
atomic. No-op on github-hosted runners (per-VM lock).
@frstrtr
frstrtr merged commit c93dcfb into master Jul 11, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant