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 1iWsdE-0007ML-Hx for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2019 01:48:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iWsdD-00016n-5q for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2019 01:48:39 +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 1iWsdC-00016f-U6 for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2019 01:48:38 +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 1iWsdA-0005hy-0a for pgsql-bugs@lists.postgresql.org; Tue, 19 Nov 2019 01:48:38 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 036B4669; Mon, 18 Nov 2019 20:48:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 18 Nov 2019 20:48:33 -0500 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=Ut27cME+emCM1KkodcH/1X7Rp/w pftU0Vqw+vA5ygj0=; b=IAsfSe/va5Jc/qO/LTGvrAndMjypxDClSxoID2pG/GQ AIM7fbvdw8NDyS650M6ZxXCrvGAj2iRJ48dR/qxIag/IJoltzfB9FqWb2Lr9dP9I s1QragvhCD+SRGbs5oYFYjX94ri8YzRDrbgL1UlYu9cLIdh1Ywfevxt2nYuwdKj4 LwOUpnojQfybWVw0eC/Kgc1sdwH8lakUK0U0PUc51LDs1lJerTAlBlXph2bPEGVK DzYgyxdxx/gOv011YuDtLc95BISxNKJnZOl3E7rXm3eatUWy8PUSUeX4Gv7dFBMY 2BQa/Wl6y20jj1dkYnNAsRKN0C20NUVQGMcAgXRq2/w== 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=Ut27cM E+emCM1KkodcH/1X7Rp/wpftU0Vqw+vA5ygj0=; b=xjd9AHjmOClkF1IMmmG1G6 zvkWdxnHqciIkh8hri0hweP4koyYhmc5TIdAgA/nxfDAdhknAmBmECuJ35ZqOJwT 17T5jk9EkSt/RME+60gE6XOMv93qXXYrU0OW1GuDy3vLNckXR0Uib7YOxtyBZbKk A2Oi4XTc0vsT+jlaAHXGt0QO7QFiQf45p7gWPPEdfsgkPqJ5lKUMCyC26z+wLtzt hWDqKfxjlICGn4SkENBcrDwXeAD6S1kSiaDP8FCcIkUfoWMoD0Yh2dDxTP/RHcaX NbeuMXwsQkFMhfQSXQIiwXoP4PuptZVvPO58+V3hXYSZlljH/APiLVBcmWYScHVw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudegjedgfeejucetufdoteggodetrfdotf 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 C257F80060; Mon, 18 Nov 2019 20:48:30 -0500 (EST) Date: Tue, 19 Nov 2019 10:48:27 +0900 From: Michael Paquier To: Adam Scott Cc: Tomas Vondra , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833 numrange query Message-ID: <20191119014827.GC1614@paquier.xyz> References: <16122-eb35bc248c806c15@postgresql.org> <20191118120312.cblcswef6vuqbijq@development> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="V88s5gaDVPzZ0KCq" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --V88s5gaDVPzZ0KCq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 18, 2019 at 03:59:14PM -0800, Adam Scott wrote: > It was bugging out with an empty table but it seems intermittent. A > successful query followed by the one above will not fail sometimes; hence > the need for a from-scratch startup instance of postgres. Okay, that has proved to help a lot. I have restored the dump, and after an analyze on natica_hdu_test I can see the failure immediately. I have also extracted a small test case able to reproduce the failure. That's actually pretty close to the scenarios I was playing with upthread, still I missed it: CREATE TABLE rangetab (a numrange); INSERT INTO rangetab SELECT ('['|| (45.0 - a::numeric/10000000) || ',' || (45.1 + a::numeric/10000000) || ')')::numrange FROM generate_series(1,1000) as a; ANALYZE rangetab; SELECT a FROM rangetab WHERE a <@ '[89.9999998611111,90.0000001388889)'; =20 I can easily reproduce the failure on HEAD, REL_12_STABLE and REL_11_STABLE. On 10, I could not. But now that we have a test case that's only a matter of time. -- Michael --V88s5gaDVPzZ0KCq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl3TSesACgkQnvQgOdby QH23kA/8DFS4FLpOzx+dbBbH8w0mCbcmipRDK8aLZHoSMyqlJ0AGUx+nasyG3W2k LxV+2fAPNWoM8AJcQ18Ua7G+Hy9uwIslczis0YG8S7ITDjv7zIPbCw2IztYOoRKt PlQi9lAkF4aAEBvszYi/R6LAIWvKSMB2B053vODvhWXLKd2keUqgG6RaskHKsmz7 z1vMt01zUsgir4M8nanL9mszX1t/yxQ0MSAb1R/N80C0FtJ4QWKyOTXt3ln5R2hz LZ/I/ZPIxzHqSulDypFGQiZ/+TMZWO1eCZIB1xADTHUUopf2edMFL/DiXPSYfKvC g0vT63BdK2XfmsZZGlSAJ3OwCE7pGd0tDzbSL8DkActak154f+feYlGEWINNmWCr bD8ut/NI/KytGTfC+H2xsUDBi4bRzzWlOcexIO2dSHHSKHZqgh0zORkWCVO0gsfY V7NupOtO209oJfGe5IyC7JWq/Sc4ZvJCWZVRKsBipnM2ddAhRcLlzha10ybT+oHH //DX+qLfcAsg22b6n250UcqOS+txWNF25gGqmCNniw0b7uiWb3Nwm14tyz/3aw7E 1mLkdu7Zh5gK7Tzx1AtSTPpFoOeYr8URQyX57MYJjhBVgKEPAO6ThMpBdKSJS3oa +ejALTznADK3zjJw6bcFtSfKZlkqASCNslSqVzsicYGLm3rL2cA= =8PZx -----END PGP SIGNATURE----- --V88s5gaDVPzZ0KCq--