[Gluster-devel] zero'ed local data in mdc_setattr_cbk

Emmanuel Dreyfus manu at netbsd.org
Mon May 21 04:51:59 UTC 2012


Hi

Here is a backtrace for a SIGSEGV in md-cache code. Note inode = NULL
when mdc_inode_iatt_set() is called by mdc_setattr_cbk(). It seems that
local got corupted in the later function

#0  0xbbb3a7c9 in pthread_spin_lock () from /usr/lib/libpthread.so.1
#1  0xbaa09d8c in mdc_inode_prep (this=0xba3e5000, inode=0x0) at
md-cache.c:267
#2  0xbaa0a1bf in mdc_inode_iatt_set (this=0xba3e5000, inode=0x0, 
    iatt=0xb9401d40) at md-cache.c:384
#3  0xbaa0ee16 in mdc_setattr_cbk (frame=0xbb77f400, cookie=0xbb77f470,
    this=0xba3e5000, op_ret=0, op_errno=0, prebuf=0xb9401cd8, 
    postbuf=0xb9401d40, xdata=0x0) at md-cache.c:1423
#4  0xbaa1d0ec in qr_fsetattr_cbk ()
   from /usr/local/lib/glusterfs/3.3git/xlator/performance/quick-read.so
#5  0xbbb8ac72 in default_fsetattr_cbk (frame=0xbb77f0f0,
cookie=0xbb77f160, 
    this=0xba3e3000, op_ret=0, op_errno=0, statpre=0xb9401cd8, 
    statpost=0xb9401d40, xdata=0x0) at defaults.c:452
#6  0xbbb8ac72 in default_fsetattr_cbk (frame=0xbb77f160,
cookie=0xbb77f1d0, 
    this=0xba3e2000, op_ret=0, op_errno=0, statpre=0xb9401cd8, 
    statpost=0xb9401d40, xdata=0x0) at defaults.c:452
#7  0xbbb8ac72 in default_fsetattr_cbk (frame=0xbb77f1d0,
cookie=0xbb77f240, 
    this=0xba3e1000, op_ret=0, op_errno=0, statpre=0xb9401cd8, 
    statpost=0xb9401d40, xdata=0x0) at defaults.c:452
#8  0xb9aa9d23 in afr_fsetattr_unwind (frame=0xba801ee8,
this=0xba3d1000)
    at afr-inode-write.c:1160
#9  0xb9aa9f01 in afr_fsetattr_wind_cbk (frame=0xba801ee8, cookie=0x0, 
    this=0xba3d1000, op_ret=0, op_errno=0, preop=0xbfbfe880, 
    postop=0xbfbfe818, xdata=0x0) at afr-inode-write.c:1221
#10 0xbaa6a099 in client3_1_fsetattr_cbk (req=0xb90010d8,
iov=0xb90010f8, 
    count=1, myframe=0xbb77f010) at client3_1-fops.c:1897
#11 0xbbb6975e in rpc_clnt_handle_reply (clnt=0xba3c5270,
pollin=0xbb77d220)
    at rpc-clnt.c:788
#12 0xbbb699fb in rpc_clnt_notify (trans=0xbb70f000, mydata=0xba3c5290,
    event=RPC_TRANSPORT_MSG_RECEIVED, data=0xbb77d220) at rpc-clnt.c:907
#13 0xbbb659c7 in rpc_transport_notify (this=0xbb70f000, 
    event=RPC_TRANSPORT_MSG_RECEIVED, data=0xbb77d220) at
rpc-transport.c:489
#14 0xbaa9327e in socket_event_poll_in ()
   from /usr/local/lib/glusterfs/3.3git/rpc-transport/socket.so
#15 0xbaa937f5 in socket_event_handler ()
   from /usr/local/lib/glusterfs/3.3git/rpc-transport/socket.so
#16 0xbbbb281f in event_dispatch_poll_handler (event_pool=0xbb73b080, 
    ufds=0xbb77e6a0, i=2) at event.c:357
#17 0xbbbb2a8b in event_dispatch_poll (event_pool=0xbb73b080) at
event.c:437
#18 0xbbbb2db7 in event_dispatch (event_pool=0xbb73b080) at event.c:947
#19 0x0805015e in main ()

(gdb) frame 3
#3  0xbaa0ee16 in mdc_setattr_cbk (frame=0xbb77f400, cookie=0xbb77f470,
    this=0xba3e5000, op_ret=0, op_errno=0, prebuf=0xb9401cd8,
    postbuf=0xb9401d40, xdata=0x0) at md-cache.c:1423
1423            mdc_inode_iatt_set (this, local->loc.inode, postbuf);

(gdb) print *local      
$2 = {loc = {path = 0x0, name = 0x0, inode = 0x0, parent = 0x0, 
    gfid = '\000' <repeats 15 times>, pargfid = '\000' <repeats 15
times>}, 
  loc2 = {path = 0x0, name = 0x0, inode = 0x0, parent = 0x0, 
    gfid = '\000' <repeats 15 times>, pargfid = '\000' <repeats 15
times>}, 
  fd = 0xb8f9d054, linkname = 0x0, xattr = 0x0}

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org




More information about the Gluster-devel mailing list