Skip to content

Cherry pick #116692 to 26.8: Prevent stale OpenSSL errors from breaking asynchronous TLS connections - #122026

Merged
robot-clickhouse merged 23 commits into
backport/26.8/116692from
cherrypick/26.8/116692
Sep 25, 2026
Merged

robot-clickhouse merged 23 commits into
backport/26.8/116692from
cherrypick/26.8/116692

Conversation

@robot-ch-test-poll3

Copy link
Copy Markdown
Contributor

Original pull-request #116692

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

otselnik and others added 21 commits August 27, 2026 11:02
Address `catch_all` and `arm_tidy` diagnostics in the new TLS regression tests while keeping cleanup failures visible.

#116692
Record fatal probe failures in `SecureSocketImpl` so later `shutdown` skips the forbidden `SSL_shutdown` path.

Related: #116692
Clear errno before each `performSSLOperation` invocation so a stale retriable value cannot affect OpenSSL error classification.

Initialize `SSLSocketStateResult` for static analysis and add a custom `BIO` regression test for the empty error-queue path.

Related: #116692
…916-openssl-error-queue

# Conflicts:
#	base/poco/NetSSL_OpenSSL/src/SecureSocketImpl.cpp
…sl-error-queue

Prevent stale OpenSSL errors from breaking asynchronous TLS connections
@robot-ch-test-poll3 robot-ch-test-poll3 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Sep 24, 2026
thevar1able and others added 2 commits September 25, 2026 11:33
Resolve conflicts caused by #116136
(TLS handshake profile events) not being present in 26.8:
- keep the inline `SSL_connect` loop in `connectSSL` and the old `completeHandshake`,
  but route them through `performSSLOperation` and the new `mustRetry`/`handleError`
  signatures; `connectSSL` now throws if the blocking handshake does not complete,
  as in the original change;
- drop `HandshakeProfileEventCounter`.

The new Silk tests use `silk::FiberScheduler::run` instead of `Silk::spawn`,
which does not exist in 26.8.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`SslReadReturnsWantReadWithoutSuspending` and `BlockingShutdownRetriesWantWrite`
rely on `Silk::spawn`, which does not exist in 26.8, so remove them together with
the retry-once write BIO helpers used only by them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@robot-clickhouse
robot-clickhouse merged commit d2935cb into backport/26.8/116692 Sep 25, 2026
1 check passed
@robot-clickhouse
robot-clickhouse deleted the cherrypick/26.8/116692 branch September 25, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants