Repository navigation
Commit 92d2391
committed
Switch unreliable submodule sources to mirrors
Cloning the submodules hosted on sourceware.org (binutils, gdb, glibc,
newlib) and git.musl-libc.org (musl) fails frequently. sourceware.org
answers with HTTP 429/502 or times out, git.musl-libc.org stops
answering altogether. This breaks local builds and CI at random times.
Four of the last six failed CI runs aborted in "Initialize submodule
cache", every one of them on an HTTP 429 from sourceware.org. The musl
host failed on 2026-08-11 and again on 2026-08-18, both times with
"Failed to connect to git.musl-libc.org port 443 after 134 seconds".
Switching to a different hostname of the same project does not help:
sourceware.org, cygwin.com and gcc.gnu.org all resolve to the same
machine and therefore share a single rate limiter.
The problem is amplified by the way submodules are fetched. The build
uses "git submodule update --depth 1", but the recorded commits are
usually not the tip of the configured branch. A shallow fetch does not
contain the pin, so git falls back to requesting the pinned commit
directly. That is exactly the request these servers either reject or
drop while they are under load.
Switch the affected submodules to mirrors:
binutils https://github.com/gnutools/binutils-gdb.git
gdb https://github.com/gnutools/binutils-gdb.git
glibc https://github.com/gnutools/glibc.git
newlib https://github.com/cygwin/cygwin.git
musl https://github.com/kraj/musl.git
The mirrors were verified against their upstream repositories. Every
branch head used here matches the upstream hash exactly, a full ref
comparison for newlib lists all 1462 upstream refs with identical
hashes, and for musl 80 of 81 upstream refs are identical. The single
exception is the symbolic HEAD, because github.com/kraj/musl is a
downstream fork whose default branch is the maintainer's own; its
"master" branch, the one configured here, tracks upstream exactly.
Ten consecutive clean clones per submodule, using the same shallow
fetch of the pinned commit that the build performs, succeeded for all
of them. Each mirror serves unadvertised objects, so fetching a pin
that is not a branch tip works.
The submodules are pinned to commit hashes and git verifies the object
hashes on fetch. A mirror can therefore not silently serve different
content; only availability is delegated.
Unlike the bminor repositories that disappeared and had to be dropped
in commit 311e70f, all mirrors used here have a known operator:
github.com/gnutools is the GNU Toolchain organisation run by Ian Lance
Taylor, github.com/cygwin belongs to the Cygwin project, and
github.com/kraj is maintained by Khem Raj.
dejagnu stays on git.savannah.gnu.org. It is the one submodule with no
mirror that carries its pinned commit at all.
Note that existing checkouts need to run "git submodule sync" to pick
up the new URLs, because git caches submodule URLs in .git/config.
Closes #1883
Related to #1881
Signed-off-by: Christoph Müllner <[email protected]>1 parent bca3efe commit 92d2391
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments