Re: GiST: Bad newtup On Exit From gistSplit() ?

From: Itai Zukerman <zukerman(at)math-hat(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: GiST: Bad newtup On Exit From gistSplit() ?
Date: 2003-03-02 17:39:31
Message-ID: 8765r1zmzw.fsf@matt.w80.math-hat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> (gdb) p (*newtup)[0]
> $147 = {t_tid = {ip_blkid = {bi_hi = 0, bi_lo = 34}, ip_posid = 1}, t_info = 136}
> (gdb) p (*newtup)[1]
> $148 = {t_tid = {ip_blkid = {bi_hi = 65510, bi_lo = 65535}, ip_posid = 65535}, t_info = 24575}
> (gdb) p nlen
> $149 = 2
>
> (*newtup)[1] doesn't look right, correct?

Sorry, my fault, that should've been *(newtup[1]), which indeed looks
fine.

I'm still not having any luck tracking down my SEGV. If anyone is
interested in debugging or even just reproducing this, I'd be happy to
post or E-mail you my code. It looks like shortly after calling
gistSplit() there's maybe a double-free() somewhere? Here's a typical
session; the NOTICEs are generated by my picksplit function:

$ gdb ./postgres
(gdb) run -D /var/lib/postgres/data test <x

[... output as many tuples are inserted, and finally ...]

NOTICE: g_sig_picksplit: <--
NOTICE: g_sig_picksplit: left ( 9) *.*.***..*..**....*....*.***.**.*..*.*.****....*..**..**.....*****...***..*.*.*.***..*.**..**.*..*.**.*..**.***.*...*.**.**.......*......***....**......*.***.*......*.*..**....**.*..*..**.*..*.*.***.*.*.**.*....*.**..*...*..*.*****.*.*...*..*.*...*..**..*..***....***.*.*.*..*...**.......*....**.*.*.*..*.*..***.*.****.....*.....**..**...*.*....*..**..**.***...*......*..*....*.*.*.....*.*..*....**......****.*.***.*........***..*....*.*....**.*..***.*.*...*..**.*...*...*...*.......*.*.....**......*............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
NOTICE: g_sig_picksplit: right ( 50) .**..********************************************************.*.********.****************************************************************.********.***************************************.**********************************.********************.*.*************.********.****************************.***.**.*******************.*.************************************************.******************************.*****.*******************************************************************************.********............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Program received signal SIGSEGV, Segmentation fault.
0x4028e2ff in mallopt () from /lib/libc.so.6
(gdb) bt
#0 0x4028e2ff in mallopt () from /lib/libc.so.6
#1 0x4028d2ca in free () from /lib/libc.so.6
#2 0x081d05e5 in AllocSetDelete (context=0x82ae098) at aset.c:460
#3 0x081d0f03 in MemoryContextDelete (context=0x82ae098) at mcxt.c:188
#4 0x081d0f36 in MemoryContextDeleteChildren (context=0x82ae010) at mcxt.c:207
#5 0x081d0e8f in MemoryContextDelete (context=0x82ae010) at mcxt.c:161
#6 0x08094070 in AtCommit_Memory () at xact.c:685
#7 0x080943e6 in CommitTransaction () at xact.c:1033
#8 0x080946b6 in CommitTransactionCommand (forceCommit=0 '\0') at xact.c:1304
#9 0x08160966 in finish_xact_command (forceCommit=0 '\0') at postgres.c:978
#10 0x081607ef in pg_exec_query_string (query_string=0x82e4570, dest=Debug, parse_context=0x82adf88) at postgres.c:897
#11 0x081619f0 in PostgresMain (argc=4, argv=0x82960c0, username=0x82966c0 "postgres") at postgres.c:2013
#12 0x08110625 in main (argc=4, argv=0xbffffc14) at main.c:235

--
Itai Zukerman <http://www.math-hat.com/~zukerman/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-02 17:43:36 Re: System Tables and Triggers
Previous Message Itai Zukerman 2003-03-02 13:13:16 GiST: Bad newtup On Exit From gistSplit() ?