`test-fs-cp-async-socket` / `test-fs-cp-sync-copy-socket-error` failure on Darwin (path length)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, node.js
调研方向
从 test/parallel/test-fs-cp-async-socket.mjs 和 test/parallel/test-fs-cp-sync-copy-socket-error.mjs 开始,然后使用较长的 checkout 路径通过 tools/test.py parallel/test-fs-cp-async-socket.mjs 重现问题。检查 Darwin 的 socket 路径限制以及日志中的不同错误;在不更改其预期 assertions 的情况下,如果受影响的 macOS jobs 中的两个测试都通过,则表示完成。
由索引模型根据 Issue 内容生成。
描述
Refs: https://github.com/nodejs/node/pull/66259#issuecomment-5836477902
Situation
https://github.com/nodejs/node/blob/v26.x/test/parallel/test-fs-cp-async-socket.mjs &
https://github.com/nodejs/node/blob/v26.x/test/parallel/test-fs-cp-sync-copy-socket-error.mjs
fail when running in GitHub Actions
https://github.com/nodejs/node/blob/v26.x/.github/workflows/test-shared.yml and only in the darwin (macOS) jobs:
- x86_64-darwin: with shared libraries
- aarch64-darwin: with shared libraries
https://github.com/nodejs/node/pull/66163 showed the error when it was landed in https://github.com/nodejs/node/commit/151845ab90d3926ceb36eedf1eade09619c3adc9
address: '/Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/.tmp.1214/copy_%1/42770.sock'
shows a path length of 106 characters
$ echo "/Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/.tmp.1214/copy_%1/42770.sock" | wc -c
106
sun_path is limited to 104 bytes on macOS (typically 103 bytes + terminating NUL), so the path described above exceeds the limits.
Cloning the node repo to Ubuntu under a long path, such as A23456789-B23456789-C23456789-D23456789-E23456789-F23456789-G also allows reproduction with:
python3 tools/test.py parallel/test-fs-cp-async-socket.mjs
Logs
See https://github.com/nodejs/node/actions/runs/35540304798/job/106156822961
=== release test-fs-cp-async-socket ===
Path: parallel/test-fs-cp-async-socket
Error: --- stderr ---
node:events:505
throw er; // Unhandled 'error' event
^
Error: listen EINVAL: invalid argument /Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/.tmp.1214/copy_%1/42770.sock
at Server.setupListenHandle [as _listen2] (node:net:2368:21)
at listenInCluster (node:net:2499:12)
at Server.listen (node:net:2641:5)
at file:///Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/parallel/test-fs-cp-async-socket.mjs:29:10
at ModuleJob.run (node:internal/modules/esm/module_job:569:25)
at async node:internal/modules/esm/loader:650:26
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:105:5)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:2478:8)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
code: 'EINVAL',
errno: -22,
syscall: 'listen',
address: '/Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/.tmp.1214/copy_%1/42770.sock',
port: -1
}
Node.js v26.10.0
Command: out/Release/node /Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/parallel/test-fs-cp-async-socket.mjs
=== release test-fs-cp-sync-copy-socket-error ===
Path: parallel/test-fs-cp-sync-copy-socket-error
Error: --- stderr ---
node:internal/modules/run_main:111
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
Comparison {
+ code: 'ENOENT'
- code: 'ERR_FS_CP_SOCKET'
}
at file:///Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/parallel/test-fs-cp-sync-copy-socket-error.mjs:29:10
at ModuleJob.run (node:internal/modules/esm/module_job:569:25)
at async node:internal/modules/esm/loader:650:26
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:105:5) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: ENOENT: no such file or directory, lstat '/Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/.tmp.1235/copy_%1/42922.sock'
at cpSyncFn (node:internal/fs/cp/cp-sync:56:13)
at cpSync (node:fs:3846:3)
at assert.throws.code (file:///Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/parallel/test-fs-cp-sync-copy-socket-error.mjs:30:11)
at getActual (node:assert:580:5)
at assert.throws (node:assert:728:24)
at file:///Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/parallel/test-fs-cp-sync-copy-socket-error.mjs:29:10
at ModuleJob.run (node:internal/modules/esm/module_job:569:25)
at async node:internal/modules/esm/loader:650:26
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:105:5) {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/Users/runner/work/_temp/node-v26.10.0-nightly2026-09-208469b59d62-slim/test/.tmp.1235/copy_%1/42922.sock'
},
expected: { code: 'ERR_FS_CP_SOCKET' },
operator: 'throws',
diff: 'simple'
}
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.4k
- 平均合并
- 4 天 12 小时
- 30 天内合并 PR
- 296
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodejs/node 的其他 Issue
-
doc
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
doc
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
build
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
nodejs/node#65994 · 2 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
feature request
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
相似的 Issue
-
Design only Leadership Survey SLFS
难度 2/5 1-3 小时 新手友好度 70/100
bcgov/digital-journeys#2293 ·
-
Toolkit
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
API Bug
难度 2/5 1-3 小时 新手友好度 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
jessepollak/home#1454 ·
维护者通常 1 天内回复
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 64/100
opensearch-project/OpenSearch-Dashboards#12822 ·
维护者通常 1 天内回复