-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stream: fix deadlock when cloning webstreams #51131
stream: fix deadlock when cloning webstreams #51131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you amend the commit message so it matches our guidelines? using
is not an imperative verb, I suggest something like stream: fix deadlock when cloning webstreams
node/doc/contributing/pull-requests.md
Lines 170 to 172 in 1149d6b
* be prefixed with the name of the changed [subsystem](#appendix-subsystems) | |
and start with an imperative verb. Check the output of `git log --oneline | |
files/you/changed` to find out what subsystems your changes touch. |
test/parallel/test-webstreams-using-structuredclone-exit-process.js
Outdated
Show resolved
Hide resolved
test/parallel/test-webstreams-using-structuredclone-exit-process.js
Outdated
Show resolved
Hide resolved
test/parallel/test-webstreams-using-structuredclone-exit-process.js
Outdated
Show resolved
Hide resolved
test/parallel/test-webstreams-using-structuredclone-exit-process.js
Outdated
Show resolved
Hide resolved
There seems to be a problem with FinalizationRegistry, so please wait for that to be resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsctx Can you elaborate? (just use request change to block merge)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the work on this but this isn't the correct fix. The issue is the fact that cloned ReadableStream
and WritableStream
instances use a MessageChannel
under the covers to communicate. The MessagePort
s for each need to be unref'd in order to allow the process to exit. I'll have an alternative PR opened shortly.
Fixes #44985.
Fixed a problem where the process would not terminate if structuredClone was used for webstream and body was not consumed.