Skip to content

Fix benchmark setup contention with unattended upgrades - #1622

Merged
Alex Razumov (arrayka) merged 2 commits into
mainfrom
u/arrayka/benchmark-apt-lock-timeout
Dec 4, 2026
Merged

Alex Razumov (arrayka) merged 2 commits into
mainfrom
u/arrayka/benchmark-apt-lock-timeout

Conversation

@arrayka

Copy link
Copy Markdown
Contributor
  • Does this PR have a descriptive title that could go in our release notes?
  • Does this PR add any new dependencies?
  • Does this PR modify any existing APIs?
  • Is the change to the API backwards compatible?
  • Should this result in any changes to our documentation, either updating existing docs or adding new ones?

Reference Issues/PRs

Fixes #1613. Fixes #1621.

What does this implement/fix? Briefly explain your changes.

Wait up to 120 seconds for the dpkg lock when installing disk benchmark system dependencies. The November 28 and December 3 failures occurred during setup because unattended-upgr held /var/lib/dpkg/lock-frontend; they were not benchmark comparison failures. The same setup error also occurred on November 20.

Add -o DPkg::Lock::Timeout=120 to the shared setup action's apt-get install invocation. This covers both A/A and A/B benchmarks. Installation proceeds immediately when the lock is free and still fails if contention outlasts the timeout. No benchmark thresholds or automatic-update settings are changed.

Add a short inline comment explaining the wait. No Markdown changes are included in the final PR diff.

Any other comments?

  • Repository-wide search found only one automated APT install invocation. The other occurrence is a manual cross-compilation setup example, left unchanged.
  • Validation passed: YAML parsing with PyYAML; bash -n on the extracted install step through WSL; mocked execution confirming exact APT arguments and propagation of install exit codes 0 and 100.
  • git diff --check passed.
  • Actual package installation, lock contention on the 1ES runner, and full benchmark execution were not run locally. Rust tests, formatting and Clippy were not run because no Rust source or manifests changed.
  • The timeout applies to dpkg lock acquisition during installation, not APT package-list locking during apt-get update.

Alex Razumov (from Dev Box) and others added 2 commits December 3, 2026 10:33
Wait up to 300 seconds for the dpkg lock during system dependency installation in the shared A/A and A/B setup action.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the earlier Markdown addition so the final change is confined to the shared benchmark setup action.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the change adding a 120-second dpkg lock wait to benchmark dependency installation.

No open issues 🎉

What changed in this PR

Reduces benchmark setup failures from unattended-upgrade lock contention in the shared action used by A/A and A/B benchmarks.

Changes:

  • Adds a 120-second dpkg lock timeout to dependency installation.
  • Adds an inline comment explaining the wait; benchmark thresholds and automatic-update settings remain unchanged.
File Description
.github/​actions/​setup-disk-benchmark/​action.yml Adds and documents the dpkg lock wait for apt-get install.

Review effort: Balanced

@arrayka
Alex Razumov (arrayka) enabled auto-merge (squash) December 3, 2026 18:43
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (911b5dc) to head (42c0b59).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1622      +/-   ##
==========================================
+ Coverage   91.32%   92.28%   +0.96%     
==========================================
  Files         633      633              
  Lines      133933   133933              
==========================================
+ Hits       122312   123600    +1288     
+ Misses      11621    10333    -1288     
Flag Coverage Δ
miri 92.28% <ø> (+0.96%) ⬆️
unittests 92.23% <ø> (+1.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 54 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arrayka
Alex Razumov (arrayka) merged commit ad437bd into main Dec 4, 2026
32 checks passed
@arrayka
Alex Razumov (arrayka) deleted the u/arrayka/benchmark-apt-lock-timeout branch December 4, 2026 02:04
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.

[Benchmark A/A] Daily stability test failed – 2026-12-03 [Benchmark A/A] Daily stability test failed – 2026-11-28

5 participants