Re: SIGSEGV taken on 8.1 during dump/reload

From: Robert Creager <Robert_Creager(at)LogicalChaos(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SIGSEGV taken on 8.1 during dump/reload
Date: 2005-11-08 14:43:50
Message-ID: 20051108074350.6e68379d@thunder.logicalchaos.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When grilled further on (Tue, 08 Nov 2005 09:20:13 -0500),
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> confessed:

> Robert Creager <Robert_Creager(at)LogicalChaos(dot)org> writes:
> > v->spl_right is address 0xbp - uninitialized?
>
> The whole struct looks pretty uninitialized, which immediately makes me
> wonder whether gdb has picked up a wrong value for "v". Try going down
> to a lower stack frame and seeing if you can access the struct from
> there.
>

Well, it's defined the next level up on the stack, and it's still garbage. The way I read gist.c and how it's calling gistUserPicksplit at line 1083, it's not initialized prior that else. So, FunctionCall2 in gistutil.c is supposed to fill it out? Presumably a function supplied by PGSphere in this case?

(gdb) up
#1 0x0807f249 in gistSplit (r=0x48df1e6c, buffer=93, itup=0x83b8e94, len=0xbfffcea4, dist=0xbfffcea0, giststate=0xbfffd120) at gist.c:1083
(gdb) print v
$1 = {spl_left = 0x83bcd98, spl_nleft = 8, spl_ldatum = 138138032, spl_lattr = {138089040, 1, 1075344513, 3221212168, 134843567, 0, 1076099872, 1076099872, 1076100896, 1076099944, 1076099872, 138072532, 136595410, 138072532, 127, 64, 138072596, 137900116, 138120544, 108, 8205, 1076099872, 1076097560, 1077067776, 1222874789, 2281761506, 1072462523, 8192, 1076979200, 1348122942, 3218058668, 3588489616}, spl_lattrsize = {1072628007, 1222999180, 0, -1073754968, 1222976259, -1073755008, 1079103008, 3871912, 1076979200, 8132, 32, 138120552, 58657919, 717016950, 1071875034, 1883413536, -1077677968, -817345387, 1072225709, 138043264, 138043264, 1222999180, 1222999180, -1073754936, 1222952809, 138120624, 1079103008, 138120624, 138120580, -1073754256, -1073754256, -1073754376}, spl_lisnull = "ÍD#\bàÌÿ¿\000\000\000\000(Íÿ¿0K;\b ×ÿ¿\000\000\000\000\000\000\000", spl_leftvalid = -92 '¤', spl_right = 0xdb, spl_nright = 138138076, spl_rdatum = 11, spl_rattr = {3463919764, 0, 0, 0, 0, 1, 3221212568, 138103264, 138089640, 434176, 0, 0, 1222856988, 1222843688, 1222829704, 138103264, 3, 1075321604, 0, 1073825468, 1076097560, 3221212576, 3221212540, 1075326465, 3221212576, 909186620, 825503793, 0, 138090070, 1076097560, 136751593, 3221212860}, spl_rattrsize = {-1073754484, 1075303286, -1073754720, 136751593, -1073754428, 138090044, 0, -1073754560, 136027536, 1079058352, 138120732, 32, 1079058312, 138090044, 138090062, 138090070, 226, 138089984, 0, 0, 0, 7904, 1024, 138120552, 138120852, 138120840, 908, -1073754600, 136599995, 138043264, 138120852, 908}, spl_risnull = "\200_:\b\000\034Q(at)\001\000\000\000XÎÿ¿¤Îÿ¿\001\000\000\000 Ñÿ¿\224\216;\b", spl_rightvalid = 108 'l', spl_idgrp = 0x83b921c, spl_ngrp = 0x83b8e08, spl_grpflag = 0x4 <Address 0x4 out of bounds>}
(gdb)

--
07:38:26 up 37 days, 13 min, 6 users, load average: 3.28, 3.42, 3.43
Linux 2.6.5-02 #8 SMP Mon Jul 12 21:34:44 MDT 2004

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-08 15:06:38 Re: SIGSEGV taken on 8.1 during dump/reload
Previous Message Andrew Dunstan 2005-11-08 14:43:28 Re: Supporting NULL elements in arrays