Debugging help...

Randy Wigginton krw at nobugz.com
Mon Jan 29 17:31:52 UTC 2007


Hey all,
I've added some custom extensions to my version of memcache.  It runs  
great anywhere from several days to a week, then eventually dumps  
core.  I've got a good core file, so I'm trying to figure out what is  
going wrong.  The stack trace (below my changes) looks like this:
#0  0x0804de36 in item_unlink_q (it=0xb7b6dc68) at items.c:184
184         if (it->next) it->next->prev = it->prev;
(gdb) where
#0  0x0804de36 in item_unlink_q (it=0xb7b6dc68) at items.c:184
#1  0x0804df2d in item_unlink (it=0xb7b6dc68) at items.c:212
#2  0x080496ac in get_item_notedeleted (key=0xbfd4b686  
"TXN00:qws36#QWS-ESPN", nkey=20, delete_locked=0x0)
     at memcached.c:156
#3  0x080496d3 in get_item (key=0xbfd4b686 "TXN00:qws36#QWS-ESPN",  
nkey=20) at memcached.c:163


looking at the item, *it :
(gdb) p it
$1 = (item *) 0xb7b6dc68
(gdb) p *it
$6 = {next = 0x363833, prev = 0xb7b555c8, h_next = 0x0, time =  
132900, exptime = 137400, nbytes = 88,
   refcount = 0, nsuffix = 7 '\a', it_flags = 0 '\0', slabs_clsid = 4  
'\004', nkey = 20 '\024',
   end = 0xb7b6dc88}


Clearly the it->next pointer has been trashed.  Memcache pros, any  
hints on how to track this down?


More information about the memcached mailing list