Repository navigation
ci: retry, time out and fall back to another apt mirror - #134
Merged
Merged
Conversation
The apt-get update and install step can hang on the Ubuntu mirror. The job then runs into its 30-minute limit and is cancelled. Add apt retries and a 30s network timeout to every copy of the step, and cap each step at 10 minutes so a hang fails fast. The package lists are unchanged.
The azure Ubuntu mirror did not answer on hosted runners, so the Linux package step timed out. The update now tries azure with a short timeout, then switches the sources to archive.ubuntu.com and updates again. Package lists are unchanged.
Hosted Ubuntu runners read their mirrors from /etc/apt/apt-mirrors.txt, so rewriting only the sources files left the stalled azure mirror in use.
ubuntu-latest moved to resolute, and its runners could not reach the Ubuntu mirrors. The two Linux jobs that install apt packages now run on ubuntu-24.04.
Pinning to ubuntu-24.04 did not help. Both images fail to resolve the Ubuntu mirrors, so the image is not the cause.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Linux package step (and the "Linux libraries" step in
release.yml) runsscripts/apt-update.shinstead of a bareapt-get update. Package lists and the install lines are unchanged. Runner images are unchanged (ubuntu-latest).scripts/apt-update.sh:apt-get updatewith a 120 s cap, 2 retries and a 20 s network timeout.http://azure.archive.ubuntu.com/ubuntutohttp://archive.ubuntu.com/ubuntuin/etc/apt/sources.list.d/ubuntu.sources,/etc/apt/sources.listand/etc/apt/apt-mirrors.txt(whichever exist; hosted runners read their mirrors from that last file).security.ubuntu.comis left alone.apt-get updateagain with the original retry settings.All five copies (4 in
ci.yml, 1 inrelease.yml) call the same script. The step timeout is 10 minutes.Why
Run 43046349109 shows the azure mirror stalling on
ubuntu-latest(nowresolute), so the step timed out.What we found since
archive.ubuntu.com,security.ubuntu.comandports.ubuntu.comall fail with "Temporary failure resolving". This is on the GitHub runner side, not on the status page.ubuntu-latest(resolute, runs 43046349109, 43048528337, 43050691756) andubuntu-24.04(noble, run 43052749488). So the image is not the cause.ports.ubuntu.com(jammy), which the script does not change. It fails the same way.ubuntu-24.04was tried and reverted. It did not help.windows-tests (2)):killing_the_process_kills_a_background_grandchildanddropping_the_process_kills_a_background_grandchild("grandchild did not report its pid"). It passed in the run before. It looks flaky and unrelated to apt.Checks
sh -n scripts/apt-update.shpasses.