Skip to content

ci: Install Git in the Tier 2 Linux build cannot recover after a timeout stops dpkg (no dpkg --configure -a in its retry) #5504

Closed

Description

@vpacher

Problem

The Install Git 📦 step of Build 🧱 / Rust Tier 2 Linux 🐧 (build) cannot recover when its timeout 180 stops apt-get install while dpkg unpacks. The step runs in the job container when the job does not use the prebaked image, for example on a fork PR.

In run 45113911635 (#5142, attempt 3, job 137603477821), archive.ubuntu.com sent about 100 to 200 KB/s:

  • Attempt 1 downloaded the 26.5 MB in about 3 minutes, and the timeout stopped it during the unpack (09:39:17Z).
  • Attempts 2 and 3 failed at once with E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

The retry loop (.github/workflows/build-project.yaml, Install Git 📦) runs apt-get update and apt-get install again, but not dpkg --configure -a. So after one stop in the unpack, all the retries fail. Attempt 2 of the same run failed in Install Tier 2 Packages 📦 (the 10-minute step timeout) with the same slow mirror.

Install Tier 2 Packages 📦 in the same job already recovers: it runs dpkg --configure -a || true and apt-get -f install before each attempt (job 134123589625, test_tier2_install_recovers_dpkg_before_each_retry).

Proposal

In the Install Git 📦 retry loop, run dpkg --configure -a || true and apt-get -f install -y before each attempt, as Install Tier 2 Packages 📦 does. The .deb files that attempt 1 downloaded stay in /var/cache/apt/archives, so the next attempt does not download them again.

Tests

  • RED: a case in ci/test_tier2_apt_cache.py runs the step's retry loop with mocked apt-get and dpkg. The first install stops in the unpack and leaves dpkg interrupted; then an install fails until dpkg --configure -a runs. Today the loop fails all 3 attempts.
  • GREEN: the loop recovers and the second attempt passes. The case also checks that each attempt starts with the recovery.

Activity

  1. vpacher commented on Nov 23, 2026

    @vpacher
    MemberAuthor

    Claiming: #5504

    Plan (one PR): RED, a case in ci/test_tier2_apt_cache.py that runs the Install Git 📦 retry loop with mocked apt-get and dpkg and a first install stopped in the unpack; GREEN, dpkg --configure -a || true and apt-get -f install -y before each attempt. First PR expected today.

  2. added
    ready
    on Nov 23, 2026
  3. vpacher commented on Nov 23, 2026

    @vpacher
    MemberAuthor

    Plan update: two PRs. #5506 is PR 1 (Install Git). PR 2: the same slow mirror then stopped ci-runtime.py's runtime delta install in the Tier 2 tests job (run 45113911635, attempt 4: Runtime delta apt failed (exit 124)). It fails at once on a timeout. PR 2 keeps that for other errors (#5249) but retries a timed-out install once, after dpkg --configure -a; the downloaded .deb files stay in the archive mount. PR 2 closes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions