Re: PLTCL return_null crash...

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PLTCL return_null crash...
Date: 2002-10-08 01:01:08
Message-ID: Pine.LNX.4.21.0210080147090.3248-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 7 Oct 2002, Tom Lane wrote:

> "Ian Harding" <ianh(at)tpchd(dot)org> writes:
> > test=# create function crash () returns int as '
> > test'# return_null
> > test'# ' language 'pltcl';
> > CREATE
> > test=# select crash();
> > ERROR: AllocSetFree: cannot find block containing chunk 0xbfbfcc48
> > test=#
>
> Hmm. WorksForMe (on both 7.2.3 and CVS tip) ...
>
> regression=# select crash();
> crash
> -------
>
> (1 row)
>
> regression=# select crash() is null;
> ?column?
> ----------
> t
> (1 row)
>
> regression=#
>
>
> A stack backtrace from the elog() call might prove enlightening.

Here's one from my system.

Program received signal SIGSEGV, Segmentation fault.
0x8156df7 in pfree ()
(gdb) bt
#0 0x8156df7 in pfree ()
#1 0x4001611c in ?? () from /usr/local/stow/pgsql-7.2.1/lib/pltcl.so
#2 0x40015c37 in ?? () from /usr/local/stow/pgsql-7.2.1/lib/pltcl.so
#3 0x80c4d1d in ExecMakeFunctionResult ()
#4 0x80c4dda in ExecEvalFunc ()
#5 0x80c5310 in ExecEvalExpr ()
#6 0x80c55e9 in ExecTargetList ()
#7 0x80c587b in ExecProject ()
#8 0x80cb073 in ExecResult ()
#9 0x80c3d79 in ExecProcNode ()
#10 0x80c2d5e in ExecutePlan ()
#11 0x80c23f7 in ExecutorRun ()
#12 0x810f935 in ProcessQuery ()
#13 0x810e1e0 in pg_exec_query_string ()
#14 0x810f1be in PostgresMain ()
#15 0x80f631e in DoBackend ()
#16 0x80f5c6f in BackendStartup ()
#17 0x80f4e8c in ServerLoop ()
#18 0x80f4a0b in PostmasterMain ()
#19 0x80d44a5 in main ()
#20 0x400e6a42 in __libc_start_main () from /lib/libc.so.6
(gdb)

So we can see it's in pltcl but without debugging turned on it's a little
difficult to tell where.

Presumably the fault was removed between 1.48 and 1.49 of src/pl/tcl/pltcl.c

--
Nigel J. Andrews

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-10-08 03:00:37 Re: PLTCL return_null crash...
Previous Message Thomas O'Dowd 2002-10-08 00:54:35 Re: why isn't index used?