Skip to content

[Bug]: MORPC UT Unix socket path exceeds Darwin sockaddr_un limit #26545

Closed

Description

@XuPeng-SH

Description

TestIndependentControlBackendPreservesSlowDataRequest fails deterministically on Darwin/arm64 because its unique Unix socket is placed under testing.T.TempDir. The test name plus randomized temp components makes the socket pathname exceed the Darwin sockaddr_un limit.

This is a regression in the test setup introduced while fixing the distinct timing problem in #26184 / #26189.

Reproduction

Latest main: 3e9ad81

go test -count=1 -run ^TestIndependentControlBackendPreservesSlowDataRequest$ ./pkg/common/morpc

Observed error:

listen unix .../TestIndependentControlBackendPreservesSlowDataRequest.../morpc.sock: bind: invalid argument

The setup helper uses assert.NoError and returns a nil application after the bind failure, so the test then produces a secondary nil-pointer panic.

Expected behavior

Use a unique but deliberately short Unix socket directory, clean it through testing cleanup, and make the application-construction helper fail fast so setup errors cannot cascade into panics. The lifecycle and timing assertions must remain unchanged.

Activity

  1. self-assigned this
    on Aug 1, 2026
  2. added
    kind/bug
    on Aug 1, 2026
  3. added a commit that references this issue on Aug 2, 2026
    ac4a306
  4. added 3 commits that reference this issue on Sep 17, 2026
    2ff0bf5
    ec0dba1
    4a028a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions