Skip to content

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

Description

@MikeMcC399

Refs: #66259 (comment)

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

#66163 showed the error when it was landed in 151845a

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'
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky-testIssues and PRs involving tests that fail intermittently in CI.testIssues and PRs related to Node.js core tests and test infrastructure.v26.xIssues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions