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 1iKGRR-00065o-Md for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Oct 2019 06:36:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKGRQ-0000je-1P for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Oct 2019 06:36:20 +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 1iKGRO-0000jR-Dm for pgsql-hackers@lists.postgresql.org; Tue, 15 Oct 2019 06:36:19 +0000 Received: from [66.111.4.27] (helo=out3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKGRL-0001Cz-10 for pgsql-hackers@lists.postgresql.org; Tue, 15 Oct 2019 06:36:18 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B8B062104C; Tue, 15 Oct 2019 02:35:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 15 Oct 2019 02:35:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=odC9wLtXklV0qNETzZpLYDWl+Hz hdNmbBRmV9YY/AA4=; b=lk1OEMyB2BUSFr26pM1pnvVmOnRy14Il93lc1kafMv6 /F2/Jm42v1yH139rqjMNhYMYTPRkFWA+maBbtDX9Qu6C+w7hz1IyzeO6r61/MUar 6erploIKBNf0YPde1QCAb3PYmAkUPrd9BppXH1S31LBs0FtP93OOh7WBjt76+eeu MKqNXmLsD/bRLqF1VSlrjCKj5zW4aLZVFIdMQJUBo6XinUV5RJecqNFhpKzbH5Kd PqeT5r1gq1Fx02MPgKxBNRlCAemYqkYsnFts5zhKxaS3Ka1Z0+xzbMXCM1Syc24j 26t48PWAV5HUZNB9e/vrd1KiXXxid7s723xgbcbxsNQ== 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=odC9wL tXklV0qNETzZpLYDWl+HzhdNmbBRmV9YY/AA4=; b=h/bolt10ZtGjOsNt4SDd9s zVWmLArhReHnfIfnjOq6cPenDXfEPFUlQmBgkJOX9dEk6n2/33+YFapsUx7lVxvr SQh+uZJmvNGSkUfRIVvx2lWNMxDCpG93dG55D5ZePvfomb6C0ofWWHcjZVJBj0dw w0qtWQ6Qq4VM89PhHXj/gS8T/9sbbTQgSATzkhBjzzXnHZR0rHk3vTIVhiAGLXf/ millBQJLWMZ2OXl2jzDZOSsAQP+7Kfpsvj7oK0wT61qYYUBe2huSx6fe88ioAGKl fxiqSds8+8vYPGYTsRcnmSRC9SI0yd1jV3v//eRfhyONDKA/wGRlezrJhEXnsGLQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrjedvgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id BAB83D60063; Tue, 15 Oct 2019 02:35:50 -0400 (EDT) Date: Tue, 15 Oct 2019 15:35:47 +0900 From: Michael Paquier To: Alvaro Herrera Cc: Justin Pryzby , pgsql-hackers@lists.postgresql.org, Peter Eisentraut , Andreas Karlsson Subject: Re: v12.0: segfault in reindex CONCURRENTLY Message-ID: <20191015063547.GA2602@paquier.xyz> References: <20191013181450.GG4475@telsasoft.com> <20191013191834.GA11662@alvherre.pgsql> <20191013235716.GA25169@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <20191013235716.GA25169@paquier.xyz> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.27 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 14, 2019 at 08:57:16AM +0900, Michael Paquier wrote: > I need to think about that, but shouldn't we have a way to reproduce > that case rather reliably with an isolation test? The patch looks to > good to me, these are also the two places I spotted yesterday after a > quick lookup. The only other caller is isTempNamespaceInUse() which > does its thing correctly. Actually, reindex-concurrently.spec stresses that, except that in order to reproduce the failure we need to close the connection exactly in the waiting loop before sending the progress report but after looking at VirtualTransactionIdIsValid. Using a debugger and a simple checkpoint I can easily reproduce the crash, but we'd need more to make that test case deterministic, like a termination with the correct timing. So, Alvaro, your patch looks good to me. Could you apply it? -- Michael --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl2laMMACgkQnvQgOdby QH3qFxAAoC1c7vGMH486r0X4DRGIHLgRUygsDX1x3VKBLkOLMHTk9ppptRm54u/v LdL8M9c2IqQ/noDBpeNJCy5Zb70eotCUv9w3iWdiccYn5IZ0Mgys5+3oko6QmGZ8 k7JDht5C15E47jAvpDRGRG0bmIDwhFeNSDvvxa3JDyIEOl5mAHRXc713zo8wMghj yWh1igbE9hqdRljc7ZUmW8AK8I7JYNQZLVpgBH4+qPCd1s84SH1EL3TcShQ0BS3u JmJM6nK0ZyLIQxRxDt7EBgdzsszxdhRQt10VYDYOt2DNb8A3mEJaS26A/yfxxnPm Rb29FzmdClTa20bOCeyHwECzoj5IyuGw84xIR02LFvpkpYQVux1B+UlSofyjGcCL T1o1Lnp7SuFEsJQdeHE95BTKs9IjI8vguaLWXRjwYy96sJw0mLLVHCqyZ+rvd1St PvKatUaaieRGdlZkwSKDEsHpPMIFVfJfseAR+O0RVklCB0JtFUjn6Y/UtZQ2q4hg vFFEGDhFOtdX2kb/XD4ZkVoztpEYxODfiiCls9Q2u/Jn+B2zBmN/O0Xs1xJFMdv3 p7y8+TLF64TKbn+9/aBPIEpGYxlUdYTde15clxhuTNb+4WFj9USN5vuCh9EksC2x UzGfa0ifno3Zp37VxroH5gZxQWsRGZoZkcM4NtkpO0dnobHUYGM= =DS8e -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--