Re: PostmasterContext survives into parallel workers!?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostmasterContext survives into parallel workers!?
Date: 2016-08-01 23:36:52
Message-ID: 20160801233652.wdib3jxurbf7kdou@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-08-02 11:27:25 +1200, Thomas Munro wrote:
> On Tue, Aug 2, 2016 at 10:28 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Andres Freund <andres(at)anarazel(dot)de> writes:
> >> On 2016-08-01 18:09:03 -0400, Robert Haas wrote:
> >>> (Also vaguely on the list of things to clean up: can't we make it so
> >>> that bgworkers aren't launched from inside a signal handler? Blech.)
> >
> >> Isn't pretty much everything on-demand below postmaster started from a
> >> signal handler?
> >
> > I think it depends. As an example, maybe_start_bgworker is called
> > from PostmasterMain, *and* from ServerLoop, *and* from reaper,
> > *and* from sigusr1_handler. That's likely excessive, but it's what
> > we've got at the moment.
>
> I found this apparently unresolved bug report about glibc fork()
> inside a signal handler deadlocking:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=4737
>
> I wonder if that could bite postmaster. It's interesting because
> comments 16 and 19 and 22 suggest that it may not be fixed.

Moreover the solution appears to be to define the problem away:
http://www.opengroup.org/austin/docs/austin_445.txt
https://www.opengroup.org/austin/docs/austin_446.txt

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-01 23:42:28 Re: PostmasterContext survives into parallel workers!?
Previous Message Michael Paquier 2016-08-01 23:36:45 Re: New version numbering practices