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

Поиск
Список
Период
Сортировка
От Nick Withers
Тема Re: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC
Дата
Msg-id 1232688829.1694.13.camel@localhost
обсуждение исходный текст
Ответ на Re: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, 2009-01-22 at 23:42 -0500, Tom Lane wrote:
> 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?

Couldn't tell you, I'm afraid... I'm not very knowledgeable here.

> > #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?

Don't know that I can (again, don't really know what I'm doing), but if
that's what's needed I'll have to have a crack...?

The segfault doesn't get triggered reliably on every backup or anything
like that. Sometimes there'll be no problem making relatively large
updates to the database, sometimes it'll fall over on small jobs. I'm
not aware of any pattern.

Would've been good if I reported this earlier, really, as I'm not too
sure when the problem started (it was fine for at least a year before
this). It could've been between 8.3.1 and 8.3.3, or even after a shift
from 8.1.10 (-ish) to 8.3.3. I can't remember what I was running when it
wasn't an issue... Sorry!

This is now on 8.3.5, by the way (of all the things to forget to
mention!).

>             regards, tom lane

Cheers Tom
--
Nick Withers
email: nick@nickwithers.com
Web: http://www.nickwithers.com
Mobile: +61 414 397 446

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Segmentation fault in backend/access/heap/pruneheap.c: heap_page_prune_opt() calling PageIsPrunable () with NULL page on FreeBSD / PowerPC
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: how to avoid that a postgres session eats up all the memory