Skip to content

ssh: Close socket in kex_strict_helper to prevent eaddrinuse#11275

Open
u3s wants to merge 1 commit into
erlang:maintfrom
u3s:kuba/ssh/kex_strict_helper_socket_close
Open

ssh: Close socket in kex_strict_helper to prevent eaddrinuse#11275
u3s wants to merge 1 commit into
erlang:maintfrom
u3s:kuba/ssh/kex_strict_helper_socket_close

Conversation

@u3s

@u3s u3s commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The kex_strict_helper function creates a TCP connection for each test iteration but never closes the client socket. On OpenBSD, the lingering sockets in TIME_WAIT cause gen_tcp:connect to fail with eaddrinuse on subsequent iterations due to ephemeral port collision with {reuseaddr, true}.

Add close_socket to the test message sequence so the socket is released before the next iteration begins

The kex_strict_helper function creates a TCP connection for each
test iteration but never closes the client socket. On OpenBSD, the
lingering sockets in TIME_WAIT cause gen_tcp:connect to fail with
eaddrinuse on subsequent iterations due to ephemeral port collision
with {reuseaddr, true}.

Add close_socket to the test message sequence so the socket is
released before the next iteration begins
@u3s u3s self-assigned this Jun 22, 2026
@u3s u3s added team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI labels Jun 22, 2026
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

    2 files     29 suites   28m 52s ⏱️
  506 tests   499 ✅  7 💤 0 ❌
1 715 runs  1 686 ✅ 29 💤 0 ❌

Results for commit 1560e8c.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

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

Labels

team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant