-
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
childprocess kill() results in -4048 EPERM error on windows since update to v21.6.2 #51766
Comments
@nodejs/libuv |
Should I open another issue in libuv? |
Maybe? I don't know if that would be relevant without a repro using libuv directly. FWIW this commit changed the implementation of the |
@santigimeno could you take a look? |
So, I think there's a regression in libuv which might be solved in libuv/libuv#4341. Regardless, just curious why the need to call |
It spins up the server and then kills it. Was this way for quiete a while. i could have patched it, but then I could not have report this bug ;) |
This is fixed in libuv, so it'll be fixed once a new version reaches node. |
great job, thanks |
Is it correct that the update in libuv did not land in Node 22 either? Is there any timeline for this? |
I dont know. I just know that we patched our test in undici accordingly to not run into the issue again. So probably the bug exists still. Would need to check on a windows machine. |
Happens for me only when killed from inside this event handler: process.on('SIGINT', () => {
killChildProcess();
}) When in main loop |
Have someone found the issue ? I'm still receiving the same error with node version 21.7.3 : |
I'm getting this error whenever I try and SIGKILL an ffmpeg child process during encoding. |
Reverts #12267 This test was skipped in Windows because it was flakey. This PR unskips it and resolves the flakiness by adjusting some timeout values. --- This turned out to be a specific issue with [Node 22 and Windows](nodejs/node#51766) and timers. The way our use of `waitUntil` works with the `devServer`'s simulations of serverless functions creates an environment where we can kill the dev server at the same time that the `waitUntil` promise expires. I didn't nail down the exact flow that happens here, but this causes the Node 22 + Windows `EPREM` error to bubble up to the test failure. Ultimately, the specific flow isn't critical to figure out here. This is a test setup issue, not a production issue. --- In an attempt to prove this is no longer flakey, here are several consecutive successful runs: - https://github.com/vercel/vercel/actions/runs/11469305192/job/31916358922?pr=12333 - https://github.com/vercel/vercel/actions/runs/11469447637/job/31916775908?pr=12333 - https://github.com/vercel/vercel/actions/runs/11469447637/job/31917078929?pr=12333 - https://github.com/vercel/vercel/actions/runs/11469447637/job/31917252353?pr=12333
Version
v21.6.2
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
child_process
What steps will reproduce the bug?
Suddenly in latest undici the tests in
test/node-test/debug.js
fail if run under windows with node v21.6.2.It fails under PowerShell and cmd.
It seems that there is suddenly a permission issue when trying to kill a child_process. With node v21.6.1 .kill() doesnt throw.
How often does it reproduce? Is there a required condition?
Always reproducable
What is the expected behavior? Why is that the expected behavior?
Should not throw (and close the child process)
What do you see instead?
Additional information
I assume that this bug is coming from libuv.
The text was updated successfully, but these errors were encountered: