From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: a.pyhalov@postgrespro.ru
Subject: BUG #17122: panic on prepare with subsequent pg_advisory_lock() and pg_advisory_xact_lock_shared()
Date: Fri, 23 Jul 2021 14:17:25 +0000
Message-ID: <17122-04f3c32098a62233@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17122
Logged by: Alexander Pyhalov
Email address: a.pyhalov@postgrespro.ru
PostgreSQL version: 13.3
Operating system: Ubuntu 20.04
Description:
The issue is reproducible at least on on PG 13.3 and 14beta2
mkdir d;
initdb -D d;
Increase max_prepared_transactions in postgresql.conf (for example, set it
to 10).
The following statements lead to panic:
begin;
select pg_advisory_lock(1);
select pg_advisory_xact_lock_shared(1);
prepare transaction 'test';
2021-07-23 17:15:59.868 MSK [61851] PANIC: we seem to have dropped a bit
somewhere
2021-07-23 17:15:59.868 MSK [61851] STATEMENT: prepare transaction
'test';
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007fc72923c859 in __GI_abort () at abort.c:79
#2 0x000055f80d4facdd in errfinish (filename=0x55f80d6b53c3 "lock.c",
lineno=3466, funcname=0x55f80d6b6200 <__func__.13837> "PostPrepare_Locks")
at elog.c:592
#3 0x000055f80d340143 in PostPrepare_Locks (xid=485) at lock.c:3466
#4 0x000055f80cf50942 in PrepareTransaction () at xact.c:2519
#5 0x000055f80cf512b9 in CommitTransactionCommand () at xact.c:3034
#6 0x000055f80d35c487 in finish_xact_command () at postgres.c:2662
#7 0x000055f80d359edb in exec_simple_query (query_string=0x55f80f0890a0
"prepare transaction 'test';") at postgres.c:1264
#8 0x000055f80d35e587 in PostgresMain (argc=1, argv=0x55f80f0b38b0,
dbname=0x55f80f0856d8 "postgres", username=0x55f80f0b37d0 "leoric") at
postgres.c:4339
#9 0x000055f80d29ddf4 in BackendRun (port=0x55f80f0abc20) at
postmaster.c:4526
#10 0x000055f80d29d4f6 in BackendStartup (port=0x55f80f0abc20) at
postmaster.c:4210
#11 0x000055f80d2997ec in ServerLoop () at postmaster.c:1739
#12 0x000055f80d298f85 in PostmasterMain (argc=3, argv=0x55f80f083650) at
postmaster.c:1412
#13 0x000055f80d193dcd in main (argc=3, argv=0x55f80f083650) at main.c:210
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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, a.pyhalov@postgrespro.ru
Subject: Re: BUG #17122: panic on prepare with subsequent pg_advisory_lock() and pg_advisory_xact_lock_shared()
In-Reply-To: <17122-04f3c32098a62233@postgresql.org>
* 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