Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1 - Mailing list pgsql-hackers

From Jakub Wartak
Subject Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1
Date
Msg-id CAKZiRmxx_soeY3vQwz7yYLgZo3b-HoFAQ50NOwnzmV2qUMVa0A@mail.gmail.com
Whole thread Raw
In response to Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
List pgsql-hackers
Hi hackers,

Mr Lane, thank you for backporting this also to version 13. It seems
to be occuring in the wild (without debug_discard_caches) for real
user too when doing a lot of "CREATE  INDEX i ON
unlogged_table_truncated_after_crash (x,y)" which sometimes (rarely)
results in SIGSEGV11. I've reproduced it also on 13.9 recently thanks
to "break *btbuildempty / call InvalidateSystemCaches()".

I'm leaving partial stack trace so that other might find it (note the:
smgrwrite reln=0x0):

#0  smgrwrite (reln=0x0, forknum=INIT_FORKNUM, blocknum=0,
buffer=0xeef828 "", skipFsync=true) at smgr.c:516
#1  0x00000000004e5492 in btbuildempty (index=0x7f201fc3c7e0) at nbtree.c:178
#2  0x00000000005417f4 in index_build
(heapRelation=heapRelation@entry=0x7f201fc49dd0,
indexRelation=indexRelation@entry=0x7f201fc3c7e0,
indexInfo=indexInfo@entry=0x1159dd8,
#3  0x0000000000542838 in index_create
(heapRelation=heapRelation@entry=0x7f201fc49dd0,
indexRelationName=indexRelationName@entry=0x1159f38 "xxxxxxxx",
indexRelationId=yyyyy..)
#4  0x00000000005db9c8 in DefineIndex
(relationId=relationId@entry=1804880199, stmt=stmt@entry=0xf2fab8,
indexRelationId=indexRelationId@entry=0,
parentIndexId=parentIndexId@entry=0

-Jakub Wartak.

On Fri, Nov 25, 2022 at 9:48 AM Tomas Vondra
<tomas.vondra@enterprisedb.com> wrote:
>
>
>
> On 11/18/22 15:43, Tom Lane wrote:
> > David Geier <geidav.pg@gmail.com> writes:
> >> On a different note: are we frequently running our tests suites with
> >> debug_discard_caches=1 enabled?
> >> It doesn't seem like.
> >
> > Hmm.   Buildfarm members avocet and trilobite are supposed to be
> > doing that, but their runtimes of late put the lie to it.
> > Configuration option got lost somewhere?
> >
>
> Yup, my bad - I forgot to tweak CPPFLAGS when upgrading the buildfarm
> client to v12. Fixed, next run should be with
>
>     CPPFLAGS => '-DCLOBBER_CACHE_ALWAYS',
>
>
> regards
>
> --
> Tomas Vondra
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
>
>



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Add 64-bit XIDs into PostgreSQL 15
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: Avoid distributing new catalog snapshot again for the transaction being decoded.