Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#66,324 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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 のソケットパスの長さ制限と、ログにある異なるエラーを確認します; 影響を受ける macOS ジョブで、意図された assertions を変更せずに両方のテストがパスすれば完了です。

索引モデルが issue の本文から書いたものです。

説明

flaky-test test v26.x

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時間
マージ済み PR(30日)
300

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nodejs/node のほかの issue

nodejs/node の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。