Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duPWW-0002ai-CZ for pgsql-committers@arkaria.postgresql.org; Tue, 19 Sep 2017 20:53:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1duPWV-0004rN-VQ for pgsql-committers@arkaria.postgresql.org; Tue, 19 Sep 2017 20:53:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1duPWG-0004DR-Ge for pgsql-committers@postgresql.org; Tue, 19 Sep 2017 20:53:24 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1duPWD-0000nA-GY for pgsql-committers@postgresql.org; Tue, 19 Sep 2017 20:53:23 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3861920CBF; Tue, 19 Sep 2017 16:53:20 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Tue, 19 Sep 2017 16:53:20 -0400 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-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=43QDI8YZBK8oTvNfhi tSOG3bQHEyl/g37NhVLm9TAe4=; b=qMW55FiKF2Dg2EJl3lYS5CnI7tIbGuPxsb GTiK0B18ivjdl/pKLxFs3hYl46f9loNHERXHTLsEIvueyYy1SbcYkWMtTjWdD91W 5B0j8U3nCgd0V67TalsGK+UGJOmFMVuH2IqtxXbrK+2J6cQod1KeF2qnVbVexitE Yo1sQu7PSv2YnTfisIUCHbY/SsrWhqtgqZ/3nvCtgCCRRLL41onm7/ZGIykPeitm /iSHDeBGWBTYkFbCkCi5oPjaHprMdo8Bmrk5Y+ebBDHH0TVP3Sez7Lsw3FUCiops SfHpw+n/mO6tPimBAKW/0T6dkBkqMWAAfotk+aXSEFQvOo0LpfrA== X-ME-Sender: X-Sasl-enc: /XYdVPgS+E1tHybgMZojdpKz5Pc/zkoCgM/BhYnw78z2 1505854399 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id E7A687E372; Tue, 19 Sep 2017 16:53:19 -0400 (EDT) Date: Tue, 19 Sep 2017 13:53:18 -0700 From: Andres Freund To: Tom Lane Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Make new crash restart test a bit more robust. Message-ID: <20170919205318.sm3vcmsngd633kpd@alap3.anarazel.de> References: <20170919192032.ctybexs5whww2rw6@alap3.anarazel.de> <28340.1505849089@sss.pgh.pa.us> <20170919202518.au4ngniiwdsyewbp@alap3.anarazel.de> <1136.1505854018@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1136.1505854018@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2017-09-19 16:46:58 -0400, Tom Lane wrote: > Andres Freund writes: > > So this is geniuinely interesting. When the machine is really loaded (as > > in 6 animals running on a vm at the same time, incuding valgrind), psql > > sometimes doesn't get the WARNING message from a shutdown. Instead it > > gets > > # psql::3: server closed the connection unexpectedly > > # This probably means the server terminated abnormally > > # before or while processing the request. > > # psql::3: connection to server was lost > > That seems pretty weird. Maybe it's not the same case, but in > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2017-09-19%2020%3A10%3A02 > > you can see from the postmaster log that the backend *is* issuing > the message, or at least it's getting to the server log: > > 2017-09-19 20:20:34.476 UTC [6363] [unknown] LOG: connection received: host=[local] > 2017-09-19 20:20:34.477 UTC [6363] [unknown] LOG: connection authorized: user=andres database=postgres > 2017-09-19 20:20:34.478 UTC [6363] t/013_crash_restart.pl LOG: statement: SELECT $$psql-connected$$; > ... > 2017-09-19 20:20:34.485 UTC [6363] t/013_crash_restart.pl WARNING: terminating connection because of crash of another server process > 2017-09-19 20:20:34.485 UTC [6363] t/013_crash_restart.pl DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. > 2017-09-19 20:20:34.485 UTC [6363] t/013_crash_restart.pl HINT: In a moment you should be able to reconnect to the database and repeat your command. I think it's likely the same - I've observed the same with the added instrumentation. > Have we forgotten an fflush() or something? > > Also, maybe problem is on client side. I vaguely recall a libpq bug > wherein it would complain about socket EOF even though data remained > to be processed. Maybe we reintroduced something like that? That seems quite possible. > > We can obviously easily make the test accept both - but are we ok with > > the client sometimes not getting the message? > > I'm not ... Same here. I'll see if I can spot the bug in an hour or two. If not I'll make the test temporarily accept both outputs while investigating? Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers