Re: 9.4.1 segfault while creating hash index on temporary table - Mailing list pgsql-bugs

From Tom Lane
Subject Re: 9.4.1 segfault while creating hash index on temporary table
Date
Msg-id 9927.1431493742@sss.pgh.pa.us
Whole thread Raw
In response to 9.4.1 segfault while creating hash index on temporary table  (Artem Ignatyev <cryo28@gmail.com>)
Responses Re: 9.4.1 segfault while creating hash index on temporary table  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-bugs
Artem Ignatyev <cryo28@gmail.com> writes:
> I am seeing this bug on my CentOS 6.6 PostgreSQL 9.4.1 db server
> (installed from rpms of yum.postgresql.org), as well as on postgresql
> 9.4.1 from Ubuntu 15.04 repository on my  personal laptop.

It's crashing because it's trying to acquire the content_lock on a
local buffer, which of course doesn't have one.  This appears to have
been broken in 8fc23a9e.  Oddly, HEAD does not have the problem because
it looks like

    if ((mode == RBM_ZERO_AND_LOCK || mode == RBM_ZERO_AND_CLEANUP_LOCK) &&
        !isLocalBuf)
    {
        LWLockAcquire(bufHdr->content_lock, LW_EXCLUSIVE);
    }

but the back branches are missing the isLocalBuf bit.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Artem Ignatyev
Date:
Subject: 9.4.1 segfault while creating hash index on temporary table
Next
From: Heikki Linnakangas
Date:
Subject: Re: 9.4.1 segfault while creating hash index on temporary table