Re: Strange failure on mamba

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-11-30T02:43:20Z
Lists: pgsql-hackers
On Wed, Nov 30, 2022 at 2:44 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Now, we certainly cannot think that these are occurring early in
> postmaster startup.  In the wake of 8acd8f869, we should expect
> that there's no further need to call rtld_bind at all in the
> postmaster, but seemingly that's not so.  It's very frustrating
> that the backtrace stops where it does :-(.  It's also strange
> that we're apparently running with signals enabled whereever
> it is that rtld_bind is getting called from.  Could it be that
> sigaction is failing to install the requested signal mask, so
> that one postmaster signal handler is interrupting another?

Add in some code that does sigaction(0, NULL, &mask) to read the
current mask and assert that it's blocked as expected in the handlers?
Start the postmaster in gdb with a break on _rtld_bind to find all the
places that reach it (unexpectedly)?



Commits

  1. Provide options for postmaster to kill child processes with SIGABRT.

  2. On NetBSD, force dynamic symbol resolution at postmaster start.