Re: Postmaster self-deadlock due to PLT linkage resolution

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Postmaster self-deadlock due to PLT linkage resolution
Date: 2022-08-30 02:42:01
Message-ID: 20220830024201.GA932727@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 29, 2022 at 03:43:55PM -0400, Tom Lane wrote:
> I'd originally intended to make this code "#ifdef __NetBSD__",
> but on looking into the FreeBSD sources I find much the same locking
> logic in their dynamic loader, and now I'm wondering if such behavior
> isn't pretty standard.

I doubt it's standard. POSIX specifies select() to be async-signal-safe.
This NetBSD bug makes select() not be async-signal-safe.

> The added calls should have negligible cost,
> so it doesn't seem unreasonable to do them everywhere.

Agreed. I would make the comment mention the NetBSD version that prompted
this, so we have a better chance of removing the workaround in a few decades.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-08-30 02:42:09 Re: Reducing the chunk header sizes on all memory context types
Previous Message Zheng Li 2022-08-30 02:39:02 Re: Support logical replication of global object commands