Re: memory corruption bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alan Stange <stange(at)rentec(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: memory corruption bug
Date: 2004-04-05 19:16:53
Message-ID: 14454.1081192613@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alan Stange <stange(at)rentec(dot)com> writes:
> There's memory corruption occuring causing the malloc routines to
> SIGBUS.
> ...
> Sadly, we have no reproducible test case right now.

Without a test case there's not much we can do :-(. The backtrace you
show is during client query collection, which is a quite well-tested
code path and hardly likely to contain such errors, so I would venture
that the memory clobber occurred previously. Meaning that this trace
gives no useful data about where it is.

Some versions of Solaris are known to contain a broken vsnprintf()
library routine that can result in memory clobbers. I don't recall
which versions exactly, but I think it was only in 64-bit builds;
is yours 64-bit? Anyway you might try undef'ing HAVE_VSNPRINTF and
HAVE_SNPRINTF in src/include/pg_config.h after configure (to force
use of our own emulations of those routines) to see if that helps.
Also try scanning the pgsql-bugs archives for other mentions of Solaris
to see if there are other such issues ...

> Typically one would use a tool like purify, bcheck, etc., to find the
> offending code.

Without being able to duplicate the crash, it's unlikely anyone else
could find the problem. We haven't heard similar reports, so this is
either a platform-specific issue or a consequence of some corner case
that you are exercising and other people aren't. Either way, the most
likely way to learn something from Purify is for you to run it ...

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2004-04-06 00:00:07 Re: bug in 7.4.2, with Handling of Double Quotation Marks
Previous Message Lamar Owen 2004-04-05 18:50:10 Re: Problem starting postgresql !!