| Summary: | GlusterFS crash while doing mkdir in stripe setup | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Raghavendra Bhat <rabhat> | ||||||
| Component: | stripe | Assignee: | Amar Tumballi <amarts> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | mainline | CC: | gluster-bugs, vraman | ||||||
| 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: | |||||||
| Attachments: |
|
||||||||
Created attachment 95 [details]
gendiff patch to fix the described problems
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. 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;
*** Bug 367 has been marked as a duplicate of this bug. *** PATCH: http://patches.gluster.com/patch/2154 in master (cluster/stripe: Set local->inode value before referring it.) |
Created attachment 94 [details] my inputrc which has this right