Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hC3k9-00055d-HA for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 14:53:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hC3k8-0006as-7E for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 14:53:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hC3k7-0006TL-Ff for pgsql-hackers@lists.postgresql.org; Thu, 04 Apr 2019 14:53:27 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hC3k4-0004BU-DF for pgsql-hackers@postgresql.org; Thu, 04 Apr 2019 14:53:27 +0000 Received: by mail-pg1-x544.google.com with SMTP id j26so1371234pgl.5 for ; Thu, 04 Apr 2019 07:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dnoLKKW5Czf9qNC9HU0FB7pMTW9Ken653gmUzghnSYM=; b=Y/C4p87+/Ya1Vqa7lMaLZe3QmPmwKmdr49ATnbbBU/TBRv3+p8OSmEz+iPlNursFQk bxwY7X5GgOnWw1KoU9Ge1gAw3S7N791tcZwaics5iMoPixlnnIs+rXa4D9oG9eHfZ5k3 2ExQkwblccOGP5Rm5167kChBIudJFoNUgr79A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dnoLKKW5Czf9qNC9HU0FB7pMTW9Ken653gmUzghnSYM=; b=bhozsgiRDIY7YO4EdvPCmVgqlXJI1D2TYtPBNIKBrZoNA9p3Jo4vHN7yl8qxSl/ICJ IaX0nYn4qBlYp+b61MyE1lxJOJi3/uWbl5GNteCwfDuGVKMYj6z4PwaHC2iK0Na3z4Zh n2GdZgcEd10ESt/trCbBq2arUGOVe8PqtyNHwGQY6/N/PPSCmLPxZc0ScDnraSoCj1Gi hb40AO+hi9cuoUZWOyusxmZWzewn58x/vavsY5MwUctVg+HWgEueBn0tGFj32E1D9pEk Dzb8GL4An7eVYEaw2WwPgBrBaO3ww5dnqVBTYI90+U9uqcnuggiPjJC20ZuFntVJUF3D A39g== X-Gm-Message-State: APjAAAVErJNM2u/IXhS/5hXvgnuQ5GIix4BpsHDJMhWqpmsBGnFpW1Z5 YjHkatvWPzBBKXQVO6WbvUK40g== X-Google-Smtp-Source: APXvYqz2nnYP1+85o9ilbJlnKS0JlOYUxlsk4wHL1ABMPl/VzbcpS32pl5BB4VgkDVqxIOQdIg858A== X-Received: by 2002:a62:571b:: with SMTP id l27mr6354047pfb.195.1554389601964; Thu, 04 Apr 2019 07:53:21 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id p81sm32947625pfi.186.2019.04.04.07.53.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 07:53:21 -0700 (PDT) Date: Thu, 4 Apr 2019 07:53:19 -0700 From: Noah Misch To: Daniel Gustafsson Cc: Kyotaro HORIGUCHI , "9erthalion6@gmail.com" <9erthalion6@gmail.com>, "sfrost@snowman.net" , "pgsql-hackers@postgresql.org" Subject: Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid Message-ID: <20190404145319.GA1720877@rfd.leadboat.com> References: <20181130065140.GB2774301@rfd.leadboat.com> <20181203004106.GA2860387@rfd.leadboat.com> <20190304.180420.139624607.horiguchi.kyotaro@lab.ntt.co.jp> <20190307032422.GB1797215@rfd.leadboat.com> <20190309071610.GA2039121@rfd.leadboat.com> <20190331224233.GC891537@rfd.leadboat.com> <20190404020543.GA1319573@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190404020543.GA1319573@rfd.leadboat.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 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.