You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A stream object returned from fs.createReadStream() is supposed to emit end event, but when reading a certain file from ZipFS, the stream emits 'close' but no 'end'.
To Reproduce
A Sharlock repro is given, but it's not perfect and can be flaky. Because we need Node.js v14.1.0 or higher to reproduce the problem properly.
Apparently, the Sharlock repro doesn't runs on a newer Node and we have 'end' event emitted but in different order leading the test to fail. I'm not sure if the order is a problem. If not, the Sharlock test is flaky. However, from my observation, it is likely that only the files which get the events in reverse order on older Node miss 'end' on v14.1.0+.
This code interacts with ZipFS directly and prints file names in @yarnpkg/fslib zip file from .yarn/cache along with emitted event names from its ReadStream.
On Node.js v14.1.0, the program stops in the middle of execution (see nodejs/promises-debugging#16).
This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).
Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃
If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟
Describe the bug
A stream object returned from
fs.createReadStream()
is supposed to emitend
event, but when reading a certain file from ZipFS, the stream emits 'close' but no 'end'.To Reproduce
A Sharlock repro is given, but it's not perfect and can be flaky. Because we need Node.js v14.1.0 or higher to reproduce the problem properly.
Apparently, the Sharlock repro doesn't runs on a newer Node and we have 'end' event emitted but in different order leading the test to fail. I'm not sure if the order is a problem. If not, the Sharlock test is flaky. However, from my observation, it is likely that only the files which get the events in reverse order on older Node miss 'end' on v14.1.0+.
I made a more proper repro on my repo.
This code interacts with ZipFS directly and prints file names in
@yarnpkg/fslib
zip file from.yarn/cache
along with emitted event names from its ReadStream.On Node.js v14.1.0, the program stops in the middle of execution (see nodejs/promises-debugging#16).
Here's Sharlock repro.
Reproduction
Playground
Output:
Screenshots
If applicable, add screenshots to help explain your problem.
Environment if relevant (please complete the following information):
Additional context
It can be an upstream problem, but I'm suspecting the problem can root to how ZipFS ReadStream is implemented.
berry/packages/yarnpkg-fslib/sources/ZipFS.ts
Lines 451 to 463 in 7929629
The text was updated successfully, but these errors were encountered: