Skip to content

deps: libuv: cherry-pick aabb7651de#62561

Open
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:libuv-fix
Open

deps: libuv: cherry-pick aabb7651de#62561
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:libuv-fix

Conversation

@aduh95
Copy link
Copy Markdown
Contributor

@aduh95 aduh95 commented Apr 2, 2026

panjf2000 and others added 2 commits April 2, 2026 12:35
Original commit message:

  tcp: support customizing TCP_KEEPINTVL and TCP_KEEPCNT

  Implement `uv_tcp_keepalive_ex` function that extends
  `uv_tcp_keepalive` to support `TCP_KEEPINTVL` and `TCP_KEEPCN`
  socket options in addition to TCP_KEEPIDLE.

Refs: libuv/libuv@3a9a6e3
Original commit message:

  win: properly initialize OSVERSIONINFOW (nodejs#5107)

  Otherwise calling `RtlGetVersion()` might produce UB. Problem was
  causing random crashes in the node.js test suite with stack traces like
  this one:
  ```
  node.exe!__report_gsfailure(unsigned __int64 stack_cookie) Line 220
    at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\gs\gs_report.c(220)
  node.exe!uv__tcp_keepalive(uv_tcp_s * socket, unsigned __int64 on, int idle, unsigned int intvl, unsigned int cnt, unsigned int) Line 109
    at E:\node\deps\uv\src\win\tcp.c(109)
  [Inline Frame] node.exe!uv_tcp_keepalive_ex(uv_tcp_s * handle, int on, unsigned int idle, unsigned int intvl, unsigned int cnt) Line 1406
    at E:\node\deps\uv\src\win\tcp.c(1406)
  node.exe!uv_tcp_keepalive(uv_tcp_s * handle, int on, unsigned int idle) Line 1395
    at E:\node\deps\uv\src\win\tcp.c(1395)
  node.exe!node::TCPWrap::SetKeepAlive(const v8::FunctionCallbackInfo<v8::Value> & args) Line 213
    at E:\node\src\tcp_wrap.cc(213)
  [External Code]
  node.exe!v8::internal::`anonymous namespace'::Invoke(v8::internal::Isolate * isolate, const v8::internal::`anonymous namespace'::InvokeParams & params) Line 463
    at E:\node\deps\v8\src\execution\execution.cc(463)
  node.exe!v8::internal::Execution::Call(v8::internal::Isolate * isolate, v8::internal::DirectHandle<v8::internal::Object> callable, v8::internal::DirectHandle<v8::internal::Object> receiver, v8::base::Vector<const v8::internal::DirectHandle<v8::internal::Object>> args) Line 532
    at E:\node\deps\v8\src\execution\execution.cc(532)
  node.exe!v8::Function::Call(v8::Isolate * isolate, v8::Local<v8::Context> context, v8::Local<v8::Value> recv, int argc, v8::Local<v8::Value> * argv) Line 5374
    at E:\node\deps\v8\src\api\api.cc(5374)
  node.exe!v8::Function::Call(v8::Local<v8::Context> context, v8::Local<v8::Value> recv, int argc, v8::Local<v8::Value> * argv) Line 5381
    at E:\node\deps\v8\src\api\api.cc(5381)
  node.exe!node::InternalMakeCallback(node::Environment * env, v8::Local<v8::Object> resource, v8::Local<v8::Object> recv, const v8::Local<v8::Function> callback, int argc, v8::Local<v8::Value> * argv, node::async_context asyncContext, v8::Local<v8::Value> context_frame) Line 257
    at E:\node\src\api\callback.cc(257)
  node.exe!node::AsyncWrap::MakeCallback(const v8::Local<v8::Function> cb, int argc, v8::Local<v8::Value> * argv) Line 695
    at E:\node\src\async_wrap.cc(695)
  [Inline Frame] node.exe!node::AsyncWrap::MakeCallback(const v8::Local<v8::Name> symbol, int argc, v8::Local<v8::Value> * argv) Line 101
    at E:\node\src\async_wrap-inl.h(101)
  [Inline Frame] node.exe!node::AsyncWrap::MakeCallback(const v8::Local<v8::String> symbol, int argc, v8::Local<v8::Value> * argv) Line 78
    at E:\node\src\async_wrap-inl.h(78)
  node.exe!node::ConnectionWrap<node::TCPWrap,uv_tcp_s>::OnConnection(uv_stream_s * handle, int status) Line 73
    at E:\node\src\connection_wrap.cc(73)
  node.exe!uv__process_tcp_accept_req(uv_loop_s * loop, uv_tcp_s * handle, uv_req_s * raw_req) Line 1245
    at E:\node\deps\uv\src\win\tcp.c(1245)
  node.exe!uv__process_reqs(uv_loop_s * loop) Line 622
    at E:\node\deps\uv\src\win\core.c(622)
  node.exe!uv_run(uv_loop_s * loop, <unnamed-tag> mode) Line 736
    at E:\node\deps\uv\src\win\core.c(736)
  node.exe!node::SpinEventLoopInternal(node::Environment * env) Line 43
    at E:\node\src\api\embed_helpers.cc(43)
  [Inline Frame] node.exe!node::NodeMainInstance::Run(node::ExitCode * exit_code, node::Environment * env) Line 109
    at E:\node\src\node_main_instance.cc(109)
  node.exe!node::NodeMainInstance::Run() Line 99
    at E:\node\src\node_main_instance.cc(99)
  [Inline Frame] node.exe!node::StartInternal(int argc, char * * argv) Line 1576
    at E:\node\src\node.cc(1576)
  node.exe!node::Start(int argc, char * * argv) Line 1583
    at E:\node\src\node.cc(1583)
  node.exe!wmain(int argc, wchar_t * * wargv) Line 91
    at E:\node\src\node_main.cc(91)
  ```

  Fixes: libuv/libuv#5106

Refs: libuv/libuv@aabb765
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added libuv Issues and PRs related to the libuv dependency or the uv binding. needs-ci PRs that need a full CI run. labels Apr 2, 2026
@aduh95 aduh95 added dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. labels Apr 2, 2026
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. and removed dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. labels Apr 2, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 2, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Apr 2, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Apr 4, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/62561
βœ”  Done loading data for nodejs/node/pull/62561
----------------------------------- PR info ------------------------------------
Title      deps: libuv: cherry-pick aabb7651de (#62561)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     aduh95:libuv-fix -> nodejs:main
Labels     libuv, author ready, needs-ci, commit-queue-rebase, dont-land-on-v25.x
Commits    2
 - deps: libuv: reapply 3a9a6e3e6b
 - deps: libuv: cherry-pick aabb7651de
Committers 1
 - Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62561
Reviewed-By: RenΓ© <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan JosΓ© Arboleda <soyjuanarbol@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62561
Reviewed-By: RenΓ© <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan JosΓ© Arboleda <soyjuanarbol@gmail.com>
--------------------------------------------------------------------------------
   β„Ή  This PR was created on Thu, 02 Apr 2026 10:41:48 GMT
   βœ”  Approvals: 3
   βœ”  - RenΓ© (@Renegade334): https://github.com/nodejs/node/pull/62561#pullrequestreview-4049866217
   βœ”  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/62561#pullrequestreview-4052355536
   βœ”  - Juan JosΓ© Arboleda (@juanarbol): https://github.com/nodejs/node/pull/62561#pullrequestreview-4052359240
   βœ”  Last GitHub CI successful
   β„Ή  Last Full PR CI on 2026-04-02T13:36:33Z: https://ci.nodejs.org/job/node-test-pull-request/72423/
- Querying data for job/node-test-pull-request/72423/
βœ”  Build data downloaded
   βœ”  Last Jenkins CI successful
--------------------------------------------------------------------------------
   βœ”  No git cherry-pick in progress
   βœ”  No git am in progress
   βœ”  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
βœ”  origin/main is now up-to-date
- Downloading patch for 62561
From https://github.com/nodejs/node
 * branch                  refs/pull/62561/merge -> FETCH_HEAD
βœ”  Fetched commits as 6d954e7bbbc4..28414fc67882
--------------------------------------------------------------------------------
[main 6feaad8c92] deps: libuv: reapply 3a9a6e3e6b
 Author: Andy Pan <i@andypan.me>
 Date: Wed May 21 14:43:53 2025 +0800
 8 files changed, 199 insertions(+), 59 deletions(-)
[main f3f237f1fb] deps: libuv: cherry-pick aabb7651de
 Author: Santiago Gimeno <santiago.gimeno@gmail.com>
 Date: Thu Apr 2 11:44:25 2026 +0200
 1 file changed, 2 insertions(+)
   βœ”  Patches applied
There are 2 commits in the PR. Attempting autorebase.
(node:393) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
deps: libuv: reapply 3a9a6e3e6b

Original commit message:

tcp: support customizing TCP_KEEPINTVL and TCP_KEEPCNT

Implement uv_tcp_keepalive_ex function that extends
uv_tcp_keepalive to support TCP_KEEPINTVL and TCP_KEEPCN
socket options in addition to TCP_KEEPIDLE.

Refs: libuv/libuv@3a9a6e3
PR-URL: #62561
Reviewed-By: RenΓ© <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan JosΓ© Arboleda <soyjuanarbol@gmail.com>

[detached HEAD 41ade25838] deps: libuv: reapply 3a9a6e3e6b
Author: Andy Pan <i@andypan.me>
Date: Wed May 21 14:43:53 2025 +0800
8 files changed, 199 insertions(+), 59 deletions(-)
Rebasing (3/4)
Rebasing (4/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
deps: libuv: cherry-pick aabb7651de

Original commit message:

win: properly initialize OSVERSIONINFOW (#5107)

Otherwise calling RtlGetVersion() might produce UB. Problem was
causing random crashes in the node.js test suite with stack traces like
this one:

node.exe!__report_gsfailure(unsigned __int64 stack_cookie) Line 220
  at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\gs\gs_report.c(220)
node.exe!uv__tcp_keepalive(uv_tcp_s * socket, unsigned __int64 on, int idle, unsigned int intvl, unsigned int cnt, unsigned int) Line 109
  at E:\node\deps\uv\src\win\tcp.c(109)
[Inline Frame] node.exe!uv_tcp_keepalive_ex(uv_tcp_s * handle, int on, unsigned int idle, unsigned int intvl, unsigned int cnt) Line 1406
  at E:\node\deps\uv\src\win\tcp.c(1406)
node.exe!uv_tcp_keepalive(uv_tcp_s * handle, int on, unsigned int idle) Line 1395
  at E:\node\deps\uv\src\win\tcp.c(1395)
node.exe!node::TCPWrap::SetKeepAlive(const v8::FunctionCallbackInfo&lt;v8::Value&gt; &amp; args) Line 213
  at E:\node\src\tcp_wrap.cc(213)
[External Code]
node.exe!v8::internal::`anonymous namespace'::Invoke(v8::internal::Isolate * isolate, const v8::internal::`anonymous namespace'::InvokeParams &amp; params) Line 463
  at E:\node\deps\v8\src\execution\execution.cc(463)
