Skip to content

fix: use syscall-derived max IPC path size per OS (ethereum#29385) - #122

Merged
hmlee-wm merged 1 commit into
devfrom
fix/rpc-ipc-max-path-size
Sep 15, 2026
Merged

hmlee-wm merged 1 commit into
devfrom
fix/rpc-ipc-max-path-size

Conversation

@hmlee-wm

@hmlee-wm hmlee-wm commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ports ethereum#29385. maxPathSize was hardcoded to 108 (Linux value), causing IPC bind failures on Darwin where the unix socket path limit is 104 bytes. Replace the constant with len(syscall.RawSockaddrUnix{}.Path) so the correct OS-specific limit is used at compile time.

Upstream References

PR Description
#29385 rpc: fix ipc max path size

Problem

On Darwin, syscall.RawSockaddrUnix.Path is 104 bytes, but geth assumed 108. A datadir path between 104–107 bytes would pass the length check yet fail at bind, producing an invalid argument error and preventing the node from starting.

Changes

  • rpc/ipc_unix.go: replace hardcoded maxPathSize = 108 with maxPathSize = len(syscall.RawSockaddrUnix{}.Path), picking up the OS-specific limit at compile time

(cherry picked from commit e63f992fed51d5a576ea2890cd7eb3000c9e6884)
@hmlee-wm hmlee-wm self-assigned this Sep 4, 2026
@hmlee-wm hmlee-wm added the bug Something isn't working label Sep 4, 2026

@0xmhha 0xmhha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@colinkim colinkim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eomti-wm eomti-wm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hmlee-wm
hmlee-wm merged commit 12fa140 into dev Sep 15, 2026
3 checks passed
@hmlee-wm
hmlee-wm deleted the fix/rpc-ipc-max-path-size branch September 15, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants