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 1lRiHC-0006l4-O9 for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Mar 2021 21:21:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRiHB-0004vn-Gx for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Mar 2021 21:21:21 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRiHB-0004vg-AA for pgsql-hackers@lists.postgresql.org; Wed, 31 Mar 2021 21:21:21 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRiH8-0006N8-FJ for pgsql-hackers@lists.postgresql.org; Wed, 31 Mar 2021 21:21:20 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 85C201A45; Wed, 31 Mar 2021 17:21:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 31 Mar 2021 17:21:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=jDPHO0gsAI4UnaVLKGDog7RrOGok7J+5ihhQ8o710a4=; b=FxmeS44b 2wfLS8kqtqHTbYBc6DUUay87BG5Mvf85MIqfUjgYVVOpbAmb9h1dwtrGv5Jt2rPR MQ8JdGvzl1wgNiIl+EzLTJHNyDUnLCOaZ+Z2aTEZXPy58Nkmf7eQ+axp/R2SS0Vo QKjfqFT95NpFRmlYiyh4GCCPhqWESXPEPHfM91DkvWBSnUaYwjoXyLzGqUfDsl3f J/lEsTtId4SxwoStaCRe1Liz/0gLgGVc2w0WVRWLMQqyTVqN49OXZKe+1e+fpj5x osEg5f75MvEllm00VzTYCfMi941ygjPUIeuvsSbVMI+raEDWuXC+ZJlTKFdmH2Gf YtX+eVFDEwpApg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeivddgudeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtledqtdduucdlvddtmdenucfjughrpe ffhffvuffkgggtugfgjggfsehtkeertddtredunecuhfhrohhmpedfkdgrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgkddfuceorghlvhhhvghrrhgvsegrlhhvhhdrnh hoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepheekgeeivdeuffelhedtueffteej jedtteetueekuddvgeduiefhfeffvefftddunecukfhppeduledtrdelhedrudelrdelhe enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 04F13108005C; Wed, 31 Mar 2021 17:21:14 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 00FC22A0CAD; Wed, 31 Mar 2021 18:21:10 -0300 (-03) Date: Wed, 31 Mar 2021 18:21:10 -0300 From: "'alvherre@alvh.no-ip.org'" To: Tom Lane Cc: "iwata.aya@fujitsu.com" , "tsunakawa.takay@fujitsu.com" , 'Kyotaro Horiguchi' , "k.jamison@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" Subject: Re: libpq debug log Message-ID: <20210331212110.GA12557@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3304521.1617221724@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Mar-31, Tom Lane wrote: > I think this is a timing problem that's triggered (on some machines) > by force_parallel_mode = regress. Looking at spurfowl's latest > failure of this type, the postmaster log shows > > 2021-03-31 14:34:54.982 EDT [18233:15] 001_libpq_pipeline.pl LOG: execute : SELECT 1.0/g FROM generate_series(3, -1, -1) g > 2021-03-31 14:34:54.992 EDT [18234:1] ERROR: division by zero > 2021-03-31 14:34:54.992 EDT [18234:2] STATEMENT: SELECT 1.0/g FROM generate_series(3, -1, -1) g > 2021-03-31 14:34:54.993 EDT [18233:16] 001_libpq_pipeline.pl ERROR: division by zero > 2021-03-31 14:34:54.993 EDT [18233:17] 001_libpq_pipeline.pl STATEMENT: SELECT 1.0/g FROM generate_series(3, -1, -1) g > 2021-03-31 14:34:54.995 EDT [18216:4] LOG: background worker "parallel worker" (PID 18234) exited with exit code 1 > 2021-03-31 14:34:54.995 EDT [18233:18] 001_libpq_pipeline.pl LOG: could not send data to client: Broken pipe > 2021-03-31 14:34:54.995 EDT [18233:19] 001_libpq_pipeline.pl FATAL: connection to client lost > > We can see that the division by zero occurred in a parallel worker. > My theory is that in parallel mode, it's uncertain whether the > error will be reported before or after the "preceding" successful > output rows. So you need to disable parallelism to make this > test case stable. Ooh, that makes sense, thanks. Added a SET in the program itself to set it to off. This is not the *only* issue though; at least animal drongo shows a completely different failure, where the last few tests don't even get to run, and the server log just has this: 2021-03-31 20:20:14.460 UTC [178364:4] 001_libpq_pipeline.pl LOG: disconnection: session time: 0:00:00.469 user=pgrunner database=postgres host=127.0.0.1 port=52638 2021-03-31 20:20:14.681 UTC [178696:1] [unknown] LOG: connection received: host=127.0.0.1 port=52639 2021-03-31 20:20:14.687 UTC [178696:2] [unknown] LOG: connection authorized: user=pgrunner database=postgres application_name=001_libpq_pipeline.pl 2021-03-31 20:20:15.157 UTC [178696:3] 001_libpq_pipeline.pl LOG: could not receive data from client: An existing connection was forcibly closed by the remote host. I suppose the program is crashing for some reason. -- Álvaro Herrera Valdivia, Chile "Los dioses no protegen a los insensatos. Éstos reciben protección de otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)