Re: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC - Mailing list pgsql-general

From Tom Lane
Subject Re: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC
Date
Msg-id 25822.1232685766@sss.pgh.pa.us
Whole thread Raw
In response to Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC  (Nick Withers <nick@nickwithers.com>)
Responses Re: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC  (Nick Withers <nick@nickwithers.com>)
List pgsql-general
Nick Withers <nick@nickwithers.com> writes:
> I've been experiencing segfaults of PostgreSQL for quite a quite now
> (since July 2008, PostgreSQL 8.3.3, perhaps?) on a FreeBSD 7 PowerPC
> (7400) system (not sure if anyone really cares about this particular
> platform, but I'll try :-)):

Hmm, is this query accessing a temporary table?

> #0  0x0186a1ec in heap_page_prune_opt (relation=0x224c9f70, buffer=-1,
>     OldestXmin=28440) at pruneheap.c:79
> 79 if (!PageIsPrunable(dp, OldestXmin))
> [New Thread 0x22401100 (LWP 100093)]
> (gdb) bt full
> #0  0x0186a1ec in heap_page_prune_opt (relation=0x224c9f70, buffer=-1,
>     OldestXmin=28440) at pruneheap.c:79
> dp = 0x0
> minfree = 4294967295
> #1  0x0185f790 in heapgetpage (scan=0x22970d88, page=0) at heapam.c:216
> buffer = -1
> snapshot = 0x224af818
> dp = 0x20100 <Address 0x20100 out of bounds>
> lines = 184
> ntup = 28449656
> lineoff = 0
> lpp = 0x10003

Buffer -1 should refer to the first local buffer (ie, the first one used
for temp tables).  The value of dp seems to indicate that
LocalBufferBlockPointers[0] was zero, but that should certainly not be
possible if ReadBuffer returned the buffer as valid.  So I'm confused.
Can you extract a self-contained test case to reproduce this?

            regards, tom lane

pgsql-general by date:

Previous
From: Nick Withers
Date:
Subject: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC
Next
From: Nick Withers
Date:
Subject: Re: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC