Fix crash if LockErrorCleanup() is called twice
Heikki Linnakangas <heikki.linnakangas@iki.fi>
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 <guofenglinux@gmail.com> Reported-by: Robins Tharakan <tharakan@gmail.com> Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAMbWs4_dNX1SzBmvFdoY-LxJh_4W_BjtVd5i008ihfU-wFF=eg@mail.gmail.com Discussion: https://www.postgresql.org/message-id/18832-38e5575b1bbd7277@postgresql.org Discussion: https://www.postgresql.org/message-id/e11a30e5-c0d8-491d-8546-3a1b50c10ad4@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/lmgr/lock.c | modified | +9 −0 |
| src/backend/storage/lmgr/proc.c | modified | +2 −0 |
| src/include/storage/lock.h | modified | +1 −0 |
Discussion
- BUG #18832: Segfault in GrantLockLocal 5 messages · 2025-03-06 → 2025-03-28
- SIGSEGV in GrantLockLocal() 3 messages · 2024-12-18
- Latches vs lwlock contention 12 messages · 2022-10-28 → 2025-03-28