Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTYAL-0007xv-0M for pgsql-committers@arkaria.postgresql.org; Mon, 05 Apr 2021 22:57:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lTYAJ-00018h-Fa for pgsql-committers@arkaria.postgresql.org; Mon, 05 Apr 2021 22:57:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTYAJ-00018a-AR for pgsql-committers@lists.postgresql.org; Mon, 05 Apr 2021 22:57:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTYAH-0007nx-Dr for pgsql-committers@lists.postgresql.org; Mon, 05 Apr 2021 22:57:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 135Mvlso932060; Mon, 5 Apr 2021 18:57:47 -0400 From: Tom Lane To: Michael Paquier cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Refactor all TAP test suites doing connection checks In-reply-to: References: <513200.1617634642@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Tue, 06 Apr 2021 07:43:07 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <932058.1617663467.1@sss.pgh.pa.us> Date: Mon, 05 Apr 2021 18:57:47 -0400 Message-ID: <932059.1617663467@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Mon, Apr 05, 2021 at 10:57:22AM -0400, Tom Lane wrote: >> I didn't look at the code, but I bet this is similar to the race >> conditions we've seen before where a server process may exit before >> the perl test script finishes stuffing a command down the pipe. > Hmm. Those failures refer to the 5th and 8th tests of > 001_password.pl where connect_ok() is used. The only logical > differences compared to the previous code are: > - The addition of on_error_stop in connect_ok() to ignore any errors > - The fact that this now defines a SQL query (was undef previously). > - $Test::Builder::Level > So, the problem is with on_error_stop. No, I bet it is with "now defines a SQL query". That means there's something to be stuffed down the pipe. I find I can reproduce this pretty reliably on slower machines here, if you want me to dig into it more carefully. regards, tom lane