pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Re: check failure with -DRELCACHE_FORCE_RELEASE -DCLOBBER_FREED_MEMORY
Date: Sat, 04 Mar 2017 15:41:53 -0500
Message-ID: <22846.1488660113@sss.pgh.pa.us> (raw)
In-Reply-To: <2b2c4bc2-160c-8626-1374-c0da6a638339@2ndQuadrant.com>
References: <7b52f900-0579-cda9-ae2e-de5da17090e6@2ndQuadrant.com>
	<2b2c4bc2-160c-8626-1374-c0da6a638339@2ndQuadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> On 03/03/2017 02:24 PM, Andrew Dunstan wrote:
>> I have been setting up a buildfarm member with -DRELCACHE_FORCE_RELEASE
>> -DCLOBBER_FREED_MEMORY, settings which Alvaro suggested to me.I got core
>> dumps with these stack traces. The platform is Amazon Linux.

> I have replicated this on a couple of other platforms (Fedora, FreeBSD)
> and back to 9.5. The same failure doesn't happen with buildfarm runs on
> earlier branches, although possibly they don't have the same set of tests.

well, the problem in rebuild_relation() seems pretty blatant:

    /* Close relcache entry, but keep lock until transaction commit */
    heap_close(OldHeap, NoLock);

    /* Create the transient table that will receive the re-ordered data */
    OIDNewHeap = make_new_heap(tableOid, tableSpace,
                               OldHeap->rd_rel->relpersistence,
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                               AccessExclusiveLock);

There are two such references after the heap_close.  I don't know that
those are the only bugs, but this reference is certainly the proximate
cause of the crash I'm seeing.

Will push a fix in a little bit.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (6+ messages)  latest in thread

Message-ID: <22846.1488660113@sss.pgh.pa.us>
Permalink:  ../22846.1488660113@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22846.1488660113@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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew.dunstan@2ndquadrant.com
  Subject: Re: Re: check failure with -DRELCACHE_FORCE_RELEASE -DCLOBBER_FREED_MEMORY
  In-Reply-To: <22846.1488660113@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