From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Postmaster self-deadlock due to PLT linkage resolution
Date: Tue, 30 Aug 2022 13:24:39 -0400
Message-ID: <3705480.1661880279@sss.pgh.pa.us> (raw)
In-Reply-To: <20220830171720.iai6jwwo756z7ivw@awork3.anarazel.de>
References: <3384826.1661802235@sss.pgh.pa.us>
<20220830171720.iai6jwwo756z7ivw@awork3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2022-08-29 15:43:55 -0400, Tom Lane wrote:
>> The attached patch seems to fix the problem, by forcing resolution of
>> the PLT link before we unblock signals. It depends on the assumption
>> that another select() call appearing within postmaster.c will share
>> the same PLT link, which seems pretty safe.
> Hm, what stops the same problem from occuring with other functions?
These few lines are the only part of the postmaster that runs with
signals enabled and unblocked.
> Perhaps it'd be saner to default to building with -Wl,-z,now? That should fix
> the problem too, right (and if we combine it with relro, it'd be a security
> improvement to boot).
Hm. Not sure if that works on NetBSD, but I'll check it out.
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de
Subject: Re: Postmaster self-deadlock due to PLT linkage resolution
In-Reply-To: <3705480.1661880279@sss.pgh.pa.us>
References: <3384826.1661802235@sss.pgh.pa.us> <20220830171720.iai6jwwo756z7ivw@awork3.anarazel.de> <3705480.1661880279@sss.pgh.pa.us>
* 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