You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Diagnostic correction: Bun stalled ServerResponse close event does not prove socket liveness #585
New controlled local diagnostic while designing equivalent coverage for #581, on integration3fe7993954002040906e526bf7437bfae19d36b2. A real node:http registry records the incoming request and waits indefinitely. Start actual Npm.Service.install with fresh project/cache/rc settings, rendezvous at the request, then Fiber.interrupt the install. Interruption returns; the server response does not emit close within5seconds. It closes only when the fixture forcibly destroys its socket. Same result after sending response headers/partialJSON body.
Instrumented actual Npm AbortController confirms interruption callback is executed, signal changes false→true, yet the response remains open. Source instrumentation restored. This does not yet distinguish an Arborist/pacote/fetch propagation problem, Bun HTTP abort behavior, or an invalid server-close expectation. Existing core interruption tests only assert Fiber failure, not socket closure, so those passing tests do not settle this gap.
No production fix or historicalWindowszero-request cause claimed. Preserve real request identity, inspect abort propagation and underlying promise/resource lifetime before calling the installation cancellation clean. This is separate from #581 startup-budget inference and #582 fixture lifetime (fixed #583).
Correction after a discriminating observation: the server TCP socket DOES close on abort under Bun, but ServerResponse.close does not emit in this stalled-response case. Direct npm-registry-fetch rejects AbortError:FETCH_ABORTED; server socket set drops to0 after100ms. Identical Node diagnostic emits the response close event. Updating the actual Npm regression to await TCP socket close instead passes1test/3assertions, including interrupt cause and empty lock directory. Therefore the earlier wording that a stalled registry socket remains open was unsupported and is retracted. No production Npm cancellation defect established; this is a Bun response-close event observation mismatch in the diagnostic. Closing this investigation as not reproduced with the corrected resource observation, not as a product fix.
changed the title [-]Npm interruption returns while a real stalled registry response remains open[/-][+]Diagnostic correction: Bun stalled ServerResponse close event does not prove socket liveness[/+]on Oct 24, 2026
Activity
agenteinstinct1-max commentedon Oct 24, 2026
Correction after a discriminating observation: the server TCP socket DOES close on abort under Bun, but ServerResponse.close does not emit in this stalled-response case. Direct npm-registry-fetch rejects AbortError:FETCH_ABORTED; server socket set drops to0 after100ms. Identical Node diagnostic emits the response close event. Updating the actual Npm regression to await TCP socket close instead passes1test/3assertions, including interrupt cause and empty lock directory. Therefore the earlier wording that a stalled registry socket remains open was unsupported and is retracted. No production Npm cancellation defect established; this is a Bun response-close event observation mismatch in the diagnostic. Closing this investigation as not reproduced with the corrected resource observation, not as a product fix.
[-]Npm interruption returns while a real stalled registry response remains open[/-][+]Diagnostic correction: Bun stalled ServerResponse close event does not prove socket liveness[/+]