Skip to content

Commit 92d2391

Browse files
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

File tree

‎.gitmodules‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "binutils"]
22
path = binutils
3-
url = https://sourceware.org/git/binutils-gdb.git
3+
url = https://github.com/gnutools/binutils-gdb.git
44
branch = binutils-2_46-branch
55
shallow = true
66
[submodule "gcc"]
@@ -10,7 +10,7 @@
1010
shallow = true
1111
[submodule "glibc"]
1212
path = glibc
13-
url = https://sourceware.org/git/glibc.git
13+
url = https://github.com/gnutools/glibc.git
1414
shallow = true
1515
[submodule "dejagnu"]
1616
path = dejagnu
@@ -19,12 +19,12 @@
1919
shallow = false
2020
[submodule "newlib"]
2121
path = newlib
22-
url = https://sourceware.org/git/newlib-cygwin.git
22+
url = https://github.com/cygwin/cygwin.git
2323
branch = master
2424
shallow = true
2525
[submodule "gdb"]
2626
path = gdb
27-
url = https://sourceware.org/git/binutils-gdb.git
27+
url = https://github.com/gnutools/binutils-gdb.git
2828
branch = gdb-16-branch
2929
shallow = true
3030
[submodule "qemu"]
@@ -33,7 +33,7 @@
3333
shallow = true
3434
[submodule "musl"]
3535
path = musl
36-
url = https://git.musl-libc.org/git/musl
36+
url = https://github.com/kraj/musl.git
3737
branch = master
3838
shallow = true
3939
[submodule "spike"]

0 commit comments

Comments
 (0)