child_process: fix IPC 'message' event regression#13856
child_process: fix IPC 'message' event regression#13856cjihrig merged 1 commit intonodejs:masterfrom
Conversation
mcollina
left a comment
There was a problem hiding this comment.
Can you also keep the benchmark in?
lib/internal/child_process.js
Outdated
There was a problem hiding this comment.
can you restore the use of the emit() function to avoid allocating this closure?
|
@mcollina updated to only remove the |
mcollina
left a comment
There was a problem hiding this comment.
LGTM but it might be nice to point out how much throughput we lose with this fix, with a comparative benchmark of the one the original commit introduced.
|
Benchmark results from my machine: Looks like only a fraction of the gains from #13459 were lost. |
|
Thanks Colin. Still LGTM. |
|
Confirm test fails on my machine as well (Windows). |
This commit fixes a regression related to IPC 'message' events. When messages are not emitted in the next tick, a 'message' handler that throws can break the IPC read loop. Refs: nodejs#6909 Refs: nodejs#13459 Refs: nodejs#13648 PR-URL: nodejs#13856 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
|
The benchmark results from the original PR would be these since the PR was originally started before the V8 5.9 merge, so this revert has a larger impact actually. Probably the only thing that makes it have a little less of an impact is the |
This commit fixes a regression related to IPC 'message' events. When messages are not emitted in the next tick, a 'message' handler that throws can break the IPC read loop. Refs: #6909 Refs: #13459 Refs: #13648 PR-URL: #13856 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
This commit fixes a regression related to IPC 'message' events. When messages are not emitted in the next tick, a 'message' handler that throws can break the IPC read loop. Refs: #6909 Refs: #13459 Refs: #13648 PR-URL: #13856 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
This commit fixes a regression related to IPC 'message' events. When messages are not emitted in the next tick, a 'message' handler that throws can break the IPC read loop. Refs: #6909 Refs: #13459 Refs: #13648 PR-URL: #13856 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
|
I've thrown a baking label on this... we should likely land if we backport other change |
This PR reverts 8208fda from #13459. When IPC messages are not emitted in the next tick, a
'message'handler that throws can break the IPC read loop. This was originally fixed in #6909.The second commit in this PR adds a regression test that fails with 8208fda, but passes with the revert (at least on my machine).
Note: I believe this can be fixed without a full revert of 8208fda, but wanted to use that as a starting point for this PR.
Refs: #6909
Refs: #13459
Refs: #13648
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
child_process, test