Repository navigation
Fix flaky test_strict_reject_with_config - #93539
Merged
tiandiwonder merged 1 commit intoJan 12, 2026
Merged
tiandiwonder merged 1 commit into
tiandiwonder merged 1 commit into
Conversation
Contributor
|
Workflow [PR], commit [8e4b0c4] Summary: ❌
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a flaky integration test by addressing a race condition in SSL handshake error detection. The test test_strict_reject_with_config was failing intermittently because it expected a specific error message, but depending on timing, the SSL connection could be reset before the alert was transmitted.
- Modified test assertion to accept two possible error messages resulting from the SSL handshake race condition
hanfei1991
approved these changes
Jan 7, 2026
Merged
via the queue into
ClickHouse:master
with commit Jan 12, 2026
856f0ef
121 of 128 checks passed
kute1654
pushed a commit
to kute1654/ClickHouse
that referenced
this pull request
Oct 10, 2026
The strict server rejects a client that sends no certificate. Under TLS 1.3 the client finishes its handshake before the server checks the client certificate, so it writes its native Hello right away. The server tears the failed session down with shutdown(SHUT_RDWR) (FIN) followed by close() with the client's Finished record still unread (RST), so the client receives alert, FIN, RST. If its Hello write comes after both, the RST hits a socket in CLOSE_WAIT, the kernel reports EPIPE, and the client fails with "I/O error: Broken pipe, while writing to socket" without reading the alert. Before the orderly shutdown for sessions that died with a fatal error (ClickHouse#116692) the teardown was RST only, which gives ECONNRESET, the case ClickHouse#93539 already accepts. Which TCP event reaches the client first is not what the test checks: it checks that the connection is refused. pytest.raises still fails the test if the connection is accepted, and the message list still excludes a client-side verification failure. Seen twice on the 26.3 release branch (amd_tsan) after the ClickHouse#116692 backport. Forcing a 300 ms delay on every client socket write with strace reproduces the CI message 5/5 on 26.3.43.4 and on master, and gives "Connection reset by peer" on 26.3.33.24 (before the backport). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix flaky test_strict_reject_with_config. fix #91667
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.1.1.435