Re: BUG #18334: Segfault when running a query with parallel workers

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Marcin Barczyński <mba(dot)ogolny(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18334: Segfault when running a query with parallel workers
Date: 2024-05-24 01:32:26
Message-ID: CA+hUKG+aHYKG2aJ=td9v5sAx2hsyXbAHr3NJSGp+P7x_awWEUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, May 24, 2024 at 12:45 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> I wondered if the tricky edge case where a segment gets unmapped and
> then then remapped in the same slot could be leading to segment
> confusion. That does involve a bit of memory order footwork. What
> CPU architecture is this? But alas I can't come up with any case
> where that could go wrong even if there is an unknown bug in that
> area, because the no-rebatching, no-rebucketing case doesn't free
> anything until the end when it frees everything (ie it never frees
> something and then allocate, a requirement for slot re-use).

... but if I'm missing something there, it might be a clue visible
from gdb if area->control->freed_segment_counter (the one in shared
memory) and area->freed_segment_counter (the one in this backend) have
different values, if your core captured the segments.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-05-24 05:01:32 BUG #18478: uuid-ossp extension is not installed with PostgreSQL 17 Beta 1
Previous Message Thomas Munro 2024-05-24 00:45:14 Re: BUG #18334: Segfault when running a query with parallel workers