Skip site navigation (1) Skip section navigation (2)

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

From: Teodor Sigaev <teodor(at)stack(dot)net>
To: Itai Zukerman <zukerman(at)math-hat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: GiST: Bad newtup On Exit From gistSplit() ?
Date: 2003-03-03 09:57:51
Message-ID: 3E63271F.9000700@stack.net (view raw or flat)
Thread:
Lists: pgsql-hackers
Send me 'x' file and I'll try to help you.

Itai Zukerman wrote:
>>  (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
> 

-- 
Teodor Sigaev
teodor(at)stack(dot)net



In response to

pgsql-hackers by date

Next:From: Olivier PRENANTDate: 2003-03-03 12:39:44
Subject: Strange crash with pg_dump
Previous:From: Teodor SigaevDate: 2003-03-03 09:51:12
Subject: Re: GIST_LEAF vs. leaf_key; gist?entryinit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group