Open Uzlopak opened 6 months ago
@nodejs/libuv
@targos
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 uv_kill
function on Windows: https://github.com/libuv/libuv/commit/129362f35648a61ab19ab665014d2013731a986b
@vtjnash
@santigimeno could you take a look?
So, I think there's a regression in libuv which might be solved in https://github.com/libuv/libuv/pull/4341. Regardless, just curious why the need to call child.kill()
in those tests as the child processes should exit gracefully.
@santigimeno
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 killChildProcess
is called it works as expected.
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.