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 1hP6wA-0005A5-38 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 May 2019 14:55:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hP6w7-0000xO-N1 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 May 2019 14:55:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP6w7-0000ef-84 for pgsql-hackers@lists.postgresql.org; Fri, 10 May 2019 14:55:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP6w3-0003Kx-QS for pgsql-hackers@lists.postgresql.org; Fri, 10 May 2019 14:55:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x4AEtfAJ025486; Fri, 10 May 2019 10:55:41 -0400 From: Tom Lane To: Noah Misch cc: pgsql-hackers@lists.postgresql.org Subject: Re: Unexpected "shared memory block is still in use" In-reply-to: <20190510072213.GA1098093@rfd.leadboat.com> References: <22224.1557340366@sss.pgh.pa.us> <20190509055414.GB1066859@rfd.leadboat.com> <2663.1557409654@sss.pgh.pa.us> <2226.1557439179@sss.pgh.pa.us> <17642.1557442078@sss.pgh.pa.us> <20190510072213.GA1098093@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Fri, 10 May 2019 00:22:13 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25484.1557500141.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 10 May 2019 10:55:41 -0400 Message-ID: <25485.1557500141@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Noah Misch writes: > Looks good. That is basically a defect in commit c09850992; the race pa= ssed > from irrelevance to relevance when that commit subjected more segments t= o the > test. Thanks for diagnosing it. The bug's far older than that, surely, since before c09850992 we treated *any* shmat failure as meaning we'd better fail. I think you're right that c09850992 might've made it slightly more probable, but most likely the bottom line here is just that we haven't been doing parallel check-worlds a lot until relatively recently. The buildfarm would be kind of unlikely to hit this I think --- AFAIK it doesn't launch multiple postmasters using the same port number concurrently. But parallel invocation of TAP test scripts makes the hazard real. Will go fix/backpatch in a minute. regards, tom lane