Re: Failure on markhor with CLOBBER_CACHE_ALWAYS for test brin - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Failure on markhor with CLOBBER_CACHE_ALWAYS for test brin
Date
Msg-id 6347.1420038079@sss.pgh.pa.us
Whole thread Raw
In response to Re: Failure on markhor with CLOBBER_CACHE_ALWAYS for test brin  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Failure on markhor with CLOBBER_CACHE_ALWAYS for test brin  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-12-31 10:02:40 -0300, Alvaro Herrera wrote:
>> I can reproduce the crash in a CLOBBER_CACHE_ALWAYS build in
>> the object_address test.  The backtrace is pretty strange:

> Hard to say without more detail, but my guess is that the argument to
> get_collation_oid() isn't actually valid. For one, that'd explain the
> error, for another, the pointer's value (name=name@entry=0x11655c0) is
> suspiciously low.

Given that CLOBBER_CACHE_ALWAYS seems to make it fail reliably, the
obvious explanation is that what's being passed is a pointer into
catcache or relcache storage that isn't guaranteed to be valid for
long enough.  The given backtrace doesn't go down far enough to show
where the bogus input came from, but I'm betting that something is
returning to SQL a string it got from cache without pstrdup'ing it.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Additional role attributes && superuser review
Next
From: Fabien COELHO
Date:
Subject: Re: add modulo (%) operator to pgbench