Sequentialize uncaught exceptions in Node.js Workers - #25041
Merged
Conversation
juj
force-pushed
the
fix_flaky_test_pthread_abort
branch
2 times, most recently
from
August 25, 2025 10:02
848ca23 to
f422942
Compare
…stMessage() stream that other messages go through, to ensure they are received by the main thread in the order they were generated. Fixes emscripten-core#15014. See nodejs/node#59617 Ruff
juj
force-pushed
the
fix_flaky_test_pthread_abort
branch
from
August 25, 2025 11:13
f422942 to
cefd3ed
Compare
sbc100
approved these changes
Aug 25, 2025
sbc100
left a comment
Collaborator
There was a problem hiding this comment.
So if I'm understanding correctly, issue is with the onAbort handler, which is being called via the callHandler message is racing with the onerror handler for uncaught exceptions?
Nice work find this!
sbc100
reviewed
Aug 25, 2025
Collaborator
Author
Thanks - that looks like the case. For some reason Node.js internally uses a different mechanism to propagate postMessage()s vs process.on('uncaughtError')s from Worker to parent. |
sbc100
reviewed
Aug 25, 2025
juj
enabled auto-merge (squash)
August 25, 2025 19:06
juj
force-pushed
the
fix_flaky_test_pthread_abort
branch
from
August 25, 2025 19:49
a839349 to
43e00dd
Compare
juj
disabled auto-merge
August 25, 2025 23:35
inolen
pushed a commit
to inolen/emscripten
that referenced
this pull request
Feb 13, 2026
…#25041) Sequentialize uncaught exceptions in Node.js Workers into the same postMessage() stream that other messages go through, to ensure they are received by the main thread in the order they were generated. Fixes emscripten-core#15014. See nodejs/node#59617.
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.
Sequentialize uncaught exceptions in Node.js Workers into the same postMessage() stream that other messages go through, to ensure they are received by the main thread in the order they were generated.
Fixes #15014.
See nodejs/node#59617.