Skip to content

deps: cherry-pick libuv/libuv@439a54b#62881

Open
skooch wants to merge 1 commit intonodejs:mainfrom
skooch:fix/libuv-copyfile-cifs-eperm
Open

deps: cherry-pick libuv/libuv@439a54b#62881
skooch wants to merge 1 commit intonodejs:mainfrom
skooch:fix/libuv-copyfile-cifs-eperm

Conversation

@skooch
Copy link
Copy Markdown

@skooch skooch commented Apr 22, 2026

Cherry-pick libuv/libuv@439a54b to fix uv_fs_copyfile() failing with EPERM on CIFS/SMB mounts. Timestamp preservation is now best-effort, matching the existing treatment of fchown() in the same function. I'm also the author of the libuv fix.

This is a regression introduced by the libuv 1.49.0 update (Node.js 22.12.0 via #55114), which added timestamp preservation to uv_fs_copyfile(). Since then, fs.copyFile() / fs.copyFileSync() have failed with EPERM on CIFS/SMB mounts on Linux.

The buggy block is the same on v22.x-staging and v24.x-staging (both on libuv 1.51.0), so lts-watch-v22.x and lts-watch-v24.x are good candidates once this matures.

Fixes: #56248
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396

Original commit message:

    unix: treat futimens() as best-effort in copyfile

    futimens() may fail with EPERM on CIFS/SMB shares that do not
    support setting timestamps. Since preserving timestamps during
    copyfile is best-effort, ignore the return value unconditionally.

    Refs: libuv/libuv#4396

Fixes: nodejs#56248
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@skooch
Copy link
Copy Markdown
Author

skooch commented Apr 22, 2026

Failures look unlikely to be related, would someone mind re-running the jobs? 🙏

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@skooch
Copy link
Copy Markdown
Author

skooch commented Apr 22, 2026

Looks like different failures again. Not sure what's going on here.

The first one (node-test-commit-linux-containered.ubuntu2404_sharedlibs_openssl32_x64.parallel.test_debugger_probe_miss) has the process terminating with SIGSEGV prior to probe which look like it could be a flake.

The second (node-test-commit-linux.alpine-latest-x64.async-hooks.test_emit_before_on_destroyed) I'm not quite sure about, but it's not consistent with the past run.

Mac is still pending macos15-x64.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

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

Labels

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

3 participants