Page MenuHomePhabricator

Fetches from Gerrit aborted due to: GnuTLS recv error (-54): Error in the pull function
Closed, ResolvedPublic

Description

Git fetch/clones operations are being aborted with git/curl reporting:

GnuTLS recv error (-54): Error in the pull function
17:10:06   stderr: 'fatal: unable to access 'https://gerrit.wikimedia.org/r/mediawiki/extensions/CentralAuth/': GnuTLS recv error (-54): Error in the pull function.'

To be clear, this is basically just speculation based on the limited information I can find; but I am wondering about whether this type of error might potentially be unrelated to the addition of Envoy to Gerrit's stack.
Searching Gerrit for the text GnuTLS recv error (-54) (to try and find instances where this CI error has been pasted into a Gerrit comment), it seems like an early singular occurrence of this issue may have been on 2026-02-18, with occurrences starting regularly from 2026-03-16 onwards. IIUC from T420909#11752446, Envoy was added to Gerrit's stack on 2026-03-26.

The Gerrit search for "GnuTLS recv error" shows a person asking CI to be rechecked on Feb 18th.

Some history about Gerrit

  • Feb 10th: switch behind the CDN (T411895)
  • Feb 16th: Gerrit moved from eqiad to codfw (which caused 502 http errors due to a timeout race condition made more frequents with the increased latency)
  • March 16th start of several recheck messages mentioning GnuTLS recv error
  • March 22nd this task get filed
  • March 26 Envoy is introduced (T420909 / Puppet #1259945)
  • April 30th/May 3rd). The issue has been very prominent during the Hackathon Probably because lot of patches were sent which made the issue appear more frequently or some system is overloaded.
