Skip to content

ssh: Fix kex_strict_violation test race on debug builds#11314

Open
u3s wants to merge 2 commits into
erlang:maintfrom
u3s:kuba/ssh/fix_flaky_ssh_protocol
Open

ssh: Fix kex_strict_violation test race on debug builds#11314
u3s wants to merge 2 commits into
erlang:maintfrom
u3s:kuba/ssh/fix_flaky_ssh_protocol

Conversation

@u3s

@u3s u3s commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The "duplicated ssh_msg_kexdh_init" sub-flow expected disconnect immediately after kexdh_reply, but the server sends newkeys as part of normal first-kexdh_init processing before it detects the duplicate in {new_keys,server,init} state. On debug/lock-counting builds the timing makes newkeys (or tcp_closed) arrive before disconnect.

Accept any of newkeys, disconnect, or tcp_closed after kexdh_reply. The actual violation assertion is already verified through event_logged(server, Events, "KEX strict violation") in kex_strict_helper/3.

The "duplicated ssh_msg_kexdh_init" sub-flow expected disconnect
immediately after kexdh_reply, but the server sends newkeys as part
of normal first-kexdh_init processing before it detects the duplicate
in {new_keys,server,init} state. On debug/lock-counting builds the
timing makes newkeys (or tcp_closed) arrive before disconnect.

Accept any of newkeys, disconnect, or tcp_closed after kexdh_reply.
The actual violation assertion is already verified through
event_logged(server, Events, "KEX strict violation") in
kex_strict_helper/3.
@u3s u3s self-assigned this Jul 1, 2026
@u3s u3s added the team:PS Assigned to OTP team PS label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

    2 files     29 suites   29m 26s ⏱️
  510 tests   503 ✅  7 💤 0 ❌
1 719 runs  1 690 ✅ 29 💤 0 ❌

Results for commit 0a768d3.

♻️ 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

@u3s u3s added the testing currently being tested, tag is used by OTP internal CI label Jul 1, 2026
@Mikaka27 Mikaka27 self-requested a review July 7, 2026 19:16
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.

2 participants