Re: Bug with memory leak on cert validation in libpq

From: David Steele <david(at)pgmasters(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Roman Peshkurov <roman(dot)peshkurov(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug with memory leak on cert validation in libpq
Date: 2020-04-21 14:46:34
Message-ID: 62894bf0-4bde-1d5b-75a2-20d44fc47fe6@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 4/21/20 12:42 AM, Michael Paquier wrote:
> On Mon, Apr 20, 2020 at 08:40:06PM +0300, Roman Peshkurov wrote:
>> The problem is incorrect usage of openssl stack "destructor". We noticed it
>> on a graphs for the few months. It looked lika an increasing line of res
>> memory usage.
>
> And finally, this needs to be backpatched all the way down to 9.5, so
> I'll take care of it if there are no objections.

+1. We have similar code in pgBackRest and I can see the leak there as
well when I adjust our Valgrind supressions a bit.

I also reviewed the OpenSSL code and agree this is the right fix.

Regards,
--
-David
david(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message cbw 2020-04-21 15:13:46 Re: Backend stuck in tirigger.c:afterTriggerInvokeEvents forever
Previous Message Tom Lane 2020-04-21 14:44:25 Re: Backend stuck in tirigger.c:afterTriggerInvokeEvents forever