Page MenuHomePhabricator

Gerrit: network errors in CI
Closed, ResolvedPublic

Description

This is a follow up task for T420865: Fetches from Gerrit aborted due to: GnuTLS recv error (-54): Error in the pull function. The issue evolved but it is still active.

image.png (2,470×1,636 px, 326 KB)

There was a pattern shift in the raised network errors. The dotted line shows the previously monitored error code. The task priority was lowered in consequence at the time. On June 16th, we were informed that there was still network issues happening regularly on CI.

After updating the monitoring script, it appeared that the current network error rate seem to be even higher.
The set of network errors to retry on was broadened with little to no effect. We also offered to cache more things locally, to reduce the impact of that issue while it's being debugged. That remaining part is still being reviewed.

Related Objects

StatusSubtypeAssignedTask
OpenNone
ResolvedNone
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedDzahn
ResolvedNone
ResolvedCDanis
ResolvedABran-WMF
ResolvedJelto
ResolvedDzahn
ResolvedDzahn
ResolvedJelto
ResolvedVgutierrez
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF
OpenNone
Openhashar
Resolvedhashar
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

ABran-WMF changed the task status from Open to In Progress.Jun 22 2026, 7:21 AM
ABran-WMF triaged this task as High priority.
ABran-WMF moved this task from Incoming to Work in Progress on the Collaboration-Services board.

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

[operations/puppet@production] trafficserver: raise ATS timeouts for the gerrit secondary backends

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

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

[operations/puppet@production] trafficserver: raise ATS timeouts for the gerrit primary backend

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

Change #1304809 abandoned by Arnaudb:

[operations/puppet@production] trafficserver: raise ATS timeouts for the gerrit primary backend

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

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

[operations/puppet@production] trafficserver: raise ATS timeouts for the gerrit primary backend

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

I tested the following envoy config to log more details on network errors:

$ diff tls.debug.yaml /etc/envoy/listeners.d/00-tls_terminator_8443.yaml
26,40d25
< [...]
<       access_log:
<       - name: envoy.access_loggers.file
<         filter:
<           response_flag_filter:
<             flags: ["DC", "UC", "LR", "UR", "UT", "URX", "UF", "UO", "DPE"]
<         typed_config:
<           "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
<           path: /var/log/envoy/gerrit_netflags.log
<           log_format:
<             text_format_source:
<               inline_string: "[%START_TIME%] flags=%RESPONSE_FLAGS% code=%RESPONSE_CODE% sent=%BYTES_SENT% dur=%DURATION%ms up=%UPSTREAM_HOST% down=%DOWNSTREAM_REMOTE_ADDRESS% xff=\"%REQ(X-FORWARDED-FOR)%\" path=\"%REQ(:PATH)%\" reqid=%REQ(X-REQUEST-ID)%\n"
< [...]

There was a few CI errors graphed, but nothing logged on Envoy's side. So it might indicate the issue happens at the ATS layer.
I created a relation chain to test that hypothesis first on the replicas and on the primary, mirroring what's been done for Gitlab in T425441: gitlab behind CDN.

FWIW CI is occasionally failing with non-Gerrit network errors as well. E.g. https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/1304222

