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 1gnaCp-0000WH-NU for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jan 2019 02:29:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gnaCn-0007fP-Ku for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jan 2019 02:29:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnaCl-0007fH-UR for pgsql-hackers@lists.postgresql.org; Sun, 27 Jan 2019 02:29:53 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnaCd-0006A7-0w for pgsql-hackers@lists.postgresql.org; Sun, 27 Jan 2019 02:29:51 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id B3161170F; Sat, 26 Jan 2019 21:29:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 26 Jan 2019 21:29:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=yIP3rDKqXxL7qhfWlHFoNLFP6ux zYrfJ591OglawATg=; b=lLw5ia+xJATzMggXGOo00wtEVxq338RWEWHMoz9ZV78 vQhR8M5xYfr9v7JdOGGae9/2WIsLUeWc4y7ieen3++muaKO2Jf7STWPns2LJzVdy 7acuE1BS3gTK27lIY7O5X4A887yK/cImy5uCQoVYLeORjilYooUKwUBGrnxzqx4E Gl1H8jfqaxs/Eaf+syUWpPhrL/0EOCn+zbl9bBFDo7Fs1IHhTOqSWSnytCHaL78g fROYhcoeiuy/XrEpL9t2VCT9f1BlAleYpdjsYQxabN2g4aVpk0KxHMKULXrohX+i dIMPGwn4VSV2ya+Vll2bQNXItBrLhNC/NLQHhHbrlNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=yIP3rD KqXxL7qhfWlHFoNLFP6uxzYrfJ591OglawATg=; b=mA4lhCfHI/FN448iXcL3sp PzLFDWsWVpMtlSPBQamI1bvLpVLaleT8Fmd4Q6+TAPXb6Zk52MZiMcNcFVuJDwHW EyQ8TtrboWoYUcr+NEI33bd9pnu/uZtci7PE9X3yGVcre89rhpvnygcz2IJxEtC/ BbNsqukXh7lf8M5JvR0zyMG2ct8pRm/B9m1UdkEzelvIyZzVUmkFTtOnTvrS4JBu vug9uOACpiuomWEzMUhNlsu5sUd3MxgwpaRIE04jMZNCm+dOdFgmrxgjTgJzv/fY P3KtNIXGIjj5fOBn07ov/hdHMaSmbFyf+Wd9OQs116egBK6rS8j/aB9+nZE7SEVA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrieejgdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucenucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepte hnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecu ffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepleekrddvuddtrdduge dtrddujedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgii vghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 6BE3F100BB; Sat, 26 Jan 2019 21:29:38 -0500 (EST) Date: Sat, 26 Jan 2019 18:29:37 -0800 From: Andres Freund To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org, mikael.kjellstrom@gmail.com Subject: Re: Race condition in crash-recovery tests Message-ID: <20190127022937.nvocrvsok7nlp4vt@alap3.anarazel.de> References: <19344.1548554028@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19344.1548554028@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-01-26 20:53:48 -0500, Tom Lane wrote: > Recently, buildfarm member curculio has started to show a semi-repeatable > failure in src/test/recovery/t/013_crash_restart.pl: > > # aborting wait: program died > # stream contents: >>psql::8: no connection to the server > # psql::8: connection to server was lost > # << > # pattern searched for: (?^m:server closed the connection unexpectedly) > > # Failed test 'psql query died successfully after SIGKILL' > # at t/013_crash_restart.pl line 198. > > The message this test is looking for is what libpq reports upon getting > EOF or ECONNRESET from a socket read attempt. The message it's actually > seeing is what libpq reports if it notices that the PQconn is *already* > in CONNECTION_BAD state when it's trying to send a new query. > > I have no idea why we're seeing this in only one buildfarm member > and only for the past week or so, as it doesn't appear that any > related code has changed for months. (Perhaps something changed > about curculio's host?) I have no idea why it's just curculio, but I think I know why it only started recently: Curculio doesn't appear to have tap tests enabled before https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=curculio&dt=2019-01-17%2021%3A30%3A02 > just change the test script to accept either message as a successful > result. I think that 4247db625 made such races more likely, but I > don't believe it was impossible before. Sounds right to me - do you want to do the honors or shall I? > Another idea is to change libpq so that both these cases emit identical > messages, but I don't really feel that that'd be an improvement. Also, > since 4247db625 was back-patched, we'd have to back-patch the message > change as well, which I like even less. People might be relying on > seeing either message spelling in some situations. Yea, I don't think that's the way to go. Greetings, Andres Freund