Open iainelder opened 1 month ago
https://github.com/actions/runner-images/issues/1187 describes the general problem.
Situations that require networking, such as downloading a file using curl or running tests that utilise localhost, are proving to be very flaky, with spurious timeouts occurring often.
And a solution:
It seems that your problem can be tied with network offloading, that is turned on by default. Could you please try to disable TCP/UDP offload before build, it can be done literally with one-line:
sudo ethtool -K eth0 tx off rx off
Reloading/restarts are not required, performance should not be affected.
Which has been packaged into a GitHub action until GitHub resolves the upstream issue.
https://github.com/smorimoto/tune-github-hosted-runner-network
I used the action to tune the network. Let's see whether that fixes it.
Another approach: accept that the network is unreliable and configure the tools to retry on connection failures.
apt has the Acquire::Retries
setting. See Ask Ubuntu and the apt.conf man page.
curl has options --retry
, --retry-connrefused
, and --retry-all-errors
. See Stack Overflow and the curl manual.
A selection of recent failures caused by what appears to be flaky networking.
GnuCash 3: test_idempotent_installation (ubuntu:20.04)
diff-pdf: test_idempotent_installation (ubuntu:20.04)
NICE DCV: test_idempotent_installation (ubuntu:20.04)
OpenRefine: test_idempotent_installation (ubuntu:20.04)
Spotify: test_idempotent_installation (ubuntu:22.04)
PlantUML: test_idempotent_installation (ubuntu:20.04)
Spotify: test_idempotent_installation (ubuntu:22.04)
VirtualBox: test_idempotent_installation (ubuntu:22.04)
Angle-Grinder: test_idempotent_installation (ubuntu:22.04)