Re: Segmentation fault when calling BlessTupleDesc in a C function in parallel on PostgreSQL-(12.6, 12.7, 13.2, 13.3)

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Eric Thinnes <e(dot)thinnes(at)gmx(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Segmentation fault when calling BlessTupleDesc in a C function in parallel on PostgreSQL-(12.6, 12.7, 13.2, 13.3)
Date: 2021-05-29 03:51:51
Message-ID: CA+hUKG+Jadj0GaqaaZeqjpx-kiPiDKVsBLEnf06E=Ns8HKyLvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, May 17, 2021 at 7:01 PM Eric Thinnes <e(dot)thinnes(at)gmx(dot)de> wrote:
> > PG 11, before that there was a different arrangement involving
> > translation), but there is a low probability edge case that your test
> > manages to hit fairly reliably, where two backends try to bless a
>
> I see that I have a talent for stepping into the trap.
>
> > record_table_entry->key.u.shared_tupdesc);
> > Assert(result->tdrefcount == -1);
> >
> > With that change I can see it still hits this path often but works
> > correctly. Will fix next week.
>
> That is good news.
>
> This means that all users can benefit from it.

Pushed. Thanks for the report and the reproducer!

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2021-05-29 13:29:26 Re: BUG #16827: macOS interrupted syscall leads to a crash
Previous Message PG Bug reporting form 2021-05-28 15:18:14 BUG #17040: file not found