node.exe!v8::internal::Execution::Call(v8::internal::Isolate * isolate, v8::internal::DirectHandle&lt;v8::internal::Object&gt; callable, v8::internal::DirectHandle&lt;v8::internal::Object&gt; receiver, v8::base::Vector&lt;const v8::internal::DirectHandle&lt;v8::internal::Object&gt;&gt; args) Line 532
  at E:\node\deps\v8\src\execution\execution.cc(532)
node.exe!v8::Function::Call(v8::Isolate * isolate, v8::Local&lt;v8::Context&gt; context, v8::Local&lt;v8::Value&gt; recv, int argc, v8::Local&lt;v8::Value&gt; * argv) Line 5374
  at E:\node\deps\v8\src\api\api.cc(5374)
node.exe!v8::Function::Call(v8::Local&lt;v8::Context&gt; context, v8::Local&lt;v8::Value&gt; recv, int argc, v8::Local&lt;v8::Value&gt; * argv) Line 5381
  at E:\node\deps\v8\src\api\api.cc(5381)
node.exe!node::InternalMakeCallback(node::Environment * env, v8::Local&lt;v8::Object&gt; resource, v8::Local&lt;v8::Object&gt; recv, const v8::Local&lt;v8::Function&gt; callback, int argc, v8::Local&lt;v8::Value&gt; * argv, node::async_context asyncContext, v8::Local&lt;v8::Value&gt; context_frame) Line 257
  at E:\node\src\api\callback.cc(257)
