Skip to content

ci: queue Tier 2 apt installs on the Dell's shared archive lock - #4962

Merged
zackees merged 2 commits into
masterfrom
fix/4954-tier2-apt-lock-wait
Nov 17, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/4954-tier2-apt-lock-wait

Conversation

@zackees

@zackees zackees commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

On the Dell, Tier 2 builds now queue for the shared apt archive instead of failing on it. Refs #4954.

Why

Run 44049453484 (merge group) failed in Install Tier 2 Packages. apt printed this three times, then the step failed:

E: Could not get lock /var/cache/obs-runner/apt-archives/lock. It is held by process 0
  • Shared archive dir. On the Dell every Tier 2 build uses /var/cache/obs-runner/apt-archives.
  • No timeout on that lock. apt takes the archive dir's fcntl lock without one. DPkg::Lock::Timeout covers only dpkg's own lock. "process 0" is the holder seen from another container's PID namespace.
  • Retries ran out. .github/scripts/retry gives up after 3 attempts, 15 s and 30 s apart. Right after the host migration the archive was empty, so the holder was still downloading about 340 MB when the third attempt ran.

Change

  • The install runs under flock -w 1800 "$TIER2_APT_ARCHIVES/.tier2-install.lock". A second build blocks until the first one's download and unpack finish, then installs from the warm archive.
  • On hosted runners the archive dir is job-local, so the lock is always free and nothing changes.
  • flock comes from util-linux, which is in the pinned ubuntu:26.04 image.

RED → GREEN

RED (local): the new ci/test_tier2_apt_cache.py::test_build_job_waits_for_the_shared_archive_lock fails because the install step has no flock.

GREEN:

  • test_tier2_apt_cache, test_tier2_build_setup and test_tier2_native pass.
  • ./lint passes.
  • In the pinned image, a contender waited 3 s for a held lock (rc 0), and -w 1 against a held lock exited 1.

Reported by the host-migration agent. The Dell host config is unchanged.

Run 44049453484 failed in Install Tier 2 Packages with "Could not get lock
/var/cache/obs-runner/apt-archives/lock. It is held by process 0" three
times. On the Dell every Tier 2 build shares that archive directory. apt
takes its fcntl lock without a timeout (DPkg::Lock::Timeout covers only
dpkg's own lock), and .github/scripts/retry gives up after 3 attempts 15 s
and 30 s apart. The empty archive right after the host migration made each
holder download for longer than that. The new case expects the install to
queue on a blocking flock instead.

Refs #4954
Install Tier 2 Packages now runs under flock -w 1800 on
$TIER2_APT_ARCHIVES/.tier2-install.lock, so a second build waits for the
first to finish downloading and unpacking instead of losing apt's
non-blocking archive lock three times. Hosted runners keep a job-local
archive dir, so the lock is always free there. The 30 min ceiling covers a
cold archive (about 340 MB of .debs) on the Dell. flock is in util-linux,
which the pinned ubuntu:26.04 image ships.

Refs #4954

Ci-Attestation: {"at":1794906833,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":100,"stamp":"1b2a5d9a03f57f84a6b110c0927895ed","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906833,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":100,"stamp":"1ec3b0550360f3fbb7d6234493f6f84d","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906833,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":100,"stamp":"9af77d6b5c7e0dda1742d138210ee82b","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906833,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":100,"stamp":"5c03f977eff194349314ff312d9957fd","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906730,"gate":"general/all/client-lint","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"a1250cc01792f50b4581dc7653a469d3","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906833,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":100,"stamp":"f6d0dbf552239e268eb288eb9be7854c","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"1af2ff3a273d9970ac1e4aed327a40c8","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"1ef5d4fdd7cf9c21b5336501198c2bc9","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"cc5c5e0947f8c035e1565d6e8a6eed56","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"600ab3bb7174121acdce69ddf455d003","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906730,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"af07f6a1446dec364e5d89ef2529c939","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"c202cf9e9639f3ea7e0440006865df88","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"237edf7bac4db17a7fe2942ca6e3c4d9","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"900835980751ffe362c76afd02485bcc","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"e509962619cbd862d54641ea5bd7733d","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906731,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"8f9a82887f51e73180e92e63e006cde9","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906730,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"99d8b485271bbd49ab8a340e61e30eb4","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794906730,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"334c441584b23a758bdb2045a0af384d71c6468699d07b6bd6b8d2c17a12d51c","lane":"client-lint","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":17,"stamp":"f430c46569eade7534f1f3b878d2fea7","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}
Ci-Attestation: {"at":1794907114,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"3d0759bc9426a63a340c67b9164d9020f3450cc6222c557725c43af4d2ffb187","lane":"client-test-x86_64-unknown-linux-gnu","parents":["a9004a19313b13a454964361f166b2d3f606b2e1"],"secs":280,"stamp":"59814dd9f8fe6292929487a94dc7e535","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"3ea35fc19440a41d82a83791e325baaf8b36ed7f","coverage":"all-tracked-applicable-files","diff":[".github/workflows/build-project.yaml","ci/test_tier2_apt_cache.py"],"head":"c7edf39a9447a40ab1b158d79ce268a6a5a0e720","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"09d181b0b862ea365b2f1f49262b561e7f746177e4d8264e3b69f13bcfdf80f4","tree":"ad184fe8c8817325f19ad5f01665e746513f6e7a"}}
@zackees
zackees marked this pull request as ready for review November 17, 2026 09:23
@zackees
zackees enabled auto-merge November 17, 2026 09:23
@zackees
zackees added this pull request to the merge queue Nov 17, 2026
Merged via the queue into master with commit b84176e Nov 17, 2026
41 checks passed
@zackees
zackees deleted the fix/4954-tier2-apt-lock-wait branch November 17, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant