Bug 823386 - Crash in mdc_inode_prep
Summary: Crash in mdc_inode_prep
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: stat-prefetch
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-21 06:06 UTC by Anush Shetty
Modified: 2013-07-24 17:58 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:58:28 UTC
Regression: ---
Mount Type: fuse
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Anush Shetty 2012-05-21 06:06:41 UTC
Description of problem: This crash was seen when glusterfs was built with GF_TEST_FFOP and extras/test/test-ffop.c was compiled on the fuse mount

Thanks to Emmanuel Dreyfus who first reported this issues on gluster-devel.


Version-Release number of selected component (if applicable):


How reproducible: Consistently


Steps to Reproduce:
1. Build glusterfs with GF_TEST_FFOP
2. Compile extras/test/test-ffop.c on the mount point
3.
  
Actual results:

(gdb) bt
#0  pthread_spin_lock (lock=0x18) at ../nptl/sysdeps/x86_64/../i386/pthread_spin_lock.c:35
#1  0x00007f1a21399940 in mdc_inode_prep (this=0x1891f80, inode=0x0) at md-cache.c:267
#2  0x00007f1a21399d6f in mdc_inode_iatt_set (this=0x1891f80, inode=0x0, iatt=0x7f1a1f94b2c0) at md-cache.c:384
#3  0x00007f1a2139f6e9 in mdc_setattr_cbk (frame=0x7f1a250fd0d8, cookie=0x7f1a250fda40, this=0x1891f80, op_ret=0, op_errno=0, 
    prebuf=0x7f1a1f94b250, postbuf=0x7f1a1f94b2c0, xdata=0x0) at md-cache.c:1423
#4  0x00007f1a215b113c in qr_fsetattr_cbk (frame=0x7f1a250fda40, cookie=0x7f1a250fdfa0, this=0x1890e40, op_ret=0, op_errno=0, 
    preop=0x7f1a1f94b250, postop=0x7f1a1f94b2c0, xdata=0x0) at quick-read.c:1717
#5  0x00007f1a26e88e93 in default_fsetattr_cbk (frame=0x7f1a250fdfa0, cookie=0x7f1a250fe2fc, this=0x188fd60, op_ret=0, op_errno=0, 
    statpre=0x7f1a1f94b250, statpost=0x7f1a1f94b2c0, xdata=0x0) at defaults.c:452
#6  0x00007f1a26e88e93 in default_fsetattr_cbk (frame=0x7f1a250fe2fc, cookie=0x7f1a250fe3a8, this=0x188eca0, op_ret=0, op_errno=0, 
    statpre=0x7f1a1f94b250, statpost=0x7f1a1f94b2c0, xdata=0x0) at defaults.c:452
#7  0x00007f1a26e88e93 in default_fsetattr_cbk (frame=0x7f1a250fe3a8, cookie=0x7f1a250fe454, this=0x188db20, op_ret=0, op_errno=0, 
    statpre=0x7f1a1f94b250, statpost=0x7f1a1f94b2c0, xdata=0x0) at defaults.c:452
#8  0x00007f1a21e3f1d8 in dht_file_setattr_cbk (frame=0x7f1a250fe454, cookie=0x7f1a250fe500, this=0x188c990, op_ret=0, op_errno=0, 
    prebuf=0x7f1a1f94b250, postbuf=0x7f1a1f94b2c0, xdata=0x0) at dht-inode-write.c:389
#9  0x00007f1a22085036 in afr_fsetattr_unwind (frame=0x7f1a24ef47e4, this=0x188bf00) at afr-inode-write.c:1160
#10 0x00007f1a22085460 in afr_fsetattr_wind_cbk (frame=0x7f1a24ef47e4, cookie=0x1, this=0x188bf00, op_ret=0, op_errno=0, 
    preop=0x7fffb1806920, postop=0x7fffb1806990, xdata=0x0) at afr-inode-write.c:1221
#11 0x00007f1a2230bce8 in client3_1_fsetattr_cbk (req=0x7f1a1f2fe1a4, iov=0x7f1a1f2fe1e4, count=1, myframe=0x7f1a250fd638)
    at client3_1-fops.c:1897
#12 0x00007f1a26c5e331 in rpc_clnt_handle_reply (clnt=0x18bdb50, pollin=0x7f1a18000990) at rpc-clnt.c:788
#13 0x00007f1a26c5e6a8 in rpc_clnt_notify (trans=0x18cd5e0, mydata=0x18bdb80, event=RPC_TRANSPORT_MSG_RECEIVED, data=0x7f1a18000990)
    at rpc-clnt.c:907
#14 0x00007f1a26c5a390 in rpc_transport_notify (this=0x18cd5e0, event=RPC_TRANSPORT_MSG_RECEIVED, data=0x7f1a18000990)
    at rpc-transport.c:489
#15 0x00007f1a22f4d333 in socket_event_poll_in (this=0x18cd5e0) at socket.c:1677
#16 0x00007f1a22f4d89c in socket_event_handler (fd=13, idx=4, data=0x18cd5e0, poll_in=1, poll_out=0, poll_err=0) at socket.c:1792
#17 0x00007f1a26eb6824 in event_dispatch_epoll_handler (event_pool=0x1874e00, events=0x1881af0, i=0) at event.c:785
#18 0x00007f1a26eb6a37 in event_dispatch_epoll (event_pool=0x1874e00) at event.c:847
#19 0x00007f1a26eb6daa in event_dispatch (event_pool=0x1874e00) at event.c:947
#20 0x000000000040888b in main (argc=8, argv=0x7fffb1806ef8) at glusterfsd.c:1674

(gdb) f 3
#3  0x00007f1a2139f6e9 in mdc_setattr_cbk (frame=0x7f1a250fd0d8, cookie=0x7f1a250fda40, this=0x1891f80, op_ret=0, op_errno=0, 
    prebuf=0x7f1a1f94b250, postbuf=0x7f1a1f94b2c0, xdata=0x0) at md-cache.c:1423
1423	        mdc_inode_iatt_set (this, local->loc.inode, postbuf);


(gdb) p *this
$2 = {name = 0x1890d90 "test2-md-cache", type = 0x1890db0 "performance/md-cache", next = 0x1890e40, prev = 0x1893120, parents = 0x18941a0, 
  children = 0x1893100, options = 0x7f1a24d6a470, dlhandle = 0x1892970, fops = 0x7f1a215a4460, cbks = 0x7f1a215a4700, dumpops = 0x0, 
  volume_options = {next = 0x1891f20, prev = 0x1891f20}, fini = 0x7f1a213a2391 <fini>, init = 0x7f1a213a22a6 <init>, 
  reconfigure = 0x7f1a213a2215 <reconfigure>, mem_acct_init = 0x7f1a213a227a <mem_acct_init>, notify = 0x7f1a26e95303 <default_notify>, 
  loglevel = GF_LOG_NONE, latencies = {{min = 0, max = 0, total = 0, std = 0, mean = 0, count = 0} <repeats 46 times>}, history = 0x0, 
  ctx = 0x1859010, graph = 0x1883560, itable = 0x0, init_succeeded = 1 '\001', private = 0x18963c0, mem_acct = {num_types = 0, rec = 0x0}, 
  winds = 0, switched = 0 '\000', local_pool = 0x0}
(gdb) p *local
$3 = {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 = 0x193adcc, linkname = 0x0, xattr = 0x0}
(gdb) 




Expected results:


Additional info:

Comment 1 Raghavendra Bhat 2012-06-11 11:28:27 UTC
http://review.gluster.com/3386 fixes the issue.


Note You need to log in before you can comment on or make changes to this bug.