Bug 762258 (GLUSTER-526)

Summary: glusterfsd crash when export dir is deleted and revalidate happens on /
Product: [Community] GlusterFS Reporter: Krishna Srinivas <krishna>
Component: coreAssignee: Anand Avati <aavati>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0.0CC: avati, chrisw, gluster-bugs, rabhat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Krishna Srinivas 2010-01-09 02:23:17 UTC
This crash happens when the backend export directory is deleted and a revalidate happens. parent is NULL for /

__inode_unlink (inode_t *inode, inode_t *parent, const char *name)
{
        dentry_t *dentry = NULL;

        dentry = __dentry_search_for_inode (inode, parent->ino, name);

parent->ino causes NULL ptr dereference.

here is the BT:

#0  __inode_unlink (inode=0x619b80, parent=0x0, name=0x619d21 "") at inode.c:758
758     inode.c: No such file or directory.
       in inode.c
(gdb) bt
#0  __inode_unlink (inode=0x619b80, parent=0x0, name=0x619d21 "") at inode.c:758
#1  0x00007f28de61bbdf in inode_unlink (inode=0x619b80, parent=0x0,
name=0x619d21 "") at inode.c:778
#2  0x00007f28dce2db8b in server_lookup_cbk (frame=0x618d38,
cookie=<value optimized out>, this=0x60f270, op_ret=-1, op_errno=2,
inode=0x61d3b0,
   stbuf=0x425e7f80, dict=0x0, postparent=0x425e7ef0) at server-protocol.c:2459
#3  0x00007f28dd044b72 in iot_lookup_cbk (frame=0x61c960,
cookie=<value optimized out>, this=<value optimized out>, op_ret=-1,
op_errno=2, inode=0x61d3b0,
   buf=0x425e7f80, xattr=0x0, postparent=0x425e7ef0) at io-threads.c:322
#4  0x00007f28dd2564bd in pl_lookup_cbk (frame=0x61c9c0, cookie=<value
optimized out>, this=<value optimized out>, op_ret=-1, op_errno=2,
inode=0x61d3b0,
   buf=0x425e7f80, dict=0x0, postparent=0x425e7ef0) at posix.c:1025
#5  0x00007f28dd46f922 in posix_lookup (frame=0x61ca20, this=<value
optimized out>, loc=0x61e190, xattr_req=0x619fc0) at posix.c:490
#6  0x00007f28dd2556fc in pl_lookup (frame=0x61c9c0, this=0x60e140,
loc=0x61e190, xattr_req=0x619fc0) at posix.c:1065
#7  0x00007f28dd047245 in iot_lookup_wrapper (frame=<value optimized
out>, this=0x60e970, loc=0x61e190, xattr_req=0x619fc0) at
io-threads.c:332
#8  0x00007f28de61cb56 in call_resume (stub=0x61e160) at call-stub.c:2673
#9  0x00007f28dd0476be in iot_worker_unordered (arg=<value optimized
out>) at io-threads.c:2453
#10 0x00007f28de1df3f7 in start_thread () from /lib/libpthread.so.0
#11 0x00007f28ddf4eb4d in clone () from /lib/libc.so.6
#12 0x0000000000000000 in ?? ()
(gdb)

Comment 1 Anand Avati 2010-01-23 17:58:06 UTC
PATCH: http://patches.gluster.com/patch/2686 in master (protocol/server: unlink dentry only for non-root inodes)

Comment 2 Anand Avati 2010-01-27 10:41:29 UTC
*** Bug 577 has been marked as a duplicate of this bug. ***