Skip to content

Avoid treating an OpenSSL error as a permanent error#4294

Merged
Emanuele Sabellico (emasab) merged 3 commits intomasterfrom
dev_fix_4293_ssl_offset_reset
Jun 14, 2023
Merged

Avoid treating an OpenSSL error as a permanent error#4294
Emanuele Sabellico (emasab) merged 3 commits intomasterfrom
dev_fix_4293_ssl_offset_reset

Conversation

@emasab
Copy link
Copy Markdown
Contributor

@emasab Emanuele Sabellico (emasab) commented May 26, 2023

and treat unclean SSL closes as normal ones.

When SSL connections are closed without close_notify, in OpenSSL 3.x (librdkafka 2.0.2) a new type of error is set and it was interpreted as permanent in librdkafka. It can cause a different issue depending on the RPC. If received when waiting for OffsetForLeaderEpoch response (librdkafka 2.1.x), it triggers an offset reset following the configured policy. Solved by treating SSL errors as transport errors and by setting an OpenSSL flag that allows to treat unclean SSL closes as normal ones. These types of errors can happen it the other side doesn't support close_notify or if there's a TCP connection reset.

@emasab Emanuele Sabellico (emasab) force-pushed the dev_fix_4293_ssl_offset_reset branch 2 times, most recently from b5e7c53 to a0a5c15 Compare May 26, 2023 08:41
@emasab Emanuele Sabellico (emasab) marked this pull request as draft May 26, 2023 08:43
doesn't cause an offset reset
and treat unclean SSL  closes as normal ones

fixes #4293
@emasab
Copy link
Copy Markdown
Contributor Author

Comment thread src/rdkafka_request.c
Copy link
Copy Markdown
Member

@pranavrth Pranav Rathi (pranavrth) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants