Repository navigation
test: limit concurrency in gc-http-client tests - #67607
Merged
Merged
Conversation
The tests started one request chain per CPU, each issuing a new request on every event loop turn until the first response arrived. On a loaded macOS host this put more than 128 connections in flight, overflowing the listen queue. The kernel then drops an incomplete connection and answers its final ACK with a RST, so the client fails with `connect ECONNRESET`. Use a fixed number of concurrent requests and a fixed total instead. Drive-by: the error handler in test-gc-http-client-onerror rethrows, fix the comment that says it does nothing. Signed-off-by: Matteo Collina <hello@matteocollina.com>
panva
approved these changes
Nov 19, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67607 +/- ##
==========================================
- Coverage 90.72% 90.71% -0.02%
==========================================
Files 801 801
Lines 280809 280809
Branches 54212 54213 +1
==========================================
- Hits 254776 254733 -43
- Misses 16209 16247 +38
- Partials 9824 9829 +5 🚀 New features to boost your workflow:
|
jakecastelli
approved these changes
Nov 19, 2026
Collaborator
christianaurichzm
approved these changes
Nov 19, 2026
Collaborator
|
Landed in 06250cb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tests started one request chain per CPU, each issuing a new request on every event loop turn until the first response arrived. On a loaded macOS host this put more than 128 connections in flight, overflowing the listen queue. The kernel then drops an incomplete connection and answers its final ACK with a RST, so the client fails with
connect ECONNRESET.Use a fixed number of concurrent requests and a fixed total instead.
Failure seen on
node-test-commit-osx(macos15-x64):174 requests were in flight before the first response. macOS caps the accept queue at
kern.ipc.somaxconn(128), regardless of the 511 backlog Node.js requests. When the queue is full, XNU'stcp_dropdropablreq()silently closes a connection that is still inSYN_RECEIVED, and the listener answers the client's final ACK with a RST. Both the::1and127.0.0.1attempts fail because they share the same dual-stack listener.I could not reproduce the failure locally on Apple Silicon, where the extra SYNs are dropped and retried instead. With this change, at most 9 connections are open at once, down from 64 locally and 174 on CI.
Drive-by: the error handler in test-gc-http-client-onerror rethrows, fix the comment that says it does nothing.
Refs: #41399
AI generated, reviewed by me.