Re: [GENERAL] contrib module intagg crashing the backend

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [GENERAL] contrib module intagg crashing the backend
Date: 2005-03-23 03:55:07
Message-ID: 20050323035507.GA24549@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

On Tue, Mar 22, 2005 at 05:21:32PM -0800, Ron Mayer wrote:
>
> If one of the contrib modules (int_array_aggregate in contrib/intagg) is
> crashing my backend, where's a good place to report a bug or get hints
> where to look further?

Bug reports should go to the pgsql-bugs mailing list (I've cc'd it
on this message). Searching the list archives for similar problems
can be helpful.

If the backend crashed then there might be a core dump somewhere
under the $PGDATA directory. Using a debugger like gdb to get a
stack trace from the core dump can help pinpoint the problem.

> It seems to work fine on small arrays, but crashes on large ones.
> The second query would have put about 500 rows in the aggregate.

I can duplicate the crash in 8.0.1 (REL8_0_STABLE) with the following
(512 works, 513 crashes):

CREATE TABLE foo (id integer, name text);
INSERT INTO foo (id, name)
SELECT x, 'test' FROM generate_series(1, 513) AS g(x);
SELECT name, int_array_aggregate(id) FROM foo GROUP BY name;

Here's a partial stack trace:

#0 0x81e003b in pfree (pointer=0x839f130) at mcxt.c:583
#1 0x810d044 in advance_transition_function (aggstate=0x839d188, peraggstate=0x839d908,
pergroupstate=0x83a1aa0, newVal=513, isNull=0 '\000') at nodeAgg.c:395
#2 0x810d0f4 in advance_aggregates (aggstate=0x839d188, pergroup=0x83a1aa0) at nodeAgg.c:439
#3 0x810d782 in agg_fill_hash_table (aggstate=0x839d188) at nodeAgg.c:935
#4 0x810d448 in ExecAgg (node=0x839d188) at nodeAgg.c:674

Line 583 in mcxt.c is:

(*header->context->methods->free_p) (header->context, pointer);

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-03-23 05:10:20 Re: [GENERAL] contrib module intagg crashing the backend
Previous Message Michael Fuhr 2005-03-23 03:07:13 Re: BUG #1547: CREATE TYPE AS error

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-03-23 04:23:15 Re: checkpoint_timeout
Previous Message Tom Lane 2005-03-23 03:49:49 Re: checkpoint_timeout