pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: julian.schauder@gmx.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16219: EvalPlanQualFetchRowMark segfaults on Updates
Date: Mon, 20 Jan 2020 11:14:26 -0500
Message-ID: <13589.1579536866@sss.pgh.pa.us> (raw)
In-Reply-To: <16219-578ae955109d9fd2@postgresql.org>
References: <16219-578ae955109d9fd2@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> for a week now (upgrade pg11=>12) we're experiencing a bug that causes
> segfaults on a daily basis. 
> I've yet to reproduce this exact behaviour as the querys do not fail all the
> time but rather now-and-then 
> when run concurrently. ( ~4 Crashes so far )

Not sure if you realize that the EvalPlanQual stuff is only called when
there's an uncommitted conflicting update on a target row.  So the way
I'd try to reproduce something like this is

session 1                            session 2

begin;
issue update query;
                                     issue same update query;
commit;

which should take the race-condition issue out of the equation,
since session 2 will certainly be trying to update the same
rows that session 1 did but hasn't yet committed.

There may be other hard-to-reproduce factors at work, of course.
If you can test on a debug build (with --enable-cassert), that'd
help remove a few more variables.

>> earm = 0x5576c7176258
>> erm = 0x24

> Excerpt shows the pointer 0x24 of erm to be uninitialized'ish.

Yeah.  If you could do "p *earm" here, that might offer some clues;
I'm wondering if that entire struct has gotten trashed (likely because
somebody freed it too soon).

			regards, tom lane





view thread (2+ messages)

Message-ID: <13589.1579536866@sss.pgh.pa.us>
Permalink:  ../13589.1579536866@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13589.1579536866@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, julian.schauder@gmx.de
  Subject: Re: BUG #16219: EvalPlanQualFetchRowMark segfaults on Updates
  In-Reply-To: <13589.1579536866@sss.pgh.pa.us>
  References: <16219-578ae955109d9fd2@postgresql.org> <13589.1579536866@sss.pgh.pa.us>

* 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