Re: BUG #17072: Assert for clogGroupNext failed due to a race condition in TransactionGroupUpdateXidStatus() - Mailing list pgsql-bugs

From Alexander Lakhin
Subject Re: BUG #17072: Assert for clogGroupNext failed due to a race condition in TransactionGroupUpdateXidStatus()
Date
Msg-id 1ede0650-1fe1-9ab4-af34-64eda8fec665@gmail.com
Whole thread Raw
Responses Re: BUG #17072: Assert for clogGroupNext failed due to a race condition in TransactionGroupUpdateXidStatus()  (vignesh C <vignesh21@gmail.com>)
List pgsql-bugs
24.06.2021 19:00, PG Bug reporting form wrote:
> With some diagnostic output added I've got in the server log:
The diagnostic patch is attached.

I could not find an easy reproduction for the issue, so I can propose
only dirty one, with the special debug patch and the following script:

for i in `seq 100`; do
createdb db$i
done

echo "
CREATE TABLE tst (i INT);
INSERT INTO tst SELECT i FROM generate_series(1,100) i;
DROP TABLE tst;
" >/tmp/action.sql

for n in `seq 100`; do
  echo "iteration $n"
  for i in `seq 100`; do
    ( { for f in `seq 10`; do cat /tmp/action.sql; done } | psql -d db$i
) >psql-$i.log 2>&1 &
  done
  wait
  coredumpctl --no-pager && break
done

(You need to set max_connections = 100 in postgresql.conf.)
This script with the patched server fails for me on iterations 66, 12, 12.

Best regards,
Alexander

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17072: Assert for clogGroupNext failed due to a race condition in TransactionGroupUpdateXidStatus()
Next
From: PG Bug reporting form
Date:
Subject: BUG #17073: docs - "Improve signal handling reliability"