Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1136823

Summary: Find <mnt> | xargs stat leads to mismatching gfids on files without gfid
Product: [Community] GlusterFS Reporter: Pranith Kumar K <pkarampu>
Component: replicateAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: bugs, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.6.0beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1129529 Environment:
Last Closed: 2014-11-11 08:37: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: 1129529    
Bug Blocks:    

Description Pranith Kumar K 2014-09-03 11:55:44 UTC
+++ This bug was initially created as a clone of Bug #1129529 +++

Description of problem:
find <mnt> | xargs stat from two mounts in parallel leads to mismatching gfids on replicate volume

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


How reproducible:
Always

Steps to Reproduce:
1. On both the bricks of replicate volume create the same directory hierarchy
2. have two fuse mounts on this volume
3. In parallel execute find <mnt> | xargs stat
4. find fails with Input/output error. If we do getfattr on that file it gives gfid-mismatch.

Actual results:
Find should succeed and gfid-mismatch should not happen

Expected results:


Additional info:

--- Additional comment from Anand Avati on 2014-08-13 01:51:04 EDT ---

REVIEW: http://review.gluster.org/8466 (cluster/afr: Perform gfid heal inside locks) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-08-13 02:13:47 EDT ---

REVIEW: http://review.gluster.org/8466 (cluster/afr: Perform gfid heal inside locks.) posted (#2) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-08-17 22:29:22 EDT ---

REVIEW: http://review.gluster.org/8466 (cluster/afr: Perform gfid heal inside locks.) posted (#3) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-08-21 06:09:44 EDT ---

REVIEW: http://review.gluster.org/8466 (cluster/afr: Perform gfid heal inside locks.) posted (#4) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-08-22 03:37:54 EDT ---

REVIEW: http://review.gluster.org/8512 (cluster/afr: Perform gfid heal inside locks.) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-08-22 05:32:05 EDT ---

COMMIT: http://review.gluster.org/8512 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 3b70b160a46b22b77a8ad1897440ec1346795a0f
Author: Pranith Kumar K <pkarampu>
Date:   Wed Aug 13 11:11:17 2014 +0530

    cluster/afr: Perform gfid heal inside locks.
    
    Problem:
    Allowing lookup with 'gfid-req' will lead to assigning gfid at posix layer.
    When two mounts perform lookup in parallel that can lead to both bricks getting
    different gfids leading to gfid-mismatch/EIO for the lookup.
    
    Fix:
    Perform gfid heal inside lock.
    
    BUG: 1129529
    Change-Id: I20c6c5e25ee27eeb906bff2f4c8ad0da18d00090
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/8512
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Krutika Dhananjay <kdhananj>

Comment 1 Anand Avati 2014-09-03 12:03:10 UTC
REVIEW: http://review.gluster.org/8589 (cluster/afr: Perform gfid heal inside locks.) posted (#1) for review on release-3.6 by Pranith Kumar Karampuri (pkarampu)

Comment 2 Anand Avati 2014-09-12 08:14:42 UTC
COMMIT: http://review.gluster.org/8589 committed in release-3.6 by Vijay Bellur (vbellur) 
------
commit ab4ed074cd53f7646069ee0d8d62d3708776f96e
Author: Pranith Kumar K <pkarampu>
Date:   Wed Aug 13 11:11:17 2014 +0530

    cluster/afr: Perform gfid heal inside locks.
    
            Backport of http://review.gluster.org/8512
    
    Problem:
    Allowing lookup with 'gfid-req' will lead to assigning gfid at posix layer.
    When two mounts perform lookup in parallel that can lead to both bricks getting
    different gfids leading to gfid-mismatch/EIO for the lookup.
    
    Fix:
    Perform gfid heal inside lock.
    
    BUG: 1136823
    Change-Id: I1059fcd38338348b7e96a0bd4c35b0f49bf77aec
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/8589
    Reviewed-by: Krutika Dhananjay <kdhananj>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Ravishankar N <ravishankar>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 3 Niels de Vos 2014-09-22 12:45:20 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 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-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 4 Niels de Vos 2014-11-11 08:37: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.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [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-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users