-
Notifications
You must be signed in to change notification settings - Fork 247
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
writeFileListToStream
might hang when the writable stream becomes full (asar does not work between Node 15.2.0 and 15.4.0)
#210
Comments
Might be a bug in Node? Documentation for readable.pipe() reads:
Is this still the case when piping multiple Readable streams to the same Writable stream? |
@weedz do you mind following up in the Node.js project? |
@malept Sure |
This seems to be happening for me as well when attempting to deploy https://github.com/yakyak/yakyak against node v15.4.0. It's not exactly the same I think, because randomly through the asar generating process it'll just stop and fail and not really hang - however, it also won't continue processing files in the for loop. I've added some log output to asar, and here are the relevant last lines when attempting to deploy yakyak: |
@HomerSp Looked into why it seems like Also ran strace on EDIT: Ran strace on a script which pragmatically runs |
@weedz I've done some more testing, and I've found that ultimately the problem happens because of this change from that PR above: https://github.com/nodejs/node/pull/35348/files/3dd02b3c3c675d86c6be17b6fdb8e8994a1d65ed#diff-040c1f5a53844e600d40b33c4624f1fe39fcf2f8d62c76ca3fc5ea5442231469 Hopefully they can revert that part of the pr for the next release so it'll work as it should again. |
This issue has now been fixed in nodejs/node#36563 |
Awesome! Closing this issue since the bug has been resolved in Node 👍 |
writeFileListToStream
might hang when the writable stream becomes fullwriteFileListToStream
might hang when the writable stream becomes full (asar does not work between Node 15.2.0 and 15.4.0)
For the record, the affected versions of Node.js were 15.2.0 through 15.4.0 inclusive. The fix mentioned was released in Node.js 15.5.0. |
This problem occurs when using [email protected]+ under Linux (Pop!_OS 20.10). Also tested on Mac OS 11.1 (node 15.1, 15.2 and 15.4) but no problem there. EDIT: Was able to reproduce this on the Mac setup. Might just be that the Macbook is to slow to trigger this problem reliably...
This might be the relevant change in node nodejs/node#35348.
This is reproducible (at least on my machine) in my repository https://github.com/weedz/git-good. Running the command
finishes when using [email protected], but it hangs when using [email protected] (also tested with version 15.4).
I then changed
writeFileListToStream
to wait forout.writableNeedDrain
to become false. Nowelectron-forge package
finishes when using [email protected], but this could probably be solved in a better way..The text was updated successfully, but these errors were encountered: