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 1ljR3I-0004tz-Fz for pgsql-hackers@arkaria.postgresql.org; Wed, 19 May 2021 18:36:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ljR3G-0001Q8-BT for pgsql-hackers@arkaria.postgresql.org; Wed, 19 May 2021 18:36:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ljR3G-0001PV-3z for pgsql-hackers@lists.postgresql.org; Wed, 19 May 2021 18:36:14 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ljR3D-0001ht-JZ for pgsql-hackers@lists.postgresql.org; Wed, 19 May 2021 18:36:13 +0000 Received: (Authenticated sender: adsend@dunslane.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 1BFBA1C0002; Wed, 19 May 2021 18:36:05 +0000 (UTC) Subject: Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS To: Michael Paquier , Tom Lane Cc: pgsql-hackers@lists.postgresql.org References: <3382681.1621381328@sss.pgh.pa.us> From: Andrew Dunstan Message-ID: <1fb7d8f9-195f-ac01-e1b3-6732af36607c@dunslane.net> Date: Wed, 19 May 2021 14:36:03 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/18/21 11:03 PM, Michael Paquier wrote: > >> 3. Once the subscriber1 postmaster has exited, the TAP >> test will eventually time out, and then this happens: >> >> [.. logs ..] >> >> That is, because we failed to shut down subscriber1, the >> test script neglects to shut down subscriber2, and now >> things just sit indefinitely. So that's a robustness >> problem in the TAP infrastructure, rather than a bug in >> PG proper; but I still say it's a bug that needs fixing. > This one comes down to teardown_node() that uses system_or_bail(), > leaving things unfinished. I guess that we could be more aggressive > and ignore failures if we have a non-zero error code and that not all > the tests have passed within the END block of PostgresNode.pm. Yeah, this area needs substantial improvement. I have seen similar sorts of nasty hangs, where the script is waiting forever for some process that hasn't got the shutdown message. At least we probably need some way of making sure the END handler doesn't abort early. Maybe PostgresNode::stop() needs a mode that handles failure more gracefully. Maybe it needs to try shutting down all the nodes and only calling BAIL_OUT after trying all of them and getting a failure. But that might still leave us work to do on failures occuring pre-END. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com