17:08:43 npm error enoent Invalid response body while trying to fetch https://registry.npmjs.org/zip-stream: ENOENT: no such file or directory, stat '/cache/npm/_cacache/content-v2/sha512/e4/7b/c83c8c01523a98983d7c98f4d2f65b38138df7250014c4374962a0a925d0789d457c0b931919e7c18a5503cb3d85f80ff2d0a6af8650a858788c38f1e02f'
17:08:43 npm error enoent This is related to npm not being able to find a file.
`
This comment was removed by Dreamy_Jazz.

The above error is seen in every quibble-with-gated-extensions-vendor-mysql-php83 job that isn't for MediaWiki core for a few hours

Seen with every Vector 2022 change too.

I think I just saw this in a patch to mediawiki-core as well?

18:03:21 npm warn tarball tarball data for @typescript-eslint/eslint-plugin@8.46.0 (sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA==) seems to be corrupted. Trying again.
18:03:31 npm error code ENOENT
18:03:31 npm error syscall stat
18:03:31 npm error path /cache/_cacache/content-v2/sha512/e4/7b/c83c8c01523a98983d7c98f4d2f65b38138df7250014c4374962a0a925d0789d457c0b931919e7c18a5503cb3d85f80ff2d0a6af8650a858788c38f1e02f
18:03:31 npm error errno ENOENT
18:03:31 npm error enoent Invalid response body while trying to fetch https://registry.npmjs.org/zip-stream: ENOENT: no such file or directory, stat '/cache/_cacache/content-v2/sha512/e4/7b/c83c8c01523a98983d7c98f4d2f65b38138df7250014c4374962a0a925d0789d457c0b931919e7c18a5503cb3d85f80ff2d0a6af8650a858788c38f1e02f'
18:03:31 npm error enoent This is related to npm not being able to find a file.

in https://integration.wikimedia.org/ci/job/mediawiki-node24/39071/ on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1271913

"npm not finding a file" is pretty different from "Gerrit network problems". We have a separate ticket for the NPM problem linked above and it seems that has been resolved meanwhile by emptying caches. like:

22:35 <+thcipriani> !log thcipriani@integration-castor06:~$ sudo -u jenkins-deploy rm -rf /srv/castor/castor-mw-ext-and-skins/master/mediawiki-node24/ #T429824

Maybe. But we could be getting corruption due to the network problems, then the corruption (a truncated file?) eventually causes npm to error out. Clearing the caches is a brute-force workaround to the problem of a bad npm download from a bad network connection. Despite clearing the caches, the problem seems to recur.

I could be wrong, of course. Reported this over in T429824#12043074 as well. T429749#12041464 in this task seemed similar to what I was reporting, but @Tgr might have been contrasting this bug with that one, rather than drawing similarities.

I think there might be two issues here.

The npm tarball corruption in T429824 is a bit different. To measure the ATS timeouts, we watch the rate of network error on gerrit clones on contint hosts, differenciated from the global CI failure rate which is the one where should see the npm issue.

Maybe. But we could be getting corruption due to the network problems, then the corruption (a truncated file?) eventually causes npm to error out. Clearing the caches is a brute-force workaround to the problem of a bad npm download from a bad network connection. Despite clearing the caches, the problem seems to recur.

I could be wrong, of course. Reported this over in T429824#12043074 as well. T429749#12041464 in this task seemed similar to what I was reporting, but @Tgr might have been contrasting this bug with that one, rather than drawing similarities.

@cscott your theory is plausible but but it would probably be monitored by a different type of error.

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

[integration/config@master] jjb: trace git HTTPS transport on gated quibble jobs to debug gerrit resets

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

@hashar I tried to reuse your idea to try and trace failed jobs with that change. Let me know if I can help move this forward.

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

[operations/puppet@production] taskgen: allow profile_yaml to render templates

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

With more local cache on CI build agents, the connection reset rate seems to be lower.

We still need to trace failed builds which will be manually done by @hashar. We also discussed the suggested timeouts with Traffic (thank you @ssingh). We'll test them first on Gitlab in T425441: gitlab behind CDN.

ABran-WMF changed the task status from In Progress to Stalled.Jul 2 2026, 7:32 AM

Marking this Stalled while T430901: Get traces/logs from ATS on Gerrit CI errors is being handled

Change #1305393 abandoned by Arnaudb:

[integration/config@master] jjb: trace git HTTPS transport on gated quibble jobs to debug gerrit resets

Reason:

https://phabricator.wikimedia.org/T430901#12078972

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

Change #1306481 merged by Arnaudb:

[operations/puppet@production] taskgen: allow profile_yaml to render templates

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

The network error rate is now consistently lower than 1%, this task will be marked as Resolved.
Follow up work will be done with T430901: Get traces/logs from ATS on Gerrit CI errors, we might also profit from the experience gained in T425441: gitlab behind CDN to better match git http patterns.

Should the problem reappear, please file a new task referencing this one rather than reopening it: this task already carries a long investigation history, and a fresh task with a clean timeline will make the new occurrence much easier to track.