Skip to content

e2e: TestListenDefaultIPv6 takes a port free on every address - #385

Merged
go-while merged 1 commit into
mainfrom
fix/listen-default-port
Nov 16, 2026
Merged

go-while merged 1 commit into
mainfrom
fix/listen-default-port

Conversation

@go-while

Copy link
Copy Markdown
Owner

CI flake: Fedora 43 on PR #381 (2026-11-14) failed TestListenDefaultIPv6 with can't listen on ListenTo DEFAULT:41577: Address already in use.

Cause: ListenTo DEFAULT binds the wildcard (IPv4 and IPv6), but the test took its port from freeAddr, which only checks 127.0.0.1, and standalone() retried a bind collision only for the automatic loopback listener, not for ListenTo DEFAULT:<port>.

  • freeDefaultPort (harness): a port free on the wildcard (net.Listen("tcp", ":0")).
  • standalone(): a "can't listen on ListenTo DEFAULT:" collision is retried with a new port (both ListenTo and e.Listen move), like the loopback case.
  • The test reads the port back from e.Listen after standalone().

Test-only change, no NEWS entry. Not run on the maintainer's workstation; CI here.

🤖 Generated with Claude Code

ListenTo DEFAULT binds the wildcard (IPv4 and IPv6), but the port came
from freeAddr, which checks only 127.0.0.1, and standalone() retried a
bind collision only for the automatic loopback listener. On a busy CI
runner (Fedora 43, 2026-11-14) another test's listener held the port
and the daemon exited with "can't listen on ListenTo DEFAULT:41577:
Address already in use".

freeDefaultPort checks the wildcard; standalone() also retries a
collision of ListenTo DEFAULT:<port> with a new port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@go-while
go-while merged commit b3ab4b8 into main Nov 16, 2026
31 checks passed
@go-while
go-while deleted the fix/listen-default-port branch November 16, 2026 08:07
go-while added a commit that referenced this pull request Nov 17, 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.

1 participant