Re: BUG #18832: Segfault in GrantLockLocal

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: tharakan@gmail.com, pgsql-bugs@lists.postgresql.org
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2025-03-07T00:49:53Z
Lists: pgsql-bugs
On Thu, Mar 6, 2025 at 9:57 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
> While running some tests on a recent HEAD commit (d4a6c847ca), I got 3
> segfaults today (2 for ALTER DEFAULT PRIVILEGES and 1 FOR SELECT
> pg_drop_replication_slot()). I just happen to be testing this commit, so I
> am not suspecting this commit to be the cause, but what I can add is that
> I've run similar workloads last month and these crashes are too close to be
> a coincidence - in effect I wouldn't be surprised if this is owing to a
> recent change.

I encountered the same issue months ago and reported it here [1].
Heikki suspected that commit 3c0fd64fec might be the culprit.
Unfortunately, we haven't been able to track it down because we
couldn't find a reliable way to reproduce it.

Your report shows that this issue still exists on master.  I think it
would be great if we could take this chance to trace it down to the
root cause.

[1] https://www.postgresql.org/message-id/flat/CAMbWs4_dNX1SzBmvFdoY-LxJh_4W_BjtVd5i008ihfU-wFF%3Deg%40mail.gmail.com

Thanks
Richard



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix crash if LockErrorCleanup() is called twice

  2. Split ProcSleep function into JoinWaitQueue and ProcSleep