Re: logical replication launcher crash on buildfarm

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Petr Jelinek <petr@2ndquadrant.com>, Peter Eisentraut <peter_e@gmx.net>
Date: 2017-04-01T02:14:28Z
Lists: pgsql-hackers
On 2017-04-01 03:57:05 +0200, Petr Jelinek wrote:
> On 01/04/17 03:44, Andres Freund wrote:
> > On 2017-04-01 03:26:01 +0200, Petr Jelinek wrote:
> >> On 01/04/17 02:53, Robert Haas wrote:
> >>> On Fri, Mar 31, 2017 at 8:32 PM, Petr Jelinek
> >>> <petr.jelinek@2ndquadrant.com> wrote:
> >>>> Right, changed to BGW_MAXLEN.
> >>>
> >>> Hmm, I don't know if there's any good reason not to just use strcmp(),
> >>> but sure, OK.  Committed and back-patched.
> > 
> > Cool!
> > 
> > 
> >> Hmm culicidae still fails, this time only in parallel worker code.
> >> This  didn't happen on my machine which is strange.
> > 
> > Interesting.  Did you reproduce the failure before?  I wonder if the
> > issue is that you don't build a position independent executable?
> > 
> 
> I did reproduce the original issue yes, that's how I tested the patch. I
> just copy pasted CFLAGS from the buildfarm configuration of culicidae TBH.

That's not necessarily sufficient, unless you also use a sufficiently
new debian - they changed gcc to default to PIE being enabled by
default.


Greetings,

Andres Freund


Commits

  1. Avoid passing function pointers across process boundaries.

  2. Don't use bgw_main even to specify in-core bgworker entrypoints.