public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: [email protected]
Subject: pgsql: Fix crash if LockErrorCleanup() is called twice
Date: Fri, 28 Mar 2025 18:20:33 +0000
Message-ID: <[email protected]> (raw)

Fix crash if LockErrorCleanup() is called twice

The refactoring in commit 3c0fd64fec removed the clearing of
awaitedLock from LockErrorCleanup(). It's still needed, otherwise
LockErrorCleanup() during abort processing will try to update the
LOCALLOCK struct even after the lock has already been released. Put it
back.

Reported-by: Richard Guo <[email protected]>
Reported-by: Robins Tharakan <[email protected]>
Reported-by: Alexander Lakhin <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/CAMbWs4_dNX1SzBmvFdoY-LxJh_4W_BjtVd5i008ihfU-wFF=eg@mail....
Discussion: https://www.postgresql.org/message-id/[email protected]
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/51a0382e8d8793b5cc89b69285e5ecdffe03c2bf

Modified Files
--------------
src/backend/storage/lmgr/lock.c | 9 +++++++++
src/backend/storage/lmgr/proc.c | 2 ++
src/include/storage/lock.h      | 1 +
3 files changed, 12 insertions(+)



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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Fix crash if LockErrorCleanup() is called twice
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox