Single non-retried EBADF socket error on registry.npmjs.org aborts the whole repository run #45532
Unanswered
eyalzek
asked this question in
Request Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
How are you running Renovate?
Self-hosted, official docker image
renovate/renovate:44.49.0(also observed similar socket-error aborts on 44.48.x), GitHub platform, large monorepo.Describe the bug
A single
write EBADFsocket error on a request toregistry.npmjs.orgduring dependency lookup aborts the whole repository run withRepository result: external-host-error. The process then exits 0, so from the outside the run looks successful.Chain of events:
abortOnError: truehost rule forhttps://registry.npmjs.org(lib/modules/datasource/npm/get.ts).EBADFis not in got's default retryableerrorCodes(unlike its transient-socket siblingsECONNRESET/EPIPE), so the request fails without any retry.Http.requesttheabortOnErrorcheck throwsExternalHostErrorbefore the stale-cache fallback (cacheProvider.bypassServer), so a cached packument that could have served the lookup is never used.ExternalHostErroraborts the repository.The error consistently appears right after a long stretch of HTTP-cache hits, i.e. the first live request after keep-alive sockets sat idle — a stale/locally-closed socket being reused. It is transient: an immediate retry would almost certainly succeed.
For a large repo this means one bad socket write costs the entire run (which can be many hours), with exit code 0.
Expected behavior
One or both of:
EBADFtreated as retryable alongsideECONNRESET/EPIPE(add to got retryerrorCodesinlib/util/http/got.ts).abortOnErrorescalates a transient socket-level error toExternalHostError(HTTP status errors still aborting as today).Relevant debug logs
Observed on two consecutive runs (different packages each time:
prettier-plugin-sh,@jest/globals). Node v24.20.0, got 14.6.6 (image defaults).All reactions