Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrnVC-00077g-I8 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 May 2022 21:16:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nrnVA-0008Ul-IA for pgsql-hackers@arkaria.postgresql.org; Thu, 19 May 2022 21:16:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrnVA-0008T6-8i for pgsql-hackers@lists.postgresql.org; Thu, 19 May 2022 21:16:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrnV7-0005xe-So for pgsql-hackers@lists.postgresql.org; Thu, 19 May 2022 21:16:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24JLG3uA208994; Thu, 19 May 2022 17:16:03 -0400 From: Tom Lane To: Justin Pryzby cc: pgsql-hackers@lists.postgresql.org, Thomas Munro Subject: Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485) In-reply-to: <20220519193839.GT19626@telsasoft.com> References: <20220519193839.GT19626@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Thu, 19 May 2022 14:38:39 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <208992.1652994963.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 19 May 2022 17:16:03 -0400 Message-ID: <208993.1652994963@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > ./tmp_install/usr/local/pgsql/bin/postgres -D ./src/test/regress/tmp_che= ck/data -c min_dynamic_shared_memory=3D1MB > TRAP: FailedAssertion("val > base", File: "../../../../src/include/utils= /relptr.h", Line: 67, PID: 21912) Yeah, I see it too. > It looks like this may be pre-existing problem exposed by > commit e07d4ddc55fdcf82082950b3eb0cd8f728284c9d Agreed. Here I see #5 FreePageManagerInitialize (fpm=3Dfpm@entry=3D0x7f34b3ddd300, = base=3Dbase@entry=3D0x7f34b3ddd300 "") at freepage.c:187 #6 0x000000000082423e in dsm_shmem_init () at dsm.c:473 so that where we do relptr_store(base, fpm->self, fpm); the "relative" pointer value would have to be zero, making the case indistinguishable from a NULL pointer. We can either change the caller so that these addresses aren't the same, or give up the ability to store NULL in relptrs ... doesn't seem like a hard call. One interesting question I didn't look into is why it takes a nondefault value of min_dynamic_shared_memory to expose this bug. regards, tom lane