Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

`test-fs-cp-async-socket` / `test-fs-cp-sync-copy-socket-error` failure on Darwin (path length)

未關閉 適合新手
#66,324 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 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 內容生成。

描述

test

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 天 17 小時
30 天內合併 PR
300

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

nodejs/node 的其他 Issue

查看 nodejs/node 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。