Re: Recent SIGSEGV failures in buildfarm HEAD

Lists: pgsql-hackerspgsql-patches
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-26 16:25:41
Message-ID: 16720.1167150341@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Several of the buildfarm machines are exhibiting repeatable signal 11
crashes in what seem perfectly ordinary queries. This started about
four days ago so I suppose it's got something to do with my
operator-families patch :-( ... but I dunno what, and none of my own
machines show the failure. Can someone provide a stack trace?

regards, tom lane


From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-28 13:41:57
Message-ID: 4593C9A5.3050401@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Several of the buildfarm machines are exhibiting repeatable signal 11
> crashes in what seem perfectly ordinary queries. This started about
> four days ago so I suppose it's got something to do with my
> operator-families patch :-( ... but I dunno what, and none of my own
> machines show the failure. Can someone provide a stack trace?

no stack trace yet however impala at least seems to be running out of
memory (!) with 380MB of RAM and some 800MB of swap(and no other tasks)
during the regression run. Maybe something is causing a dramatic
increase in memory usage that is causing the random failures (in impalas
case the OOM-killer actually decides to terminate the postmaster) ?

Stefan


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-28 15:24:54
Message-ID: 7154.1167319494@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
> Tom Lane wrote:
>> Several of the buildfarm machines are exhibiting repeatable signal 11
>> crashes in what seem perfectly ordinary queries.

> no stack trace yet however impala at least seems to be running out of
> memory (!) with 380MB of RAM and some 800MB of swap(and no other tasks)
> during the regression run. Maybe something is causing a dramatic
> increase in memory usage that is causing the random failures (in impalas
> case the OOM-killer actually decides to terminate the postmaster) ?

No, most all the failures I've looked at are sig11 not sig9.

It is interesting that the failures are not as consistent as I first
thought --- the machines that are showing failures actually fail maybe
one time in two.

regards, tom lane


From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-28 18:17:10
Message-ID: 45940A26.5060900@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
>> Tom Lane wrote:
>>> Several of the buildfarm machines are exhibiting repeatable signal 11
>>> crashes in what seem perfectly ordinary queries.
>
>> no stack trace yet however impala at least seems to be running out of
>> memory (!) with 380MB of RAM and some 800MB of swap(and no other tasks)
>> during the regression run. Maybe something is causing a dramatic
>> increase in memory usage that is causing the random failures (in impalas
>> case the OOM-killer actually decides to terminate the postmaster) ?
>
> No, most all the failures I've looked at are sig11 not sig9.

hmm - still weird and I would not actually consider impala a resource
starved box (especially when compared to other buildfarm-members) so
there seems to be something strange going on.
I have changed the overcommit settings on that box for now - let's see
what the result of that will be.

>
> It is interesting that the failures are not as consistent as I first
> thought --- the machines that are showing failures actually fail maybe
> one time in two.

or some even less - dove seems to be one of the affected boxes too - I
increased the build frequency since yesterday but it has not yet failed
again ...

Stefan


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-28 18:36:00
Message-ID: 21637.1167330960@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
> Tom Lane wrote:
>> Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
>>> ... Maybe something is causing a dramatic
>>> increase in memory usage that is causing the random failures (in impalas
>>> case the OOM-killer actually decides to terminate the postmaster) ?
>>
>> No, most all the failures I've looked at are sig11 not sig9.

> hmm - still weird and I would not actually consider impala a resource
> starved box (especially when compared to other buildfarm-members) so
> there seems to be something strange going on.

Actually ... one way that a "memory overconsumption" bug could manifest
as sig11 would be if it's a runaway-recursion issue: usually you get sig11
when the machine's stack size limit is exceeded. This doesn't put us
any closer to localizing the problem, but at least it's a guess about
the cause?

I wonder whether there's any way to get the buildfarm script to report a
stack trace automatically if it finds a core file left behind in the
$PGDATA directory after running the tests. Would something like this
be adequately portable?

if [ -f $PGDATA/core* ]
then
echo bt | gdb $installdir/bin/postgres $PGDATA/core*
fi

Obviously it'd fail if no gdb available, but that seems pretty harmless.
The other thing that we'd likely need is an explicit "ulimit -c
unlimited" for machines where core dumps are off by default.

regards, tom lane


From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-28 21:02:22
Message-ID: 459430DE.5080801@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
>> Tom Lane wrote:
>>> Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
>>>> ... Maybe something is causing a dramatic
>>>> increase in memory usage that is causing the random failures (in impalas
>>>> case the OOM-killer actually decides to terminate the postmaster) ?
>>> No, most all the failures I've looked at are sig11 not sig9.
>
>> hmm - still weird and I would not actually consider impala a resource
>> starved box (especially when compared to other buildfarm-members) so
>> there seems to be something strange going on.
>
> Actually ... one way that a "memory overconsumption" bug could manifest
> as sig11 would be if it's a runaway-recursion issue: usually you get sig11
> when the machine's stack size limit is exceeded. This doesn't put us
> any closer to localizing the problem, but at least it's a guess about
> the cause?

that sounds like a possibility though I'm not too optimistic this is
indeed the cause of the problem we see.

>
> I wonder whether there's any way to get the buildfarm script to report a
> stack trace automatically if it finds a core file left behind in the
> $PGDATA directory after running the tests. Would something like this
> be adequately portable?
>
> if [ -f $PGDATA/core* ]
> then
> echo bt | gdb $installdir/bin/postgres $PGDATA/core*
> fi

hmmm - not sure I like that that much

>
> Obviously it'd fail if no gdb available, but that seems pretty harmless.
> The other thing that we'd likely need is an explicit "ulimit -c
> unlimited" for machines where core dumps are off by default.

there are other issues with that - gdb might be available but not
actually producing reliable results on certain platforms (some
commercial unixes,windows).

The thing we might might want to do is the buildfarm script overriding
keep_error_builds=0 conditionally in some cases (like detecting a core).

That way we will at least have a useful buildtree for later
examination(which would be removed even if we get a one-time stacktrace
and keep_error_builds is disabled)

Stefan


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-28 22:15:25
Message-ID: 20061228221525.GB6921@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

> Actually ... one way that a "memory overconsumption" bug could manifest
> as sig11 would be if it's a runaway-recursion issue: usually you get sig11
> when the machine's stack size limit is exceeded. This doesn't put us
> any closer to localizing the problem, but at least it's a guess about
> the cause?
>
> I wonder whether there's any way to get the buildfarm script to report a
> stack trace automatically if it finds a core file left behind in the
> $PGDATA directory after running the tests. Would something like this
> be adequately portable?
>
> if [ -f $PGDATA/core* ]
> then
> echo bt | gdb $installdir/bin/postgres $PGDATA/core*
> fi

gdb has a "batch mode" which can be useful:

if [ -f $PGDATA/core* ]
then
gdb -ex "bt" --batch $installdir/bin/postgres $PGDATA/core*
fi

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-28 23:01:03
Message-ID: 45944CAF.5070401@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera wrote:
> Tom Lane wrote:
>
>
>>
>> I wonder whether there's any way to get the buildfarm script to report a
>> stack trace automatically if it finds a core file left behind in the
>> $PGDATA directory after running the tests. Would something like this
>> be adequately portable?
>>
>> if [ -f $PGDATA/core* ]
>> then
>> echo bt | gdb $installdir/bin/postgres $PGDATA/core*
>> fi
>>
>
> gdb has a "batch mode" which can be useful:
>
> if [ -f $PGDATA/core* ]
> then
> gdb -ex "bt" --batch $installdir/bin/postgres $PGDATA/core*
> fi
>
>

here's a quick untested patch for buildfarm that Stefan might like to try.

cheers

andrew

Attachment Content-Type Size
btpatch text/plain 1.9 KB

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 03:14:41
Message-ID: 20061229031441.GD29576@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:

> here's a quick untested patch for buildfarm that Stefan might like to try.

Note that not all core files are named "core". On some Linux distros,
it's configured to be "core.PID" by default. And you can even change it
to weirder names, but I haven't seen those anywhere by default, so I
guess supporting just the common ones is appropiate.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 03:28:28
Message-ID: 27597.1167362908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Andrew Dunstan wrote:
>> here's a quick untested patch for buildfarm that Stefan might like to try.

> Note that not all core files are named "core". On some Linux distros,
> it's configured to be "core.PID" by default.

And on some platforms, cores don't drop in the current working directory
... but until we have a problem that *only* manifests on such a
platform, I wouldn't worry about that. We do need to look for 'core*'
not just 'core', though.

Don't forget the ulimit point either ... on most Linuxen there won't be
any core at all without twiddling ulimit.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 16:02:53
Message-ID: 45953C2D.2000806@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>
>> Andrew Dunstan wrote:
>>
>>> here's a quick untested patch for buildfarm that Stefan might like to try.
>>>
>
>
>> Note that not all core files are named "core". On some Linux distros,
>> it's configured to be "core.PID" by default.
>>
>
> And on some platforms, cores don't drop in the current working directory
> ... but until we have a problem that *only* manifests on such a
> platform, I wouldn't worry about that. We do need to look for 'core*'
> not just 'core', though.
>

That part is easy enough. And if people mangle their core location I am
certainly not going to go looking for it.
> Don't forget the ulimit point either ... on most Linuxen there won't be
> any core at all without twiddling ulimit.
>
>
>

Yeah. Perl actually doesn't have a core call for this. I have built some
code (see attached revised patch) to try to do it using a widespread but
non-standard module called BSD::Resource, but if the module is missing
it won't fail.

I'm actually wondering if unlimiting core might not be a useful switch
to provide on pg_ctl, as long as the platform has setrlimit().

cheers

andrew

Attachment Content-Type Size
btpatch text/plain 2.6 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 16:17:49
Message-ID: 2878.1167409069@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I'm actually wondering if unlimiting core might not be a useful switch
> to provide on pg_ctl, as long as the platform has setrlimit().

Not a bad thought; that's actually one of the reasons that I still
usually use a handmade script rather than pg_ctl for launching
postmasters ...

regards, tom lane


From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 17:32:44
Message-ID: 4595513C.9010704@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> I'm actually wondering if unlimiting core might not be a useful switch
>> to provide on pg_ctl, as long as the platform has setrlimit().
>
> Not a bad thought; that's actually one of the reasons that I still
> usually use a handmade script rather than pg_ctl for launching
> postmasters ...

this sounds like a good idea for me too - it seems like a cleaner and
more useful thing on a general base then just doing it in the buildfarm
code ...

Stefan


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 21:20:51
Message-ID: 459586B3.8090309@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Stefan Kaltenbrunner wrote:
> Tom Lane wrote:
>
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>
>>> I'm actually wondering if unlimiting core might not be a useful switch
>>> to provide on pg_ctl, as long as the platform has setrlimit().
>>>
>> Not a bad thought; that's actually one of the reasons that I still
>> usually use a handmade script rather than pg_ctl for launching
>> postmasters ...
>>
>
> this sounds like a good idea for me too - it seems like a cleaner and
> more useful thing on a general base then just doing it in the buildfarm
> code ...
>
>
>

Draft patch attached. However, there will be some more work to do. For
one thing, pg_regress does not use pg_ctl to start its temp install
postmaster, so either we'll need to train it the same way or get it to
use pg_ctl. And then we'd need to change the regression makefile to use
the option, based on an environment variable a bit like MAX_CONNEXCTIONS
maybe.

cheers

andrew

Attachment Content-Type Size
ctlpatch text/plain 3.4 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 21:44:39
Message-ID: 17831.1167428679@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> ... And then we'd need to change the regression makefile to use
> the option, based on an environment variable a bit like MAX_CONNEXCTIONS
> maybe.

Why wouldn't we just use it always? If a regression test dumps core,
that's going to deserve investigation.

regards, tom lane


From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-29 23:08:56
Message-ID: 4595A008.4000204@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> ... And then we'd need to change the regression makefile to use
>> the option, based on an environment variable a bit like MAX_CONNEXCTIONS
>> maybe.
>
> Why wouldn't we just use it always? If a regression test dumps core,
> that's going to deserve investigation.

enabling it always for the regression tests probably makes sense - but
there is also the possibility that such a core can get very large and
potentially run the partitition the regression test runs on out of space.

Stefan


From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: "Stefan Kaltenbrunner" <stefan(at)kaltenbrunner(dot)cc>
Cc: "List pgsql-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-30 21:54:45
Message-ID: 1393.24.211.165.134.1167515685.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Stefan Kaltenbrunner wrote:
> Tom Lane wrote:
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> ... And then we'd need to change the regression makefile to use
>>> the option, based on an environment variable a bit like
>>> MAX_CONNEXCTIONS
>>> maybe.
>>
>> Why wouldn't we just use it always? If a regression test dumps core,
>> that's going to deserve investigation.
>
> enabling it always for the regression tests probably makes sense - but
> there is also the possibility that such a core can get very large and
> potentially run the partitition the regression test runs on out of space.
>
>

I think Tom is right. You can always set the hard limit before calling
"make check" or running the buildfarm script. I'll prepare a patch to use
similar code unconditionally in pg_regress.

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seneca Cunningham <tentra(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-31 05:29:32
Message-ID: 27035.1167542972@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Seneca Cunningham <tentra(at)gmail(dot)com> writes:
> I don't have a core, but here's the CrashReporter output for both
> of jackal's failed runs:

Wow, some actual data, rather than just noodling about how to get it ...
thanks!

> ...
> 11 postgres 0x0022b2e3 RelationIdGetRelation + 110 (relcache.c:1496)
> 12 postgres 0x00020868 relation_open + 84 (heapam.c:697)
> 13 postgres 0x0002aab9 index_open + 32 (indexam.c:140)
> 14 postgres 0x0002a9d4 systable_beginscan + 289 (genam.c:184)
> 15 postgres 0x002279e4 RelationInitIndexAccessInfo + 1645 (relcache.c:1200)
> 16 postgres 0x0022926a RelationBuildDesc + 3527 (relcache.c:866)
> 17 postgres 0x0022b2e3 RelationIdGetRelation + 110 (relcache.c:1496)
> 18 postgres 0x00020868 relation_open + 84 (heapam.c:697)
> 19 postgres 0x0002aab9 index_open + 32 (indexam.c:140)
> 20 postgres 0x0002a9d4 systable_beginscan + 289 (genam.c:184)
> 21 postgres 0x002279e4 RelationInitIndexAccessInfo + 1645 (relcache.c:1200)
> 22 postgres 0x0022926a RelationBuildDesc + 3527 (relcache.c:866)
> 23 postgres 0x0022b2e3 RelationIdGetRelation + 110 (relcache.c:1496)
> ...

What you seem to have here is infinite recursion during relcache
initialization. That's surely not hard to believe, considering I just
whacked that code around, and indeed changed some of the tests that are
intended to prevent such recursion. But what I don't understand is why
it'd be platform-specific, much less not perfectly repeatable on the
platforms where it does manifest. Anyone have a clue?

regards, tom lane


From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Seneca Cunningham <tentra(at)gmail(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-31 16:43:45
Message-ID: 4597E8C1.8000001@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Seneca Cunningham <tentra(at)gmail(dot)com> writes:
>> I don't have a core, but here's the CrashReporter output for both
>> of jackal's failed runs:
>
> Wow, some actual data, rather than just noodling about how to get it ...
> thanks!
>
>> ...
>> 11 postgres 0x0022b2e3 RelationIdGetRelation + 110 (relcache.c:1496)
>> 12 postgres 0x00020868 relation_open + 84 (heapam.c:697)
>> 13 postgres 0x0002aab9 index_open + 32 (indexam.c:140)
>> 14 postgres 0x0002a9d4 systable_beginscan + 289 (genam.c:184)
>> 15 postgres 0x002279e4 RelationInitIndexAccessInfo + 1645 (relcache.c:1200)
>> 16 postgres 0x0022926a RelationBuildDesc + 3527 (relcache.c:866)
>> 17 postgres 0x0022b2e3 RelationIdGetRelation + 110 (relcache.c:1496)
>> 18 postgres 0x00020868 relation_open + 84 (heapam.c:697)
>> 19 postgres 0x0002aab9 index_open + 32 (indexam.c:140)
>> 20 postgres 0x0002a9d4 systable_beginscan + 289 (genam.c:184)
>> 21 postgres 0x002279e4 RelationInitIndexAccessInfo + 1645 (relcache.c:1200)
>> 22 postgres 0x0022926a RelationBuildDesc + 3527 (relcache.c:866)
>> 23 postgres 0x0022b2e3 RelationIdGetRelation + 110 (relcache.c:1496)
>> ...
>
> What you seem to have here is infinite recursion during relcache
> initialization. That's surely not hard to believe, considering I just
> whacked that code around, and indeed changed some of the tests that are
> intended to prevent such recursion. But what I don't understand is why
> it'd be platform-specific, much less not perfectly repeatable on the
> platforms where it does manifest. Anyone have a clue?

fwiw - I can trigger that issue now pretty reliably on a fast Opteron
box (running Debian Sarge/AMD64) with make regress in a loop - I seem to
be able to trigger it in about 20-25% of the runs.
the resulting core however looks totally stack corrupted and not really
usable :-(

Stefan


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Seneca Cunningham <tentra(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-31 17:41:48
Message-ID: 4356.1167586908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
> fwiw - I can trigger that issue now pretty reliably on a fast Opteron
> box (running Debian Sarge/AMD64) with make regress in a loop - I seem to
> be able to trigger it in about 20-25% of the runs.
> the resulting core however looks totally stack corrupted and not really
> usable :-(

Hmm, probably the stack overrun leaves the call stack too corrupt for
gdb to make sense of. Try inserting "check_stack_depth();" into one
of the functions that're part of the infinite recursion, and then make
check_stack_depth() do an abort() instead of just elog(ERROR). That
might give you a core that gdb can work with.

I'm still having absolutely 0 success reproducing it on a dual Xeon
... so it's not just the architecture that's the issue. Some kind of
timing problem? That's hard to believe too.

regards, tom lane


From: Seneca Cunningham <tentra(at)gmail(dot)com>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Recent SIGSEGV failures in buildfarm HEAD
Date: 2006-12-31 17:48:38
Message-ID: 20061231174838.GJ2872@herodotus.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Sun, Dec 31, 2006 at 05:43:45PM +0100, Stefan Kaltenbrunner wrote:
> Tom Lane wrote:
> > What you seem to have here is infinite recursion during relcache
> > initialization. That's surely not hard to believe, considering I just
> > whacked that code around, and indeed changed some of the tests that are
> > intended to prevent such recursion. But what I don't understand is why
> > it'd be platform-specific, much less not perfectly repeatable on the
> > platforms where it does manifest. Anyone have a clue?
>
> fwiw - I can trigger that issue now pretty reliably on a fast Opteron
> box (running Debian Sarge/AMD64) with make regress in a loop - I seem to
> be able to trigger it in about 20-25% of the runs.
> the resulting core however looks totally stack corrupted and not really
> usable :-(

By reducing the stack size on jackal from the default of 8MB to 3MB, I
can get this to trigger in roughly 30% of the runs while preserving the
passed tests in the other parallel groups.

--
Seneca
tentra(at)gmail(dot)com


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Recent SIGSEGV failures in buildfarm HEAD
Date: 2007-01-02 20:54:59
Message-ID: 459AC6A3.2000202@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>> ... And then we'd need to change the regression makefile to use
>> the option, based on an environment variable a bit like MAX_CONNEXCTIONS
>> maybe.
>>
>
> Why wouldn't we just use it always? If a regression test dumps core,
> that's going to deserve investigation.
>
>
>

Revised patch attached, doing just this. I will apply it soon unless
there are objections.

cheers

andrew

Attachment Content-Type Size
corepatch text/plain 6.2 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Recent SIGSEGV failures in buildfarm HEAD
Date: 2007-01-02 21:11:37
Message-ID: 16170.1167772297@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Revised patch attached, doing just this. I will apply it soon unless
> there are objections.

Probably a good idea to check defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE),
rather than naively assuming every getrlimit implementation supports
that particular setting. Also, should the -c option exist but just not
do anything if the platform doesn't support it? As is, you're making it
impossible to just specify -c without worrying if it does anything.

The documentation fails to list the long form of the switch
(--corefiles, which should probably really be --core-files for consistency).
There's a typo in this message, too:

+ _("%s: cannot set core size,: disallowed by hard limit.\n"),

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Recent SIGSEGV failures in buildfarm HEAD
Date: 2007-01-02 21:16:42
Message-ID: 459ACBBA.5020801@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>> Revised patch attached, doing just this. I will apply it soon unless
>> there are objections.
>>
>
> Probably a good idea to check defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE),
> rather than naively assuming every getrlimit implementation supports
> that particular setting. Also, should the -c option exist but just not
> do anything if the platform doesn't support it? As is, you're making it
> impossible to just specify -c without worrying if it does anything.
>
> The documentation fails to list the long form of the switch
> (--corefiles, which should probably really be --core-files for consistency).
> There's a typo in this message, too:
>
> + _("%s: cannot set core size,: disallowed by hard limit.\n"),
>
>
>

OK, I'll fix all this. Thanks.

cheers

andrew