From: Jeremy Schneider <schnjere@amazon.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: neeraj kumar <neeru.cse@gmail.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: Query on pg_stat_activity table got stuck
Date: Thu, 9 May 2019 12:46:32 -0700
Message-ID: <e99f759e-4d18-d297-9e1a-639c7379faf2@amazon.com> (raw)
In-Reply-To: <29660.1557352732@sss.pgh.pa.us>
References: <CAPR3Wj5Z17=+eeyrn_ZDG3NQGYgMEOY6JV6Y-WRRhGgwc16U3Q@mail.gmail.com>
<15877.1557178386@sss.pgh.pa.us>
<CAPR3Wj5CUVNqF2r6fNnrueDgn2k+qyADCvYZ2878SCytTrPPng@mail.gmail.com>
<21502.1557339176@sss.pgh.pa.us>
<CAPR3Wj4fT1hOumweROsAifTAMLT7oM+YejxBAcpPsXuMAecBZw@mail.gmail.com>
<29660.1557352732@sss.pgh.pa.us>
On 5/8/19 14:58, Tom Lane wrote:
> neeraj kumar <neeru.cse@gmail.com> writes:
>> Yes we use SSL to connect to DB.
>
> Hm. I'm suspicious that one of the functions that fetch data for
> an SSL connection threw an error. In particular, it doesn't look
> to be hard at all to make X509_NAME_to_cstring fall over --- an
> encoding conversion failure would do it, even without any stretchy
> assumptions about OOM this early in backend start. Have you got
> any SSL certificates floating around with non-ASCII subject name
> or issuer name?
Crazy timing. We just had a report come in from a database in the RDS
fleet that's hitting this same issue. It was one of the Aurora systems,
but there wasn't anything Aurora-specific that I could see in the
relevant bits of code.
Seems to me that at a minimum, this loop shouldn't go on forever. Even
having an arbitrary, crazy high, hard-coded number of attempts before
failure (like a million) would be better than spinning on the CPU
forever - which is what we are seeing.
Would be even cooler to detect and correct a broken slot in
PgBackendStatus... if I have a good idea I'll post/try it. :)
-Jeremy
--
Jeremy Schneider
Database Engineer
Amazon Web Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: schnjere@amazon.com, tgl@sss.pgh.pa.us, neeru.cse@gmail.com, pgsql-general@postgresql.org
Subject: Re: Query on pg_stat_activity table got stuck
In-Reply-To: <e99f759e-4d18-d297-9e1a-639c7379faf2@amazon.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox