Re: Fix for OpenSSL error queue bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, David Zuelke <dz(at)heroku(dot)com>
Subject: Re: Fix for OpenSSL error queue bug
Date: 2016-03-14 23:05:13
Message-ID: 8564.1457996713@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)heroku(dot)com> writes:
> On Mon, Mar 14, 2016 at 3:06 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Agreed, we need to deal with this one way or the other. My proposal
>> is:
>>
>> 1. In HEAD, do it as Peter E. suggests, ie clear error queue before calls.
>>
>> 2. In back branches, clear error queue before *and* after calls. This
>> will waste a few nanoseconds but will avoid any risk of breaking
>> existing third-party code.

> I am concerned that users will never be able to get this right, since
> I think it requires every Ruby or PHP app using some thin OpenSSL
> wrapper to clear the per-queue thread. It's a big mess, but it's our
> mess to some degree.

So your proposal is basically to do #2 in all branches? I won't fight it,
if it doesn't bloat the code much. The overhead should surely be trivial
compared to network communication costs, and I'm afraid you might be right
about the risk of latent bugs.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-03-14 23:07:53 Re: Password identifiers, protocol aging and SCRAM protocol
Previous Message Peter Geoghegan 2016-03-14 22:50:39 Re: Fix for OpenSSL error queue bug