Skip to content

Improve TLS error handling.#11563

Merged
yossigo merged 1 commit intoredis:unstablefrom
yossigo:tls-conn-errors
Dec 1, 2022
Merged

Improve TLS error handling.#11563
yossigo merged 1 commit intoredis:unstablefrom
yossigo:tls-conn-errors

Conversation

@yossigo
Copy link
Collaborator

@yossigo yossigo commented Dec 1, 2022

  • Remove duplicate code, propagating SSL errors into the connection state.
  • Add missing error handling in synchronous IO functions.
  • Fix connection error reporting in some replication flows.

The background for this work is CI failures on arm64, such as this one:
https://github.com/redis/redis-extra-ci/actions/runs/3537044170/jobs/5936665499

The test fails as it expects the replica to hit the timeout, but instead, the connection drops and reconnects later. The replica reports connection errors:

10812:S 24 Nov 2022 01:58:00.846 # Failed to read response from the server: Resource temporarily unavailable
10812:S 24 Nov 2022 01:58:00.846 # Master did not respond to command during SYNC handshake

These errors are potentially misleading because they're derived from errno and not from the underlying connection, which, in turn, needs to consult OpenSSL.

This PR may fix the root cause or provide more accurate error logging to help track the underlying problem.

* Remove duplicate code, propagating SSL errors into connection state.
* Add missing error handling in synchronous IO functions.
* Fix connection error reporting in some replication flows.
@yossigo yossigo requested a review from oranagra December 1, 2022 08:04
@yossigo yossigo added the release-notes indication that this issue needs to be mentioned in the release notes label Dec 1, 2022
@yossigo yossigo merged commit 155acef into redis:unstable Dec 1, 2022
@yossigo yossigo deleted the tls-conn-errors branch December 1, 2022 08:18
@oranagra oranagra mentioned this pull request Dec 11, 2022
oranagra pushed a commit that referenced this pull request Dec 12, 2022
* Remove duplicate code, propagating SSL errors into connection state.
* Add missing error handling in synchronous IO functions.
* Fix connection error reporting in some replication flows.

(cherry picked from commit 155acef)
madolson pushed a commit to madolson/redis that referenced this pull request Apr 19, 2023
* Remove duplicate code, propagating SSL errors into connection state.
* Add missing error handling in synchronous IO functions.
* Fix connection error reporting in some replication flows.
enjoy-binbin pushed a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
* Remove duplicate code, propagating SSL errors into connection state.
* Add missing error handling in synchronous IO functions.
* Fix connection error reporting in some replication flows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants