Debian Bug report logs - #1052613
Keepalived occasionally fails SSL_CHECK

version graph

Package: keepalived; Maintainer for keepalived is Vincent Bernat <[email protected]>; Source for keepalived is src:keepalived (PTS, buildd, popcon).

Reported by: Pavel Matěja <[email protected]>

Date: Mon, 25 Sep 2023 10:51:02 UTC

Severity: normal

Found in version keepalived/1:2.2.7-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Vincent Bernat <[email protected]>:
Bug#1052613; Package keepalived. (Mon, 25 Sep 2023 10:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to Pavel Matěja <[email protected]>:
New Bug report received and forwarded. Copy sent to Vincent Bernat <[email protected]>. (Mon, 25 Sep 2023 10:51:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Pavel Matěja <[email protected]>
To: [email protected]
Subject: Keepalived occasionally fails SSL_CHECK
Date: Mon, 25 Sep 2023 12:48:54 +0200
[Message part 1 (text/plain, inline)]
Package: keepalived
Version: 1:2.2.7-1

I'm upgrading our servers from Bullseye to Bookworm. Some of them act as load balancers using keepalived.
Right now I have one Bullseye and one Bookworm with the same configuration checking the same services.
Several of our services are running on HTTPS therefore I'm using SSL_CHECK.
I can see that the Bookworm one occasionally fails SSL_CHECK for several seconds on one service while the
Bullseye does not report any problem at all.
It's quite rare - not even once per hour with 2s loop delay.

I was looking for possible reason and I've found
https://github.com/openssl/openssl/issues/20365
https://github.com/pjsip/pjproject/issues/3632
https://stackoverflow.com/questions/18179128/how-to-manage-the-error-queue-in-openssl-ssl-get-error-and-err-get-error

They are all basically saying that you can have multiple SSL errors left in error queue and you are supposed to
run|ERR_get_error() before calling |SSL_* functions.

I've tried to patch keepalived sources (see attachment) and the problem seems to disappear.

I have no idea why is Bullseye package unaffected. It might be related to different OpenSSL version.

What do you think about this?

-- 
Pavel Matěja
[Message part 2 (text/html, inline)]
[OpenSSL_ERR_clear_error.patch (text/x-patch, attachment)]

Information forwarded to [email protected], Vincent Bernat <[email protected]>:
Bug#1052613; Package keepalived. (Wed, 04 Oct 2023 09:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent Bernat <[email protected]>:
Extra info received and forwarded to list. Copy sent to Vincent Bernat <[email protected]>. (Wed, 04 Oct 2023 09:39:03 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Vincent Bernat <[email protected]>
To: Pavel Matěja <[email protected]>, [email protected]
Subject: Re: Bug#1052613: Keepalived occasionally fails SSL_CHECK
Date: Wed, 4 Oct 2023 11:34:38 +0200
Hello Pavel,

I'll be more comfortable if you submitted this patch upstream first.

On 2023-09-25 12:48, Pavel Matěja wrote:
> Package: keepalived
> Version: 1:2.2.7-1
> 
> I'm upgrading our servers from Bullseye to Bookworm. Some of them act as load balancers using keepalived.
> Right now I have one Bullseye and one Bookworm with the same configuration checking the same services.
> Several of our services are running on HTTPS therefore I'm using SSL_CHECK.
> I can see that the Bookworm one occasionally fails SSL_CHECK for several seconds on one service while the
> Bullseye does not report any problem at all.
> It's quite rare - not even once per hour with 2s loop delay.
> 
> I was looking for possible reason and I've found
> https://github.com/openssl/openssl/issues/20365
> https://github.com/pjsip/pjproject/issues/3632
> https://stackoverflow.com/questions/18179128/how-to-manage-the-error-queue-in-openssl-ssl-get-error-and-err-get-error
> 
> They are all basically saying that you can have multiple SSL errors left in error queue and you are supposed to
> run|ERR_get_error() before calling |SSL_* functions.
> 
> I've tried to patch keepalived sources (see attachment) and the problem seems to disappear.
> 
> I have no idea why is Bullseye package unaffected. It might be related to different OpenSSL version.
> 
> What do you think about this?
> 
> -- 
> Pavel Matěja
> 



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 15:53:53 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.