pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: daniel@heroku.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13246: Failure to pg_terminate_backend
Date: Wed, 6 May 2015 23:03:39 +0200
Message-ID: <20150506210339.GF12506@alap3.anarazel.de> (raw)
In-Reply-To: <20150506205530.1095.52171@wrigleys.postgresql.org>
References: <20150506205530.1095.52171@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2015-05-06 20:55:30 +0000, daniel@heroku.com wrote:
> Postgres gets stuck in this loop and, not checking for signals, will not
> respect the SIGTERM from pg_terminate_backend.  This seems like a variant of
> other problems I've seen with pg_terminate_backend not being able to
> function when one is stuck in Openssl, though it seems that in recent
> versions of Postgres that PG provides its own low level I/O functions (e.g.
> my_sock_write) and maybe this is fixable?

I hope I've fixed this for 9.5. The changes are too invasive to
backpatch unfortunately.

> #0  0x00007fe42be95462 in send () from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00007fe42dcbc487 in my_sock_write (h=0x7fe42efa5eb0, buf=<optimized
> out>, size=<optimized out>)
>     at
> /tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/libpq/be-secure.c:516
> #2  0x00007fe42cdd4667 in BIO_write () from
> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
> #3  0x00007fe42d0f0260 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
> #4  0x00007fe42d0f0984 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
> #5  0x00007fe42dcbd1d5 in secure_write (port=0x7fe42efa51b0,
> ptr=0x7fe42efaad90, len=<optimized out>)
>     at

Yep, we're stuck writing something and we can't, in older versions,
accept cancel interrupts there because we're inside openssl.

Greetings,

Andres Freund


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <20150506210339.GF12506@alap3.anarazel.de>
Permalink:  ../20150506210339.GF12506@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20150506210339.GF12506@alap3.anarazel.de

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, daniel@heroku.com
  Subject: Re: BUG #13246: Failure to pg_terminate_backend
  In-Reply-To: <20150506210339.GF12506@alap3.anarazel.de>
  References: <20150506205530.1095.52171@wrigleys.postgresql.org> <20150506210339.GF12506@alap3.anarazel.de>

* 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