Re: segfaults / backend crashing - Mailing list pgsql-general

From Tom Lane
Subject Re: segfaults / backend crashing
Date
Msg-id 22823.1062525441@sss.pgh.pa.us
Whole thread Raw
In response to segfaults / backend crashing  (Jeffrey Melloy <jmelloy@visualdistortion.org>)
List pgsql-general
Jeffrey Melloy <jmelloy@visualdistortion.org> writes:
> I'm having a problem with the backend occasionally crashing.
> I have interfaces with the database in two different applications -- a
> web viewer using JDBC and an insertion routine written using the c
> libraries.  It makes fairly heavy use of the tsearch protocol.  (I
> haven't been able to figure out anything repetitious, it happens at
> different times, and after I get a new connection the exact search
> query or insertion string works fine).

That sounds suspiciously like a memory-stomp problem --- that is,
something is scribbling on RAM that doesn't belong to it, and at some
later point there's a crash because the code expects the original values
to be in that memory.  It's a good bet (but far from certain) that the
bug is in the tsearch module, since that's not been used as much as
the rest of the code.  I would not however put the blame on the exact
spot where you are seeing the crash.

I'd recommend rebuilding the backend with memory checking and asserts
enabled (configure --enable-cassert, and you might as well
--enable-debug too).  This might help catch the culprit sooner.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Table name lengths...
Next
From: "Jenny -"
Date:
Subject: identifying each individual tuple locked