Re: catalog corruption bug

From: Jeremy Drake <pgsql(at)jdrake(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: catalog corruption bug
Date: 2006-01-07 17:39:25
Message-ID: Pine.LNX.4.63.0601070930520.15097@garibaldi.apptechsys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 6 Jan 2006, Tom Lane wrote:

> OK, this must be a different issue then. I think we have seen reports
> like this one before, but not been able to reproduce it.
>
> Could you rebuild with Asserts enabled and see if any asserts trigger?

I got an assert to fail. I'm not entirely sure if this is helpful, but I
managed to get a core dump with --enable-debug and --enable-cassert (with
optimizations still on). Let me know if there is anything else that would
be useful to get out of this core file...

(gdb) bt
#0 0x00002aaaab8a0cf9 in kill () from /usr/lib64/libc.so.6
#1 0x00002aaaab8a0a3d in raise () from /usr/lib64/libc.so.6
#2 0x00002aaaab8a1c82 in abort () from /usr/lib64/libc.so.6
#3 0x00000000005f9838 in ExceptionalCondition (
conditionName=0x1abc <Address 0x1abc out of bounds>,
errorType=0x6 <Address 0x6 out of bounds>, fileName=0x0,
lineNumber=-1)
at assert.c:51
#4 0x00000000005eec5d in AtEOXact_CatCache (isCommit=-68 '')
at catcache.c:575
#5 0x000000000047464f in CommitTransaction () at xact.c:1573
#6 0x0000000000474d07 in CommitTransactionCommand () at xact.c:2184
#7 0x00000000005581da in AutoVacMain (argc=6844, argv=0x6) at
autovacuum.c:688
#8 0x0000000000558907 in autovac_start () at autovacuum.c:170
#9 0x000000000055e66b in ServerLoop () at postmaster.c:1269
#10 0x000000000055f9b9 in PostmasterMain (argc=3, argv=0x8832e0)
at postmaster.c:943
#11 0x000000000051fb43 in main (argc=3, argv=0x8832e0) at main.c:256
(gdb) frame 4
#4 0x00000000005eec5d in AtEOXact_CatCache (isCommit=-68 '')
at catcache.c:575
575 Assert(!ct->dead);
(gdb) l
570 {
571 CatCTup *ct = (CatCTup *) DLE_VAL(elt);
572
573 Assert(ct->ct_magic == CT_MAGIC);
574 Assert(ct->refcount == 0);
575 Assert(!ct->dead);
576 }
577 }
578 #endif
579 }
(gdb) set print pretty
(gdb) p *ct
$1 = {
ct_magic = 1462113538,
my_cache = 0x2aaaaaac3060,
lrulist_elem = {
dle_next = 0x0,
dle_prev = 0x939ab0,
dle_val = 0x2aaaaab19e18,
dle_list = 0x93b1a8
},
cache_elem = {
dle_next = 0x0,
dle_prev = 0x934b58,
dle_val = 0x2aaaaab19e18,
dle_list = 0x2aaaaaac36c8
},
c_list = 0x0,
refcount = 0,
dead = 1 '\001',
negative = 0 '\0',
hash_value = 15438,
tuple = {
t_len = 48,
t_self = {
ip_blkid = {
bi_hi = 0,
bi_lo = 0
},
ip_posid = 70
},
t_tableOid = 2602,
t_datamcxt = 0x914998,
t_data = 0x2aaaaab19f30
}
}

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-01-07 17:50:23 Re: CIDR/INET improvements
Previous Message Greg Stark 2006-01-07 17:12:08 Re: Warm-up cache may have its virtue