Re: old 7.2 bug? - Mailing list pgsql-general

From Tom Lane
Subject Re: old 7.2 bug?
Date
Msg-id 4744.1025990820@sss.pgh.pa.us
Whole thread Raw
In response to Re: old 7.2 bug?  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Responses Re: old 7.2 bug?  (Patrick Welche <prlw1@newn.cam.ac.uk>)
List pgsql-general
Patrick Welche <prlw1@newn.cam.ac.uk> writes:
> seems to suggest its a memory thing? It just happened to be one row too
> many?

But the query was only one row, no?  Seems unlikely that it ran out of
memory (especially if the core dump file is not large).

I suspect one of two possibilities:

1. Hardware glitch (cosmic ray flipped a bit in memory, or something).

2. Software bug caused a memory stomp on malloc's private data
   structures, leading to coredump in a later malloc call.

Malloc is frequently the first thing to fall over when you have the
kind of bug that writes a few more bytes than it's supposed to ---
because what it'll likely clobber is the header of the next malloc
block.

If you think #2 seems plausible then I suggest relinking your client
with a debugging malloc package to see what you can learn.  I've used
Electric Fence for this sort of problem once or twice, but perhaps
others have better suggestions (efence is pretty old).

            regards, tom lane



pgsql-general by date:

Previous
From: Patrick Welche
Date:
Subject: Re: old 7.2 bug?
Next
From: robert sanford
Date:
Subject: PostgreSQL Advocacy