Repository navigation
deps: update libuv to 1.53.0 - #66282
nodejs-github-bot wants to merge 4 commits into
Conversation
|
Review requested:
|
|
This should also fix the SmartOS Switching V8's entropy source to |
|
https://github.com/nodejs/node/actions/runs/36140009857/job/108087238784?pr=66282#step:6:4886 |
|
98c9628 to
d44f17a
Compare
|
This release includes libuv/libuv#5181, which fixes |
|
Hi, I looked into the two CI failures on this PR and have fixes on a branch, in case they're useful: Windows link failure. libuv 1.53's pipe code now calls WaitOnAddress / WakeByAddressSingle, which live in Synchronization.lib. Node's uv.gyp doesn't link that library, so the build fails with LNK2019 for both symbols (from libuv.lib(pipe.obj)), then LNK1120 in node_js2c.exe. I reproduced this at d44f17a with VS 17.14 / MSVC 19.44. test-blocklist failure on Linux. libuv 1.53 includes the change from 6179e7af, which replaces the hard-coded IPv6 address buffer size in uv_ip6_addr() with INET6_ADDRSTRLEN. Longer zoned IPv6 address parts are therefore parsed instead of being truncated at the old limit. FastCheckString() still rejects address parts of 40+ characters, so the fast and slow BlockList paths disagree for the same string. That's the test-blocklist.js:891 failure. I reproduced it on Fedora 44 / GCC 16.2. I used a closed-source coding agent to help investigate and draft these. I reviewed the changes, reproduced both failures and verified the fixes myself, and I'm happy to explain or adjust anything. Feel free to cherry-pick or adapt them into this PR, or let me know if you'd rather have a separate PR. |
Track the descriptor-dependent V8 entropy failure until the libuv update in #66282 removes the dependency on opening /dev/urandom. Signed-off-by: Filip Skokan <[email protected]> Assisted-by: Codex PR-URL: #66428 Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Track the descriptor-dependent V8 entropy failure until the libuv update in #66282 removes the dependency on opening /dev/urandom. Signed-off-by: Filip Skokan <[email protected]> Assisted-by: Codex PR-URL: #66428 Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Track the descriptor-dependent V8 entropy failure until the libuv update in #66282 removes the dependency on opening /dev/urandom. Signed-off-by: Filip Skokan <[email protected]> Assisted-by: Codex PR-URL: #66428 Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
d44f17a to
97d2771
Compare
Signed-off-by: Yong Wei <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66282 +/- ##
==========================================
+ Coverage 90.43% 90.47% +0.04%
==========================================
Files 790 791 +1
Lines 275435 277088 +1653
Branches 52823 53282 +459
==========================================
+ Hits 249082 250693 +1611
- Misses 16769 16812 +43
+ Partials 9584 9583 -1
🚀 New features to boost your workflow:
|
|
We're getting a consistent According to an LLM, it's a libuv 1.53.0 regressionThis is a libuv 1.53.0 regression. On RHEL8's glibc 2.28, child processes lose their stdio, so node-gyp's python and make children can't write anything. That's why the error has no output. Root cause
Repro (standalone libuv plus a small spawn program, stdout marked CLOEXEC, inheriting fds 0-2):
Proposed fix (for --- a/deps/uv/src/unix/process.c
+++ b/deps/uv/src/unix/process.c
@@ -36,6 +36,9 @@
#include <spawn.h>
#include <paths.h>
#include <dlfcn.h>
+#if defined(__GLIBC__)
+#include <gnu/libc-version.h>
+#endif
#if defined(__PASE__)
#define _PATH_DEFPATH "/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/bin"
@@ -86,6 +89,7 @@
static uv_once_t posix_spawn_init_once = UV_ONCE_INIT;
static int posix_spawn_can_use_setsid;
+static int posix_spawn_dup2_clears_cloexec = 1;
static volatile int posix_spawn_works;
static struct uv__posix_spawn_fncs_s {
@@ -520,6 +524,19 @@
posix_spawn_fncs.file_actions.addchdir =
dlsym(RTLD_DEFAULT, "posix_spawn_file_actions_addchdir_np");
+#if defined(__GLIBC__)
+ /* posix_spawn_file_actions_adddup2(fd, fd) only clears FD_CLOEXEC since
+ * glibc 2.29 (BZ #23640); with older versions, inheriting a close-on-exec fd
+ * at the same number would close it in the child, so use fork() instead. */
+ {
+ unsigned major;
+ unsigned minor;
+ if (sscanf(gnu_get_libc_version(), "%u.%u", &major, &minor) != 2 ||
+ major < 2 || (major == 2 && minor < 29))
+ posix_spawn_dup2_clears_cloexec = 0;
+ }
+#endif
+
#ifdef __APPLE__
/* Init feature detection for POSIX_SPAWN_SETSID flag. */
uv__spawn_init_can_use_setsid();
@@ -633,6 +650,17 @@
goto error;
}
+#if defined(__linux__)
+ if (!posix_spawn_dup2_clears_cloexec) {
+ for (fd = 0; fd < stdio_count; fd++) {
+ if (pipes[fd][1] == fd) {
+ err = ENOSYS;
+ goto error;
+ }
+ }
+ }
+#endif
+
/* Do not return ENOSYS after this point, as we may mutate pipes. */
/* First duplicate low numbered fds, since it's not safe to duplicate them,With this patch the repro passes on Rocky 8 and is unchanged on Rocky 9. libuv's spawn/process tests pass on both, run as non-root. Why not the simpler change: dropping Not verified:
|
6cf6d6c to
834d87a
Compare
834d87a to
7953577
Compare
`npm run test:stress` on Windows died now and then with no output: node exited with 0xC0000409 and jest's RUNS line just stopped. A crash dump taken with procdump and symbolised against node's public PDB shows a stack-cookie failure (__report_gsfailure) in uv__tcp_connect, reached from TCPWrap::Connect. On every loopback connect, libuv passes an uninitialised OSVERSIONINFOW to RtlGetVersion; when the stack garbage reads as the size of the larger OSVERSIONINFOEXW, RtlGetVersion writes 8 bytes past it. This is libuv #5106, fixed in libuv 1.53.0. Every released node, 18 through 26.11.1, ships an older libuv (nodejs/node#66282 is still open), and the NRPE and NSCA floods open millions of loopback connections per run. The floods' connections now come from stress/lib/socket_pump.py, a standard-library Python helper driven over stdin/stdout by socket-pump.ts. It knows no protocol: NrpeClient and NscaClient still build and check every packet in TypeScript, and the pump only connects (with TLS if asked), writes, and reads until the agent closes. For NSCA it hands the IV back to node in the middle of the exchange. Requests are spread over four pump processes (NSCP_STRESS_PUMPS), because one topped out at ~3900 NSCA submissions/s. Once the agent has closed, the pump hangs up with a linger-0 reset, so neither side keeps the connection in TIME_WAIT. Without that, the agent's side held one TIME_WAIT pair per client port after a plain flood, and the TLS flood that followed on the same port had SYNs from reused ports dropped (21 s connect timeouts, WinError 121). The pump uses the selector event loop: the Windows proactor transport sends a FIN before closing, so it never resets. NSCP_STRESS_SOCKETS picks the transport. The stress global setup defaults it to python; it stays node everywhere else, so engine-concurrency.test.ts, which borrows the NRPE client, needs no Python. NrpeClient takes its TLS client certificate as files, which Python's ssl needs. The full suite passed 10/10 on Windows, plain NRPE at 10918 requests/s (node managed 5506) and NSCA at 6234/s. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Michael Medin <[email protected]>
This is an automated update of libuv to 1.53.0.