Repository navigation
Conversation
A benchmark that hits its timeout keeps running in the background. If it later calls cluster.collect() after its hub processes were stopped or replaced, child.send emitted an unhandled ERR_IPC_CHANNEL_CLOSED 'error' and killed the whole run. Passing a send callback makes Node report the error there, so the late call rejects inside the abandoned benchmark instead. Copilot-Session: dae4a0ce-dfc4-425b-8f0e-68c3ceda6055
adstep
marked this pull request as ready for review
October 14, 2026 03:13
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.
When a benchmark hits its
withTimeoutlimit, the runner moves on, but the benchmark's promise keeps running in the background. If that promise later callscluster.collect()after its hub processes were stopped or replaced,child.sendon the closed IPC channel emits an unhandled'error'event (ERR_IPC_CHANNEL_CLOSED) on theChildProcess. That crashes the whole run.Hit this in a full run. Y2.5 timed out after 45 minutes. About an hour later, Y4.4 restarted the cluster with more server processes, and the stuck Y2.5 promise called
collect()on the old, dead children:Fix
requestinbenchmarks/src/cluster.jsnow passes a callback tochild.send. With a callback, Node passes a send failure to it instead of emitting'error'. The callback removes the listeners and rejects, so the late call fails inside the benchmark that was already abandoned, which is harmless.Validation
I gave a
Clustera hub child process that had already exited and calledcollect():ERR_IPC_CHANNEL_CLOSEDthrown fromrequest.collect()rejects withERR_IPC_CHANNEL_CLOSEDand the process keeps running.npx standard benchmarks/src/andnpx tsc --skipLibCheckalso pass. I didn't do a full benchmark run.