Re: Strange failure on mamba

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-11-30T06:55:49Z
Lists: pgsql-hackers
Hi,

On 2022-11-29 22:31:50 -0800, Andres Freund wrote:
> On 2022-11-30 00:55:42 -0500, Tom Lane wrote:
> > Andres Freund <andres@anarazel.de> writes:
> > > What libraries is postgres linked against? I don't know whether -z now only
> > > affects the "top-level" dependencies of postgres, or also the dependencies of
> > > shared libraries that haven't been built with -z now.  The only dependencies
> > > that I could see being relevant are libintl and openssl.
> > 
> > Hmm.  mamba is using both --enable-nls and --with-openssl, but
> > I can't see a reason why the postmaster would be interacting with
> > OpenSSL post-startup in test cases that don't use SSL.  Perhaps
> > libintl is doing something it shouldn't?
> 
> We do call into openssl in postmaster, via RandomCancelKey(). But we should
> have signals masked at that point, so it shouldn't matter.

Openssl does some muckery with signal masks on ppc (and a few others archs,
but not x86), but I don't immediately see it conflicting with our code:

https://github.com/openssl/openssl/blob/master/crypto/ppccap.c#L275

It should also already have been executed by the time we accept connections,
due to the __attribute__ ((constructor)).


I didn't check where netbsd gets libcrypto and whether it does something
different than upstream openssl...

Greetings,

Andres Freund



Commits

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

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