Re: margay fails assertion in stats/dsa/dsm code

Marcel Hofstetter <hofstetter@jomasoft.ch>

From: Marcel Hofstetter <hofstetter@jomasoft.ch>
To: Thomas Munro <thomas.munro@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-06-28T07:22:23Z
Lists: pgsql-hackers
Am 28.06.2022 um 08:27 schrieb Thomas Munro:
> On Fri, Jun 3, 2022 at 12:05 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> BF animal margay (a newly started Solaris 11.4/Sparc/GCC 11.2 box) is
>> sometimes failing with:
>>
>> TRAP: FailedAssertion("seg->mapped_address != NULL", File: "dsm.c",
>> Line: 1069, PID: 9038)
> 
> I spent some time on the GCC farm machine gcc211 (Sol 11.3, GCC 5.5),
> but could not repro this.  It's also not happening on wrasse (Sol
> 11.3, Sun Studio compiler).  I don't have access to a Sol 11.4
> CBE/Sparc system like margay, but I have learned that CBE is the name
> of a very recently announced rolling release intended for open source
> developers[1].  I still have no idea if the active thing here is
> Sparc, Sol 11.4, "CBE", GCC 11.2 or just timing conditions that reveal
> bugs in our dsm/dsa/dshash/pgstat code that show up here in about 1/4
> of make check runs on this stack, but miraculously nowhere else.
> Perhaps margay's owner could shed some light, or has a way to provide
> ssh access to a similar zone with a debugger etc installed?
> 
> [1] https://blogs.oracle.com/solaris/post/announcing-the-first-oracle-solaris-114-cbe


Looks like a timing issue for me, because it happens only sometimes.
No problems with versions 14 and 13.

I can provide ssh access to this system.




Commits

  1. Fix lock assertions in dshash.c.

  2. Default to dynamic_shared_memory_type=sysv on Solaris.

  3. Harden dsm_impl.c against unexpected EEXIST.