Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

From: Noah Misch <noah(at)leadboat(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "9erthalion6(at)gmail(dot)com" <9erthalion6(at)gmail(dot)com>, "sfrost(at)snowman(dot)net" <sfrost(at)snowman(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid
Date: 2019-04-04 14:53:19
Message-ID: 20190404145319.GA1720877@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 03, 2019 at 07:05:43PM -0700, Noah Misch wrote:
> On Mon, Apr 01, 2019 at 08:19:56AM +0000, Daniel Gustafsson wrote:
> > On Monday, April 1, 2019 12:42 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> > > On Fri, Mar 29, 2019 at 09:53:51AM +0000, Daniel Gustafsson wrote:
> >
> > > > This seems like a case where it would be useful to log a shmdt() error or do
> > > > an Assert() around the success of the operation perhaps?
> > >
> > > I'll add the same elog(LOG) we have at other shmdt() sites. I can't think of
> > > a site where we Assert() about the results of a system call. While shmdt()
> > > might be a justified exception, elog(LOG) seems reasonable.
> >
> > Agreed, seems reasonable.
>
> Pushed, but that broke two buildfarm members:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=idiacanthus&dt=2019-04-04%2000%3A33%3A14
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=komodoensis&dt=2019-04-04%2000%3A33%3A13
>
> I think the problem arose because these animals run on the same machine, and
> their test execution was synchronized to the second. Two copies of the new
> test ran concurrently. It doesn't tolerate that, owing to expectations about
> which shared memory keys are in use. My initial thought is to fix this by
> having a third postmaster that runs throughout the test and represents
> ownership of a given port. If that postmaster gets something other than the
> first shm key pertaining to its port, switch ports and try again.
>
> I'll also include fixes for the warnings Andres reported on the
> pgsql-committers thread.

This thread's 2019-04-03 patches still break buildfarm members in multiple
ways. I plan to revert them. I'll wait a day or two before doing that, in
case more failure types show up.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-04-04 14:55:25 Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3
Previous Message Robert Haas 2019-04-04 14:52:59 Re: [HACKERS] WAL logging problem in 9.4.3?