public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: Amit Langote <[email protected]>
Cc: Rahila Syed <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Segmentation fault on proc exit after dshash_find_or_insert
Date: Wed, 14 Jan 2026 10:36:24 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+HiwqHzTpLH9q3XHSiXndCgVYi8CvaeOcMgu7ZoYS2XOYqtiA@mail.gmail.com>

On 2025-Dec-18, Amit Langote wrote:

> Thanks.  Updated the commit message too to be more accurate in the
> attached updated patch.

Looks good to me.  I would add an Assert(num_held_lwlocks == 0) at the
end of LWLockReleaseAll(), to make it clear that it's idempotent (which
is important for the case where ProcKill will call it again shortly
after).

Are you going to push this soon?

Looking at ProcKill, I notice that we do some LWLock ops after its
LWLockReleaseAll() call, which seems a bit silly.  Why not do that right
after the "if (MyProc->lockGroupLeader != NULL)" block instead?  Nothing
uses LWLocks from there on.  This can be a separate commit.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/






view thread (4+ messages)  latest in thread

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], [email protected], [email protected]
  Subject: Re: Segmentation fault on proc exit after dshash_find_or_insert
  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