Bug 1104959

Summary: Dist-geo-rep : some of the files not accessible on slave after the geo-rep sync from master to slave.
Product: [Community] GlusterFS Reporter: Ravishankar N <ravishankar>
Component: geo-replicationAssignee: Ravishankar N <ravishankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: gluster-bugs, pkarampu, rgowdapp
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.5.1beta2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1104707 Environment:
Last Closed: 2014-06-24 11:05:42 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: 1102747, 1104707    
Bug Blocks: 1071800    

Comment 1 Anand Avati 2014-06-05 06:25:52 UTC
REVIEW: http://review.gluster.org/7985 (features/gfid-access: calloc gfid and set in xdata) posted (#1) for review on release-3.5 by Ravishankar N (ravishankar)

Comment 2 Ravishankar N 2014-06-05 06:34:39 UTC
The patch basically fixes a memory corruption issue in gfid-access xlator. Cloned this bug from master to serve as a place holder for 3.5 branch for other memory leak fixes in gfid-access that Pranith and Raghavendra are working on.

Comment 3 Anand Avati 2014-06-08 14:58:15 UTC
COMMIT: http://review.gluster.org/7985 committed in release-3.5 by Niels de Vos (ndevos) 
------
commit 325c77ff9d197634656d2ed4af02fbe4de52fbcb
Author: Ravishankar N <ravishankar>
Date:   Wed Jun 4 19:53:50 2014 +0530

    features/gfid-access: calloc gfid and set in xdata
    
    Backport of http://review.gluster.org/#/c/7978/
    
    Problem: the gfid passed to ga_fill_tmp_loc() was a stack variable which
    the function set in the xdata dictionary. Accessing it in a later point
    in time gave unexpected values.
    
    This was easy to hit when AFR was involved like so:
    ga_mknod()--->xxx-->afr_mknod():
    In afr_mknod transaction, once the stack-winds for the lock-phase are sent,
    the gfid in xdata becomes out of scope. When we send the actual op i.e.
    afr_mknod_wind(), the gfid in xdata is stale, causing posix to set junk
    gfids on the files.
    
    Fix:
    calloc the gfid and set it in the dict.
    
    Thanks to Pranith for the RCA!
    
    Change-Id: Ief2080836dc2923dec4be44dda4f6211430e535e
    BUG: 1104959
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/7985
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>

Comment 4 Niels de Vos 2014-06-10 16:52:12 UTC
The second (and last?) Beta for GlusterFS 3.5.1 has been released [1]. Please verify if the release solves this bug report for you. In case the glusterfs-3.5.1beta2 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-June/040547.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 5 Niels de Vos 2014-06-24 11:05:42 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.5.1, please reopen this bug report.

glusterfs-3.5.1 has been announced on the Gluster Users mailinglist [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://supercolony.gluster.org/pipermail/gluster-users/2014-June/040723.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user