-
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
libuv update in 18.18.0 breaks webpack's thread-loader
#49911
Comments
The bug fix will be backported to v18.x automatically, it's just a matter of waiting until it shows up in a release. |
In Astro we had to pin to 18.17.1 after GitHub upgraded its CI to use 18.18. Not getting good stacktraces or failures, just seems to hang. Sounds similar to this issue. |
I've cherry-picked 88ba79b (and a4928b0 which it depends on to land cleanly) onto v18.x-staging so it's ready for the next non-security Node.js 18 release. Tentatively we have a release planned for October, see nodejs/Release#737 for the plan, but bear in mind the plan is subject to change based on releaser availability. FYI @nodejs/lts @nodejs/releasers |
I'm wondering, since this appears to be a known bug (for a while?) in 20.x, and v18 is currently the only LTS line, shouldn't have the offending commit be either omitted from the v18.18.0 release, or the v18.18.0 release be post-poned while waiting for the fix, or a bugfix release being made now with v18.18.1, as opposed to be waiting for a 18.19.0 release sometime in October? It's just a bit surprising, but I also don't have the entire context. |
Notable changes: This release addresses some regressions that appeared in Node.js 18.18.0: - (Windows) FS can not handle certain characters in file name #48673 - 18 and 20 node images give error - Text file busy (after re-build images) nodejs/docker-node#1968 - libuv update in 18.18.0 breaks webpack's thread-loader #49911 The libuv 1.45.0 and 1.46.0 updates that were released in Node.js 18.18.0 have been temporarily reverted. PR-URL: #50065
Notable changes: This release addresses some regressions that appeared in Node.js 18.18.0: - (Windows) FS can not handle certain characters in file name #48673 - 18 and 20 node images give error - Text file busy (after re-build images) nodejs/docker-node#1968 - libuv update in 18.18.0 breaks webpack's thread-loader #49911 The libuv 1.45.0 and 1.46.0 updates that were released in Node.js 18.18.0 have been temporarily reverted. PR-URL: #50066
I think here the label would also have to be supplemented with Node20. |
Notable changes: This release addresses some regressions that appeared in Node.js 18.18.0: - (Windows) FS can not handle certain characters in file name #48673 - 18 and 20 node images give error - Text file busy (after re-build images) nodejs/docker-node#1968 - libuv update in 18.18.0 breaks webpack's thread-loader #49911 The libuv 1.45.0 and 1.46.0 updates that were released in Node.js 18.18.0 have been temporarily reverted. PR-URL: #50066
v18.18.1 fix the Problem... |
It was fixed in 20.7.0 in my testing. |
In my testing is the same Bug in 20.7.0 and 20.8.0 |
I just it tested again, 20.6.1 reproduce following the instructions here while 20.7.0 and 20.8.0 do not. Are you following the instructions on this bug, or are you doing something different? |
For us, the error occurs in connection with writestream and CIFS mount |
The fix for the issue reported by OP was released in v18.18.1 and v20.7.0. I think some of you may be talking about different-but-similar-looking bugs that are tracked elsewhere so I'll go ahead and close this report. |
Oh, and @simatec, if you or anyone still experiences issues, then please open (or reopen) an issue but - and this is critical - include full steps to reproduce, without third-party code. That means no npm modules. |
I think the problem still exists in Node 20.8.0. It has only been fixed in 18.18.1 so far. The last working version of Node 20 was 20.2.0 |
Missing the critical bit though: steps to reproduce, see #50061 (comment). |
Using v18.18.1 because GitHub Actions uses v18.18.0 at the moment, and it is prone to a bug in webpack: nodejs/node#49911 (comment)
Notable changes: This release addresses some regressions that appeared in Node.js 18.18.0: - (Windows) FS can not handle certain characters in file name nodejs#48673 - 18 and 20 node images give error - Text file busy (after re-build images) nodejs/docker-node#1968 - libuv update in 18.18.0 breaks webpack's thread-loader nodejs#49911 The libuv 1.45.0 and 1.46.0 updates that were released in Node.js 18.18.0 have been temporarily reverted. PR-URL: nodejs#50066
Notable changes: This release addresses some regressions that appeared in Node.js 18.18.0: - (Windows) FS can not handle certain characters in file name nodejs#48673 - 18 and 20 node images give error - Text file busy (after re-build images) nodejs/docker-node#1968 - libuv update in 18.18.0 breaks webpack's thread-loader nodejs#49911 The libuv 1.45.0 and 1.46.0 updates that were released in Node.js 18.18.0 have been temporarily reverted. PR-URL: nodejs#50066
Version
v18.18.0
Platform
Linux abulia 6.5.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.3-1 (2023-09-13) x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Starting in an empty directory,
node -e 'console.log( "console.log( typeof {} );" ); for(let i=0; i<5000; i++){ console.log( "// we need a large file in order to trigger the bug" ); }' > index.js
. Increase the "5000" if necessary, I don't know whether it depends on the system in some manner.npm install
npm exec webpack
How often does it reproduce? Is there a required condition?
Always. No requirements I know of beyond what's described above and being on Linux.
What is the expected behavior? Why is that the expected behavior?
Because that's what happens when webpack runs successfully.
What do you see instead?
Process hangs before producing any output. CPU is not being used, processes seem to be waiting in
epoll_pwait
.Additional information
It worked in 18.17.1. fb2b80f appears to be the first failing commit.
Setting
UV_USE_IO_URING=0
works around the problem. Of course, that's undocumented and temporary so a real fix would be good.I found this problem exists in 20.3.0 through 20.6.1 as well, but is not present in 20.7.0. A
git bisect
turned up 88ba79b as the commit that fixed it. Cherry-picking that commit onto 18.18.0 fixes it for me there too.So my guess is that the new io_uring stuff started returning short writes when passed a lot of data, which WriteStream didn't handle correctly until 88ba79b fixed it.
See also webpack-contrib/thread-loader#191
The text was updated successfully, but these errors were encountered: