Re: Assertion in pgstat_assoc_relation() fails intermittently

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: bharath(dot)rupireddyforpostgres(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, andres(at)anarazel(dot)de
Subject: Re: Assertion in pgstat_assoc_relation() fails intermittently
Date: 2023-03-28 01:45:30
Message-ID: 20230328.104530.1282565642023769241.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Mon, 27 Mar 2023 11:46:08 +0530, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote in
> I recently observed an assertion failure [1] a few times on my dev
> setup during initdb. The code was built with --enable-debug
> --enable-cassert CFLAGS="-ggdb3 -O0". The assertion was gone after I
> did make distclean and built the source code again. It looks like the
> same relation (pg_type [2]) is linked to multiple relcache entries.
> I'm not sure if anyone else has seen this, but thought of reporting it
> here. Note that I'm not seeing this issue any more.

This seems like the same issue with [a] and it was fixed by cb2e7ddfe5
on Dec 2, 2022.

[a] https://www.postgresql.org/message-id/CALDaNm2yXz%2BzOtv7y5zBd5WKT8O0Ld3YxikuU3dcyCvxF7gypA%40mail.gmail.com

a> #5 0x00005590bf283139 in ExceptionalCondition
a> (conditionName=0x5590bf468170 "rel->pgstat_info->relation == NULL",
a> fileName=0x5590bf46812b "pgstat_relation.c", lineNumber=143) at
a> assert.c:66
a> #6 0x00005590bf0ce5f8 in pgstat_assoc_relation (rel=0x7efcce996a48)
a> at pgstat_relation.c:143
a> #7 0x00005590beb83046 in initscan (scan=0x5590bfbf4af8, key=0x0,
a> keep_startblock=false) at heapam.c:343
a> #8 0x00005590beb8466f in heap_beginscan (relation=0x7efcce996a48,
snapshot=0x5590bfb5a520, nkeys=0, key=0x0, parallel_scan=0x0,
flags=449) at heapam.c:1223

> [1]
> running bootstrap script ... TRAP: failed
> Assert("rel->pgstat_info->relation == NULL"), File:
> "pgstat_relation.c", Line: 143, PID: 837245
> /home/ubuntu/postgres/inst/bin/postgres(ExceptionalCondition+0xbb)[0x55d98ff6abc4]
> /home/ubuntu/postgres/inst/bin/postgres(pgstat_assoc_relation+0xcd)[0x55d98fdb3db7]
> /home/ubuntu/postgres/inst/bin/postgres(+0x1326f5)[0x55d98f8576f5]
> /home/ubuntu/postgres/inst/bin/postgres(heap_beginscan+0x17a)[0x55d98f8586b5]
> /home/ubuntu/postgres/inst/bin/postgres(table_beginscan_catalog+0x6e)[0x55d98f8c4cf3]

regareds.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-03-28 01:48:06 Why mark empty pages all visible?
Previous Message Bruce Momjian 2023-03-28 01:35:38 Re: Moving forward with TDE