Skip to content

fix(v8-runtime): shorten macOS bootstrap UDS socket path#62

Merged
NathanFlurry merged 1 commit intorivet-dev:mainfrom
notkadez:fix/macos-tmpdir-uds-path-too-long
Mar 30, 2026
Merged

fix(v8-runtime): shorten macOS bootstrap UDS socket path#62
NathanFlurry merged 1 commit intorivet-dev:mainfrom
notkadez:fix/macos-tmpdir-uds-path-too-long

Conversation

@notkadez
Copy link
Copy Markdown
Contributor

Closes #60

Summary

  • shorten the temporary socket directory suffix used by the V8 runtime bootstrap
  • reduce the chance of exceeding Darwin sun_path limits under long macOS TMPDIR roots
  • fix the macOS quickstart/bootstrap failure that surfaced as stdout before sending socket path

Verification

  • pnpm exec tsx examples/quickstart/src/simple.ts fails on macOS before this change with default TMPDIR
  • pnpm exec tsx examples/quickstart/src/simple.ts succeeds on macOS after this change with default TMPDIR
  • direct V8 runtime bootstrap no longer fails with failed to bind UDS: path must be shorter than SUN_LEN
  • existing typecheck/tests pass

To the best of my knowledge, this is the best fix. The 32bit random suffix still provides plenty of available sockets. Happy to provide any additional information, or go about fixing this in a different way if needed.

- Cut random suffix from 128-bit to 64-bit
- Reduce macOS tmpdir socket path length risk
@NathanFlurry
Copy link
Copy Markdown
Member

you just shorted my todo list for the evening, absolute legend

@NathanFlurry NathanFlurry merged commit 5392abe into rivet-dev:main Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] macOS V8 runtime bootstrap fails when TMPDIR makes UDS path too long

2 participants