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 1nHwmC-0000cu-9N for pgsql-general@arkaria.postgresql.org; Wed, 09 Feb 2022 23:53:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nHwmB-0003sC-6O for pgsql-general@arkaria.postgresql.org; Wed, 09 Feb 2022 23:53:31 +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 1nHwmA-0003rw-SL for pgsql-general@lists.postgresql.org; Wed, 09 Feb 2022 23:53:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHwm8-0004de-G7 for pgsql-general@lists.postgresql.org; Wed, 09 Feb 2022 23:53:29 +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 219NrPLA1520799; Wed, 9 Feb 2022 18:53:25 -0500 From: Tom Lane To: Michael Harris cc: Simon Riggs , Alvaro Herrera , pgsql-general@lists.postgresql.org Subject: Re: Undetected Deadlock In-reply-to: References: <202201252311.4jc4gpdzwwu7@alvherre.pgsql> <272367.1643906187@sss.pgh.pa.us> <794618.1644188230@sss.pgh.pa.us> Comments: In-reply-to Michael Harris message dated "Thu, 10 Feb 2022 10:50:04 +1100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1520797.1644450805.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 09 Feb 2022 18:53:25 -0500 Message-ID: <1520798.1644450805@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Harris writes: > On Mon, 7 Feb 2022 at 09:57, Tom Lane wrote: >> Do you want to try this and see if it actually adds any robustness with= your buggy code? > Sorry for the delayed response, & thanks for the patch. > I wasn't able to test with our actual application because it could > take days for it to actually trigger the problem, so I tested it with > a simulation, which you can find here: > https://github.com/harmic/pg_almloss > With that simulation I could attach gdb to the backend and see that > signal_pending & signal_due_at were being reset in the expected way, > even when a missed interrupt was triggered. > I'm convinced your patch improves robustness under the scenario we saw. Great, thanks for testing! regards, tom lane