pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: BUG #18031: Segmentation fault after deadlock within VACUUM's parallel worker
Date: Sat, 22 Jul 2023 13:00:00 +0300
Message-ID: <f0f5ab8f-5e3c-edd1-d6ab-d23263759f53@gmail.com> (raw)
In-Reply-To: <CAD21AoDs7vzK7NErse7xTruqY-FXmM+3K00SdBtMcQhiRNkoeQ@mail.gmail.com>
References: <18031-ebe2d08cb405f6cc@postgresql.org>
	<CAD21AoDs7vzK7NErse7xTruqY-FXmM+3K00SdBtMcQhiRNkoeQ@mail.gmail.com>

Hello Sawada-san,

21.07.2023 11:01, Masahiko Sawada wrote:
> ...
> leading to calling RemoveFromWaitQueue() again. I think we should use
> dclist_delete_from_thoroughly() instead. With the attached patch, the
> issue doesn't happen in my environment.

Thank you for the analysis and the patch! It fixes the issue for me too.

> Another thing I noticed is that the Assert(waitLock) in
> RemoveFromWaitQueue() is useless actually, since we access *waitLock
> before that:

Yeah, I also noticed that, and a simple grep-based script with a little
eyeballing discovered one similar Assert usage:

void
llvm_split_symbol_name(const char *name, char **modname, char **funcname)
{
...
         *funcname = rindex(name, '.');
         (*funcname)++;            /* jump over . */

         *modname = pnstrdup(name + strlen("pgextern."),
                             *funcname - name - strlen("pgextern.") - 1);
         Assert(funcname);

May be it's worth to fix it in passing.

Best regards,
Alexander





view thread (8+ messages)  latest in thread

Message-ID: <f0f5ab8f-5e3c-edd1-d6ab-d23263759f53@gmail.com>
Permalink:  ../f0f5ab8f-5e3c-edd1-d6ab-d23263759f53@gmail.com/
Also on:    postgresql.org/message-id/f0f5ab8f-5e3c-edd1-d6ab-d23263759f53@gmail.com

 · 

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: pgsql-bugs@postgresql.org
  Cc: exclusion@gmail.com, sawada.mshk@gmail.com, pgsql-bugs@lists.postgresql.org, andres@anarazel.de
  Subject: Re: BUG #18031: Segmentation fault after deadlock within VACUUM's parallel worker
  In-Reply-To: <f0f5ab8f-5e3c-edd1-d6ab-d23263759f53@gmail.com>

* 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