node.exe!node::AsyncWrap::MakeCallback(const v8::Local&lt;v8::Function&gt; cb, int argc, v8::Local&lt;v8::Value&gt; * argv) Line 695
  at E:\node\src\async_wrap.cc(695)
[Inline Frame] node.exe!node::AsyncWrap::MakeCallback(const v8::Local&lt;v8::Name&gt; symbol, int argc, v8::Local&lt;v8::Value&gt; * argv) Line 101
  at E:\node\src\async_wrap-inl.h(101)
[Inline Frame] node.exe!node::AsyncWrap::MakeCallback(const v8::Local&lt;v8::String&gt; symbol, int argc, v8::Local&lt;v8::Value&gt; * argv) Line 78
  at E:\node\src\async_wrap-inl.h(78)
node.exe!node::ConnectionWrap&lt;node::TCPWrap,uv_tcp_s&gt;::OnConnection(uv_stream_s * handle, int status) Line 73
  at E:\node\src\connection_wrap.cc(73)
node.exe!uv__process_tcp_accept_req(uv_loop_s * loop, uv_tcp_s * handle, uv_req_s * raw_req) Line 1245
  at E:\node\deps\uv\src\win\tcp.c(1245)
node.exe!uv__process_reqs(uv_loop_s * loop) Line 622
  at E:\node\deps\uv\src\win\core.c(622)
