Bug 762094 (GLUSTER-362) - GlusterFS crash while doing mkdir in stripe setup
Summary: GlusterFS crash while doing mkdir in stripe setup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-362
Product: GlusterFS
Classification: Community
Component: stripe
Version: mainline
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
: GLUSTER-367 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-09 06:17 UTC by Raghavendra Bhat
Modified: 2013-12-19 00:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
client log file (7.20 KB, text/x-log)
2009-11-09 03:18 UTC, Raghavendra Bhat
no flags Details
Backtrace from the core file (4.98 KB, application/octet-stream)
2009-11-09 03:20 UTC, Raghavendra Bhat
no flags Details

Description Raghavendra Bhat 2009-11-09 03:18:49 UTC
Created attachment 94 [details]
my inputrc which has this right

Comment 1 Raghavendra Bhat 2009-11-09 03:20:19 UTC
Created attachment 95 [details]
gendiff patch to fix the described problems

Comment 2 Raghavendra Bhat 2009-11-09 06:17:59 UTC
On GlusterFS-3.0.0pre1 in striping the glusterfs client crashes whenever mkdir is encountered.The core file is in /share/bugzilla/<bugid>.The backtrace of the core file and the client log files are attached.

Comment 3 Amar Tumballi 2009-11-09 13:44:44 UTC
below patch should fix it. Can you please check with this changes made in code base?

----------
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index bd81661..f3baf98 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -493,6 +493,7 @@ stripe_stack_unwind_inode_cbk (call_frame_t *frame, void *cookie,
 {
         int32_t         callcnt = 0;
         stripe_local_t *local   = NULL;
+        inode_t       *local_inode = NULL;
 
         local = frame->local;
 
@@ -512,6 +513,8 @@ stripe_stack_unwind_inode_cbk (call_frame_t *frame, void *cookie,
  
                 if (op_ret >= 0) {
                         local->op_ret = 0;
+                        if (!local->inode)
+                                local->inode = inode_ref (inode);
 
                         if (!local->post_buf.st_blksize) {
                                 local->post_buf = *buf;
@@ -558,10 +561,14 @@ stripe_stack_unwind_inode_cbk (call_frame_t *frame, void *cookie,
                 if (local->failed)
                         local->op_ret = -1;
 
+                local_inode = local->inode;
+
                 STACK_UNWIND (frame, local->op_ret, local->op_errno, 
                               local->inode, &local->post_buf, 
                               &local->pre_parent_buf, 
                               &local->post_parent_buf);
+                if (!local_inode)
+                        inode_unref (local_inode);
         }
 
         return 0;

Comment 4 Amar Tumballi 2009-11-11 19:22:41 UTC
*** Bug 367 has been marked as a duplicate of this bug. ***

Comment 5 Anand Avati 2009-11-12 04:18:41 UTC
PATCH: http://patches.gluster.com/patch/2154 in master (cluster/stripe: Set local->inode value before referring it.)


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