pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Subject: Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485)
Date: Thu, 19 May 2022 17:16:03 -0400
Message-ID: <208993.1652994963@sss.pgh.pa.us> (raw)
In-Reply-To: <20220519193839.GT19626@telsasoft.com>
References: <20220519193839.GT19626@telsasoft.com>

Justin Pryzby <pryzby@telsasoft.com> writes:
> ./tmp_install/usr/local/pgsql/bin/postgres -D ./src/test/regress/tmp_check/data -c min_dynamic_shared_memory=1MB
> 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=fpm@entry=0x7f34b3ddd300, 
    base=base@entry=0x7f34b3ddd300 "") 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





view thread (25+ messages)  latest in thread

Message-ID: <208993.1652994963@sss.pgh.pa.us>
Permalink:  ../208993.1652994963@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/208993.1652994963@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pryzby@telsasoft.com, thomas.munro@gmail.com
  Subject: Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485)
  In-Reply-To: <208993.1652994963@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox