Bug 1235928

Summary: memory corruption in the way we maintain migration information in inodes.
Product: [Community] GlusterFS Reporter: Raghavendra G <rgowdapp>
Component: distributeAssignee: Raghavendra G <rgowdapp>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.7.2CC: bugs, gluster-bugs, rkavunga
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1235927 Environment:
Last Closed: 2015-07-30 09:47:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1235927, 1238167    
Bug Blocks:    

Description Raghavendra G 2015-06-26 06:26:14 UTC
+++ This bug was initially created as a clone of Bug #1235927 +++

Description of problem:
In dht_migration_complete_check_task,

        ret = inode_ctx_reset1 (inode, this, &tmp_miginfo);
        if (tmp_miginfo) {
                GF_FREE (tmp_miginfo);
                goto out;
        }

However, another fop might be still using miginfo while we free it. The correct way to solve this is to use refcounting mechanism of memory management.

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


How reproducible:

Found through code-review. Its a race that can happen while doing parallel operations on a file during migration. Since its a race, it might not be reproducible consistently

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2015-06-26 02:25:28 EDT ---

REVIEW: http://review.gluster.org/11418 (cluster/dht: use refcount to manage memory used to store migration information.) posted (#1) for review on master by Raghavendra G (rgowdapp)

Comment 1 Anand Avati 2015-06-26 06:28:52 UTC
REVIEW: http://review.gluster.org/11419 (cluster/dht: use refcount to manage memory used to store migration information.) posted (#1) for review on release-3.7 by Raghavendra G (rgowdapp)

Comment 2 Anand Avati 2015-06-30 11:54:10 UTC
REVIEW: http://review.gluster.org/11419 (cluster/dht: use refcount to manage memory used to store migration information.) posted (#2) for review on release-3.7 by Raghavendra G (rgowdapp)

Comment 3 Kaushal 2015-07-30 09:47:27 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.3, please open a new bug report.

glusterfs-3.7.3 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/12078
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user