Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duPQC-0002BZ-E8 for pgsql-committers@arkaria.postgresql.org; Tue, 19 Sep 2017 20:47:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1duPQB-0000hE-VN for pgsql-committers@arkaria.postgresql.org; Tue, 19 Sep 2017 20:47:08 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1duPQB-0000gr-HL for pgsql-committers@postgresql.org; Tue, 19 Sep 2017 20:47:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1duPQ6-00081s-QM for pgsql-committers@postgresql.org; Tue, 19 Sep 2017 20:47:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v8JKkwW1001137; Tue, 19 Sep 2017 16:46:58 -0400 From: Tom Lane To: Andres Freund cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Make new crash restart test a bit more robust. In-reply-to: <20170919202518.au4ngniiwdsyewbp@alap3.anarazel.de> References: <20170919192032.ctybexs5whww2rw6@alap3.anarazel.de> <28340.1505849089@sss.pgh.pa.us> <20170919202518.au4ngniiwdsyewbp@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 19 Sep 2017 13:25:18 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1135.1505854018.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 19 Sep 2017 16:46:58 -0400 Message-ID: <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 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=3Dcalliphoridae&dt= =3D2017-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: hos= t=3D[local] 2017-09-19 20:20:34.477 UTC [6363] [unknown] LOG: connection authorized: u= ser=3Dandres database=3Dpostgres 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: termina= ting connection because of crash of another server process 2017-09-19 20:20:34.485 UTC [6363] t/013_crash_restart.pl DETAIL: The post= master has commanded this server process to roll back the current transacti= on 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 momen= t you should be able to reconnect to the database and repeat your command. 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? > We can obviously easily make the test accept both - but are we ok with > the client sometimes not getting the message? I'm not ... regards, tom lane --=20 Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers