-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Awaiting a Promise between creating a stream and consuming a stream causes Node to crash with code 13 #48668
Comments
It's mentioned in the documentation on node's exit codes:
|
Sorry, I should have mentioned the old behavior was probably a bug. The new behavior is the expected behavior. |
On second thought, I think this is indeed a bug, or at least an unintentional change in behavior introduced in f9c0d5a, cc @debadree25. |
hello! hmm this does look like a bug so in my PR fixing hanging promises thing i am enqueing data during the microtask phase maybe thats causing some weird mixup in the event loop, I am investigating this! in the meanwhile do you think i should make a revert? in case this is breaking things? |
I have an issue with blobs as well that started with Node |
Here we go -> #48685 |
Similar bug with
It was working fine until There is also #48157 for blob related fixes. |
ISTM, that #48232 fixed hanging promises, but causing hanging streams right now 🤔 |
But it does call promise resolve and reject inside the readNext fn Nonetheless sorry for the delay I shall get to investigating it by tomorrow! |
It's highly likely that |
Okay adding the promise resolve indeed fixes things i am opening a PR, in the process of adding tests |
Okay on testing, it breaks existing tests 🥲 guess would be best to revert it for now i think |
Try to revert it and then add |
without the backpressure check memory leak we get memory leak, nonetheless let me try until to night else reverting the full PR |
- also work example code in nodejs#48232
…8916 Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: 8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: 8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: 8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: 8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: 8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: 8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: nodejs@8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: nodejs@8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: nodejs@8cc1438
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: nodejs@8cc1438 PR-URL: nodejs#48935 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: nodejs@8cc1438 PR-URL: nodejs#48935 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: #48668 Fixes: #48916 Fixes: #48232 Refs: 8cc1438 PR-URL: #48935 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: nodejs@8cc1438 PR-URL: nodejs#48935 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: nodejs#48668 Fixes: nodejs#48916 Fixes: nodejs#48232 Refs: nodejs@8cc1438 PR-URL: nodejs#48935 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: #48668 Fixes: #48916 Fixes: #48232 Refs: 8cc1438 PR-URL: #48935 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
Add lacked calling resolve() for finish ReadableStream source.pull(). Fixes: #48668 Fixes: #48916 Fixes: #48232 Refs: 8cc1438 PR-URL: #48935 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
Version
v20.4.0
Platform
Darwin 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64 arm Darwin
Subsystem
No response
What steps will reproduce the bug?
Run:
with
node
. The process will exit with code13
How often does it reproduce? Is there a required condition?
Always reproduces when the line
await Promise.resolve();
is included (or awaiting any promise). If that line is commented out the program prints "Done"What is the expected behavior? Why is that the expected behavior?
I expect the sample program to run to completion and print "Done", as it does in
node
v20.3.1
What do you see instead?
Node exiting with code 13:
Additional information
No response
The text was updated successfully, but these errors were encountered: