node icon indicating copy to clipboard operation
node copied to clipboard

Node sometimes locks up when reading from named pipe on Windows

Open mika-fischer opened this issue 8 months ago • 0 comments

Version

v22.13.1

Platform

Microsoft Windows NT 10.0.26100.0 x64

Subsystem

No response

What steps will reproduce the bug?

Node is sometimes locking up completely. Unfortunately, it happens only in production, and we have not yet been able to reproduce it. However, we received a memory dump of the nodejs process which shows that it hangs in the following call stack:

 	ntdll.dll!NtWaitForSingleObject()	Unbekannt
 	KERNELBASE.dll!WaitForSingleObjectEx()	Unbekannt
 	KERNELBASE.dll!GetOverlappedResult()	Unbekannt
 	node.exe!uv__pipe_read_data(uv_loop_s * loop, uv_pipe_s * handle, unsigned long * bytes_read, unsigned long max_bytes) Zeile 2008	C
 	node.exe!uv__process_pipe_read_req(uv_loop_s * loop, uv_pipe_s * handle, uv_req_s * req) Zeile 2162	C
 	[Inlineframe] node.exe!uv__process_reqs(uv_loop_s *) Zeile 159	C
 	node.exe!uv_run(uv_loop_s * loop, uv_run_mode mode) Zeile 639	C
 	node.exe!node::SpinEventLoopInternal(node::Environment * env) Zeile 42	C++
 	[Inlineframe] node.exe!node::NodeMainInstance::Run(node::ExitCode *) Zeile 110	C++
 	node.exe!node::NodeMainInstance::Run() Zeile 100	C++
 	node.exe!node::StartInternal(int argc, char * * argv) Zeile 1540	C++
 	node.exe!node::Start(int argc, char * * argv) Zeile 1548	C++
 	node.exe!wmain(int argc, wchar_t * * wargv) Zeile 91	C++
 	[Inlineframe] node.exe!invoke_main() Zeile 90	C++
 	node.exe!__scrt_common_main_seh() Zeile 288	C++
 	kernel32.dll!BaseThreadInitThunk()	Unbekannt
 	ntdll.dll!RtlUserThreadStart()	Unbekannt

I looked in the node and libuv issues and it looks very much like https://github.com/libuv/libuv/issues/4738 . Unfortunately, the submitter closed this issue without any input from the developers.

I think this issue is real and under some circumstances, node triggers it and as a result completely locks up.

How often does it reproduce? Is there a required condition?

At the customer's site this is reliably reproducable. However, the data used to trigger the issue cannot be shared with us. We'll try to reproduce it locally, but this might prove somewhat difficult. I think https://github.com/libuv/libuv/issues/4738 and the analysis contained within is the key to solving this.

What is the expected behavior? Why is that the expected behavior?

Node should not lock up

What do you see instead?

Node locks up

Additional information

No response

mika-fischer avatar May 03 '25 09:05 mika-fischer