Quibble stacktrace
23:12:20 Traceback (most recent call last):
23:12:20   File "/usr/local/bin/quibble", line 6, in <module>
23:12:20     sys.exit(main())
23:12:20   File "/usr/local/lib/python3.9/dist-packages/quibble/cmd.py", line 1017, in main
23:12:20     cmd.execute(
23:12:20   File "/usr/local/lib/python3.9/dist-packages/quibble/cmd.py", line 640, in execute
23:12:20     quibble.commands.execute_command(command)
23:12:20   File "/usr/local/lib/python3.9/dist-packages/quibble/commands.py", line 36, in execute_command
23:12:20     command.execute()
23:12:20   File "/usr/local/lib/python3.9/dist-packages/quibble/commands.py", line 304, in execute
23:12:20     quibble.zuul.clone(
23:12:20   File "/usr/local/lib/python3.9/dist-packages/quibble/zuul.py", line 96, in clone
23:12:20     zuul_cloner.prepareRepo('mediawiki/core', dests['mediawiki/core'])
23:12:20   File "/usr/local/lib/python3.9/dist-packages/zuul/lib/cloner.py", line 167, in prepareRepo
23:12:20     repo.reset()
23:12:20   File "/usr/local/lib/python3.9/dist-packages/zuul/merger/merger.py", line 99, in reset
23:12:20     self.update()
23:12:20   File "/usr/local/lib/python3.9/dist-packages/zuul/merger/merger.py", line 205, in update
23:12:20     origin.fetch(tags=True, force=True)
23:12:20   File "/usr/lib/python3/dist-packages/git/remote.py", line 831, in fetch
23:12:20     res = self._get_fetch_info_from_stderr(proc, progress)
23:12:20   File "/usr/lib/python3/dist-packages/git/remote.py", line 698, in _get_fetch_info_from_stderr
23:12:20     proc.wait(stderr=stderr_text)
23:12:20   File "/usr/lib/python3/dist-packages/git/cmd.py", line 455, in wait
23:12:20     raise GitCommandError(self.args, status, errstr)
23:12:20 git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
23:12:20   cmdline: git fetch --force --tags -v -- origin
23:12:20   stderr: 'fatal: unable to access 'https://gerrit.wikimedia.org/r/mediawiki/core/': GnuTLS recv error (-54): Error in the pull function.'

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedDzahn
ResolvedNone
ResolvedCDanis
ResolvedABran-WMF
ResolvedJelto
ResolvedDzahn
ResolvedDzahn
ResolvedJelto
ResolvedVgutierrez
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
OpenNone
OpenNone
OpenNone
ResolvedABran-WMF
ResolvedABran-WMF
OpenNone
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedMatthewVernon
ResolvedLSobanski
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedLSobanski
Resolvedhashar
Resolvedhashar
Resolvedhashar
OpenNone
OpenNone
Resolvedhashar
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
Resolveddancy
ResolvedABran-WMF
DuplicateNone
DuplicateABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedDzahn
ResolvedABran-WMF
ResolvedDzahn
OpenNone
ResolvedJelto
ResolvedJelto
ResolvedMarostegui
ResolvedDzahn
ResolvedDzahn
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
DuplicateNone
DuplicateNone
DuplicateNone
Resolveddancy
ResolvedABran-WMF
DuplicateABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
Resolvedhashar
ResolvedABran-WMF
OpenNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Adding in @ABran-WMF as this is new and so is T420909: gerrit: Add Envoy in Gerrit's stack which changed TLS termination for Gerrit.

The timing of the Envoy change doesn't match up with this ticket being filed. But it is something beyond Apache (I think) causing this error.


Explainer

The error is pretty generic. My rough understanding is: something hung up the call. Maybe a timeout along the way.

My understanding of the path back to Jenkins is: [gerrit] -> [apache] -> [envoy] -> [CDN] -> [Jenkins]
And I've been able to trace the path through: [gerrit] -> [apache]

And then I dead end.


Details

The error seen here: https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-vendor-mysql-php83/23473/console

is:

08:54:12 INFO:zuul.Cloner.mediawiki/extensions/WikiLove:Creating repo mediawiki/extensions/WikiLove from upstream https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiLove
...
08:54:19 git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
08:54:19   cmdline: git fetch --force --tags -v -- origin
08:54:19   stderr: 'fatal: unable to access 'https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiLove/': GnuTLS recv error (-54): Error in the pull function.'

And here's what I see in the logs for that:

root@gerrit2003:~# grep -E '2026-03-26T14:54:12' /var/log/apache2/gerrit.wikimedia.org.https.access.log | grep 'git/2' | cut -c7- | jq -r '"\(.timestamp): \(."url.path") \(."http.request.method") \(."http.response.status_code") \(."http.response.bytes")"' | grep Love
2026-03-26T14:54:12: /r/mediawiki/extensions/WikiLove/info/refs GET 200 113
2026-03-26T14:54:12: /r/mediawiki/extensions/WikiLove/git-upload-pack POST 200 3183
2026-03-26T14:54:12: /r/mediawiki/extensions/WikiLove/git-upload-pack POST 200 3091437

Which looks normal to me for a the server side of a git pull (GET info/refs, 1×POST git-upload-pack for ls-refs, 1×POST to git-upload-pack for fetch).

This, for me, means that we're hitting some timeout in the reminder of the path and giving up. And since this ticket pre-dates Envoy...I guess the CDN is hanging up? No idea how to verify that.

There were timeout issues over the week-end but I don't quite remember the details.

The series of issues that are surging now are related to the introduction of Envoy which was done this morning and its timeout with the Apache backend is superior (I believe the default: 5 minutes) to the one on Apache side (122 seconds). Thus Envoy reuse one of those connection and while the packet travel Apache on the other side terminates the connection because it has exceeded the Apache timeout.

I'll mark this as a dupe of T420909 and comment there.

Change #1283846 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: enable git curl trace dump for Quibble

https://gerrit.wikimedia.org/r/1283846

hashar reopened this task as Open.EditedMay 7 2026, 9:39 AM

I have updated the two heavy jobs which sets GIT_TRACE_CURL (Gerrit #1283846. The environment variable causes git to write down a debug log of curl operations. The log is discarded unless the build is in FAILURE in which case the gzipped trace is attached to the build as quibble-git-trace-curl.log.gz.

The jobs are:
https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-selenium-php83/
https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-vendor-mysql-php83/

Build that failed can be found using over the last hour can be found with:

ssh contint.wikimedia.org \
  find /srv/jenkins/builds -maxdepth 3 -name log -mmin -60 -exec grep -l GnuTLS  {} +

Once we got a failure, we can look at the curl debug log.

I have rolled back both jobs. I got a 179 MB gzipped curl trace at https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-vendor-mysql-php83/32927/ . Save on contint1002 in /home/hashar/quibble-git-trace-curl.log.gz

The git clone commands are run in parallel and thus the log is multiplexing those traces

10:11:44.870103 http.c:715              => Send header: GET /r/mediawiki/extensions/Poem/info/refs?service=git-upload-pack HTTP/2
...
10:11:45.077553 http.c:756              == Info: GnuTLS recv error (-54): Error in the pull function.
10:11:45.077572 http.c:756              == Info: Failed receiving HTTP2 data
10:11:45.077586 http.c:756              == Info: Failed sending HTTP2 data
10:11:45.077596 http.c:756              == Info: Connection #0 to host gerrit.wikimedia.org left intact
hashar renamed this task from Tests failing with "23:12:20 stderr: 'fatal: unable to access 'https://gerrit.wikimedia.org/r/REPO: GnuTLS recv error (-54): Error in the pull function.'" to Fetches from Gerrit aborted due to: GnuTLS recv error (-54): Error in the pull function.May 18 2026, 9:36 AM
hashar updated the task description. (Show Details)

Change #1283846 abandoned by Hashar:

[integration/config@master] jjb: enable git curl trace dump for Quibble

Reason:

Debug logs of each `git clone` commands end up being multiplexed in a single log file :/

https://gerrit.wikimedia.org/r/1283846

Change #1278483 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[integration/quibble@master] zuul: retry policy on network errors

https://gerrit.wikimedia.org/r/1278483

Change #1278483 had a related patch set uploaded (by Thcipriani; author: Arnaudb):

[integration/quibble@master] zuul: retry policy on network errors

https://gerrit.wikimedia.org/r/1278483

Oh wait, that was the same patch appearing twice as "uploaded" for some reason, not getting merged. So, ignore that "despite the patch" comment.

Change #1278483 merged by jenkins-bot:

[integration/quibble@master] zuul: retry policy on network errors

https://gerrit.wikimedia.org/r/1278483

The patch by Arnaud to add retries has now been merged thanks to Tyler.

But let me copy over his comments from Gerrit right here:

Tyler wrote:

"Noting that after merge, needs a subsequent quibble release and rebuild of images for CI jobs before it's active."

"This change will attempt a git retry only for CI jobs which use quibble (i.e., MediaWiki jobs); GnuTLS failures in other jobs will require similar workarounds. I believe there's a problem at the edge that would be worth investigating, still, after this change is deployed."

Change #1296700 had a related patch set uploaded (by Thcipriani; author: Thcipriani):

[integration/config@master] Upgrade Quibble jobs to 1.18.1

https://gerrit.wikimedia.org/r/1296700

Change #1296700 merged by jenkins-bot:

[integration/config@master] jjb: Upgrade Quibble jobs to 1.18.1

https://gerrit.wikimedia.org/r/1296700

Tyler wrote:

"Noting that after merge, needs a subsequent quibble release and rebuild of images for CI jobs before it's active."

Now that https://gerrit.wikimedia.org/r/1296700 is merged/deployed this is active. Quibble will retry any time 1 time if a GnuTLS error is the cause of a git clone failure on the jobs listed on that patchset (not every job, but a bunch of jobs).

ABran-WMF lowered the priority of this task from High to Medium.Jun 10 2026, 7:07 AM

The patch has been merged for a week now, there has been an inflection in the trend since June 3rd:

image.png (2,308×562 px, 117 KB)

The daily GnuTLS failure rate has visibly decreased. Lowering the priority of that task as it has now a smaller impact on our builds.
The remaining bits will require more debugging to be 100% fixed.

I'm still seeing a bunch of Recv failures / connection resets: https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-vendor-mysql-php83/41139/console . I've tried to merge 5 patches this morning and hit this issue on gate-and-submit for every single one of them.

Change #1302819 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[integration/quibble@master] zuul: retry on connection resets, not only GnuTLS errors

https://gerrit.wikimedia.org/r/1302819

Change #1302829 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/puppet@production] ci: monitor a wider variety of network errors

https://gerrit.wikimedia.org/r/1302829

Change #1302834 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/puppet@production] ci: add repositories to gitcache

https://gerrit.wikimedia.org/r/1302834

ABran-WMF changed the task status from In Progress to Open.Jun 17 2026, 6:51 AM
ABran-WMF claimed this task.
ABran-WMF moved this task from Work in Progress to Awaiting Input on the Collaboration-Services board.

Change #1302829 merged by Arnaudb:

[operations/puppet@production] ci: monitor a wider variety of network errors

https://gerrit.wikimedia.org/r/1302829

Change #1303344 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/puppet@production] ci: update jenkins build monitor

https://gerrit.wikimedia.org/r/1303344

Change #1303344 merged by Arnaudb:

[operations/puppet@production] ci: update jenkins build monitor

https://gerrit.wikimedia.org/r/1303344

I'm still seeing a bunch of Recv failures / connection resets: https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-vendor-mysql-php83/41139/console . I've tried to merge 5 patches this morning and hit this issue on gate-and-submit for every single one of them.

(For search purposes: that’s now “Recv failure: Connection reset by peer”, a slightly different error message from the GnuTLS recv errors.)

Change #1302819 merged by jenkins-bot:

[integration/quibble@master] zuul: retry on connection resets, not only GnuTLS errors

https://gerrit.wikimedia.org/r/1302819

Change #1304162 had a related patch set uploaded (by Ahmon Dancy; author: Ahmon Dancy):

[integration/config@master] dockerfiles: update Quibble to 1.18.2

https://gerrit.wikimedia.org/r/1304162

Change #1304162 merged by jenkins-bot:

[integration/config@master] dockerfiles: update Quibble to 1.18.2

https://gerrit.wikimedia.org/r/1304162

Mentioned in SAL (#wikimedia-releng) [2026-06-18T19:52:52Z] <dancy> Building quibble 1.18.2 images on contint primary (T420865)

Change #1304181 had a related patch set uploaded (by Ahmon Dancy; author: Ahmon Dancy):

[integration/config@master] Upgrade Quibble jobs to 1.18.2

https://gerrit.wikimedia.org/r/1304181

Mentioned in SAL (#wikimedia-releng) [2026-06-19T06:13:41Z] <hashar> Upgrading Quibble jobs to 1.18.2 (retry git connections on reset) https://gerrit.wikimedia.org/r/c/integration/config/+/1304181 # T420865

Change #1304181 merged by jenkins-bot:

[integration/config@master] Upgrade Quibble jobs to 1.18.2

https://gerrit.wikimedia.org/r/1304181

Given the recent evolution, T429749: Gerrit: network errors in CI was created to simplify tracking of that issue.

As a result of 9be946fb3cfef2aa9103dc08e2be3188368b72a3 , the underlying error is no more shown and thus not captured in the Jenkins build logs. I am pretty sure this is still occurring, it definitely happened to me last week.

I think last time we ruled out Gerrit/Apache/Envoy and the only things left are:

  • the CDN / Edge cache (which would be SRE traffic)
  • WMCS NAT? But that would be surprising.

@ABran-WMF can you please loop SRE Traffic so they can investigate what has been abruptly terminating connection since Gerrit moved behind the CDN? Thx!

@ABran-WMF can you please loop SRE Traffic so they can investigate what has been abruptly terminating connection since Gerrit moved behind the CDN? Thx!

Yes! it's already been done in the ticket highlighted in my previous comment:

Given the recent evolution, T429749: Gerrit: network errors in CI was created to simplify tracking of that issue.

I'll mark this one again as Resolved because the issue has evolved and is being tracked in T429749.

Change #1302834 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/puppet@production] ci: add repositories to gitcache

https://gerrit.wikimedia.org/r/1302834

Change #1302834 had a related patch set uploaded (by Arnaudb; author: Arnaudb):

[operations/puppet@production] ci: add repositories to gitcache

https://gerrit.wikimedia.org/r/1302834

Change #1302834 merged by Arnaudb:

[operations/puppet@production] ci: add repositories to gitcache

https://gerrit.wikimedia.org/r/1302834

This comment was removed by ABran-WMF.
ABran-WMF changed the status of subtask T429749: Gerrit: network errors in CI from In Progress to Stalled.