pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17072: Assert for clogGroupNext failed due to a race condition in TransactionGroupUpdateXidStatus()
Date: Fri, 25 Jun 2021 14:00:00 +0300
Message-ID: <a5c5770f-4074-93b7-4c75-10a8d8d67e8f@gmail.com> (raw)
In-Reply-To: <CAA4eK1J62R6HuTDE+WDisc2Me_o0WO0ND84ixyfYekbM8su47w@mail.gmail.com>
References: <17072-2f8764857ef2c92a@postgresql.org>
	<CAA4eK1J62R6HuTDE+WDisc2Me_o0WO0ND84ixyfYekbM8su47w@mail.gmail.com>

Hello Amit,
25.06.2021 12:55, Amit Kapila wrote:
> On Fri, Jun 25, 2021 at 12:20 AM PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> The offending (the one that leaved a "valid" clogGroupNext) proccess is
>> 60d48c2d.ea21. It looks like it got from the
>> pg_atomic_compare_exchange_u32() the nextidx value that was written in the
>> clogGroupFirst by the process 60d48c2e.ebc5, and exited just after that.
>>
> Your analysis seems to be in the right direction. Can you try by
> setting clogGroupNext to INVALID_PGPROCNO
> (pg_atomic_write_u32(&proc->clogGroupNext, INVALID_PGPROCNO);) before
> we return false in the first while(true) loop in function
> TransactionGroupUpdateXidStatus()?
With this modification that assert is not triggered, all 100 iterations
pass fine (triple checked).
> I think this should be reproducible on all branches from HEAD till
> v11. Have you tried in any other branch? I'll also try to reproduce
> it.
I've reproduced it on REL_11_STABLE, REL_12_STABLE, REL_13_STABLE, and
master.

Best regards,
Alexander





view thread (9+ messages)  latest in thread

Message-ID: <a5c5770f-4074-93b7-4c75-10a8d8d67e8f@gmail.com>
Permalink:  ../a5c5770f-4074-93b7-4c75-10a8d8d67e8f@gmail.com/
Also on:    postgresql.org/message-id/a5c5770f-4074-93b7-4c75-10a8d8d67e8f@gmail.com

 · 

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-bugs@postgresql.org
  Cc: exclusion@gmail.com, amit.kapila16@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17072: Assert for clogGroupNext failed due to a race condition in TransactionGroupUpdateXidStatus()
  In-Reply-To: <a5c5770f-4074-93b7-4c75-10a8d8d67e8f@gmail.com>

* 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