Re: Postmaster self-deadlock due to PLT linkage resolution

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Postmaster self-deadlock due to PLT linkage resolution
Date: 2022-08-30 13:34:55
Message-ID: CA+hUKGLJ7AFD0iqkM096rkJRxdTZXCWD-naew7yG1UUSraUmhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 31, 2022 at 12:26 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Aug 30, 2022 at 8:17 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> > FWIW I suspect FreeBSD can't break like this in a program linked with
> > libthr, because it has a scheme for deferring signals while the
> > runtime linker holds locks. _rtld_bind calls _thr_rtld_rlock_acquire,
> > which uses the THR_CRITICAL_ENTER mechanism to cause thr_sighandler to
> > defer until release. For a non-thread program, I'm not entirely sure,
> > but I don't think the fork() problem exists there. (Could be wrong,
> > based on a quick look.)
>
> Well that seems a bit ironic, considering that Tom has worried in the
> past that linking with threading libraries would break stuff.

Hah. To clarify, non-thread builds don't have that exact fork()
problem, but it turns out they do have a related state clobbering
problem elsewhere, which I've reported.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-08-30 13:35:51 Re: Strip -mmacosx-version-min options from plperl build
Previous Message Tom Lane 2022-08-30 13:26:21 Re: Reducing the chunk header sizes on all memory context types