From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit().
Date: Mon, 20 Jan 2020 17:57:43 +0000
Message-ID: <E1itbJ1-0002mK-AQ@gemulon.postgresql.org> (raw)
Fix pg_dump's sigTermHandler() to use _exit() not exit().
sigTermHandler() tried to be careful to invoke only operations that
are safe to do in a signal handler. But for some reason we forgot
that exit(3) is not among those, because it calls atexit handlers
that might do various random things. (pg_dump itself installs no
atexit handlers, but e.g. OpenSSL does.) That led to crashes or
lockups when attempting to terminate a parallel dump or restore
via a signal.
Fix by calling _exit() instead.
Per bug #16199 from Raúl Marín. Back-patch to all supported branches.
Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4ea5cf403824e98932aa17c1c00f9c5241daf89d
Modified Files
--------------
src/bin/pg_dump/parallel.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit().
In-Reply-To: <E1itbJ1-0002mK-AQ@gemulon.postgresql.org>
References: <E1itbJ1-0002mK-AQ@gemulon.postgresql.org>
* 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