node.exe!uv_run(uv_loop_s * loop, &lt;unnamed-tag&gt; mode) Line 736
  at E:\node\deps\uv\src\win\core.c(736)
node.exe!node::SpinEventLoopInternal(node::Environment * env) Line 43
  at E:\node\src\api\embed_helpers.cc(43)
[Inline Frame] node.exe!node::NodeMainInstance::Run(node::ExitCode * exit_code, node::Environment * env) Line 109
  at E:\node\src\node_main_instance.cc(109)
node.exe!node::NodeMainInstance::Run() Line 99
  at E:\node\src\node_main_instance.cc(99)
[Inline Frame] node.exe!node::StartInternal(int argc, char * * argv) Line 1576
  at E:\node\src\node.cc(1576)
node.exe!node::Start(int argc, char * * argv) Line 1583
  at E:\node\src\node.cc(1583)
node.exe!wmain(int argc, wchar_t * * wargv) Line 91
  at E:\node\src\node_main.cc(91)

Fixes: libuv/libuv#5106

Refs: libuv/libuv@aabb765
PR-URL: #62561
Reviewed-By: RenΓ© <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan JosΓ© Arboleda <soyjuanarbol@gmail.com>

[detached HEAD 3aada349b8] deps: libuv: cherry-pick aabb7651de
Author: Santiago Gimeno <santiago.gimeno@gmail.com>
Date: Thu Apr 2 11:44:25 2026 +0200
1 file changed, 2 insertions(+)
Successfully rebased and updated refs/heads/main.

βœ” 41ade2583824381db0c98209208b5e4095792370
βœ” 0:0 no Co-authored-by metadata co-authored-by-is-trailer
βœ” 0:0 skipping fixes-url fixes-url
βœ” 0:0 blank line after title line-after-title
βœ” 0:0 line-lengths are valid line-length
βœ” 0:0 metadata is at end of message metadata-end
βœ” 10:8 PR-URL is valid. pr-url
βœ” 0:0 reviewers are valid reviewers
βœ” 0:0 valid subsystems subsystem
βœ” 0:0 Title is formatted correctly. title-format
βœ” 0:0 Title is <= 50 columns. title-length
βœ– 3aada349b8fc06111d9dc816557cb4841c859d56
βœ” 0:0 no Co-authored-by metadata co-authored-by-is-trailer
βœ” 58:9 Valid fixes URL. fixes-url
βœ” 0:0 blank line after title line-after-title
βœ– 6:72 Line should be <= 72 columns. line-length
βœ– 11:72 Line should be <= 72 columns. line-length
βœ– 13:72 Line should be <= 72 columns. line-length
βœ– 15:72 Line should be <= 72 columns. line-length
βœ– 17:72 Line should be <= 72 columns. line-length
βœ– 20:72 Line should be <= 72 columns. line-length
βœ– 22:72 Line should be <= 72 columns. line-length
βœ– 24:72 Line should be <= 72 columns. line-length
βœ– 26:72 Line should be <= 72 columns. line-length
βœ– 28:72 Line should be <= 72 columns. line-length
βœ– 30:72 Line should be <= 72 columns. line-length
βœ– 32:72 Line should be <= 72 columns. line-length
βœ– 34:72 Line should be <= 72 columns. line-length
βœ– 36:72 Line should be <= 72 columns. line-length
βœ– 38:72 Line should be <= 72 columns. line-length
βœ– 46:72 Line should be <= 72 columns. line-length
βœ– 50:72 Line should be <= 72 columns. line-length
βœ” 0:0 metadata is at end of message metadata-end
βœ” 61:8 PR-URL is valid. pr-url
βœ” 0:0 reviewers are valid reviewers
βœ” 0:0 valid subsystems subsystem
βœ” 0:0 Title is formatted correctly. title-format
βœ” 0:0 Title is <= 50 columns. title-length
β„Ή Please fix the commit message and try again.
Please manually ammend the commit message, by running
git commit --amend
Once commit message is fixed, finish the landing command running
git node land --continue

https://github.com/nodejs/node/actions/runs/23977342246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. libuv Issues and PRs related to the libuv dependency or the uv binding. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants