Bug 1294053

Summary: Excessive logging in mount when bricks of the replica are down
Product: [Community] GlusterFS Reporter: Ravishankar N <ravishankar>
Component: replicateAssignee: Ravishankar N <ravishankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1299724 (view as bug list) Environment:
Last Closed: 2016-06-16 13:52:16 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:    
Bug Blocks: 1299724    

Description Ravishankar N 2015-12-24 10:11:18 UTC
Description of problem:

Commit 2b7226f9d3470d8fe4c98c1fddb06e7f641e364d did not check for the
validity of a dict before doing a dict_get. This floods the mount log with lot of spurios messages when one of the bricks is down in a replica subovolume:

[2015-12-24 09:31:48.793530] I [dict.c:462:dict_get] (-->/usr/local/lib/glusterfs/3.8dev/xlator/cluster/replicate.so(+0x4de19) [0x7fabffdd6e19] -->/usr/local/lib/glusterfs/3.8dev/xlator/cluster/replicate.so(+0x4d946) [0x7fabffdd6946] -->/usr/local/lib/libglusterfs.so.0(dict_get+0x72) [0x7fac11800302] ) 0-dict: !this || key=glusterfs.bad-inode [Invalid argument]
[2015-12-24 09:31:48.794164] I [dict.c:462:dict_get] (-->/usr/local/lib/glusterfs/3.8dev/xlator/cluster/replicate.so(+0x4de19) [0x7fabffdd6e19] -->/usr/local/lib/glusterfs/3.8dev/xlator/cluster/replicate.so(+0x4d946) [0x7fabffdd6946] -->/usr/local/lib/libglusterfs.so.0(dict_get+0x72) [0x7fac11800302] ) 0-dict: !this || key=glusterfs.bad-inode [Invalid argument]
[2015-12-24 09:31:48.794692] I [dict.c:462:dict_get] (-->/usr/local/lib/glusterfs/3.8dev/xlator/cluster/replicate.so(+0x4de19) [0x7fabffdd6e19]

Comment 1 Vijay Bellur 2015-12-24 10:12:23 UTC
REVIEW: http://review.gluster.org/13077 (afr: Fix excessive logging in afr_accuse_smallfiles()) posted (#1) for review on master by Ravishankar N (ravishankar)

Comment 2 Vijay Bellur 2015-12-28 11:55:47 UTC
REVIEW: http://review.gluster.org/13077 (afr: Fix excessive logging in afr_accuse_smallfiles()) posted (#2) for review on master by Ravishankar N (ravishankar)

Comment 3 Vijay Bellur 2015-12-29 07:26:33 UTC
COMMIT: http://review.gluster.org/13077 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 4c1b66720121ca97ccfac3e09f93519f2f07ddfd
Author: Ravishankar N <ravishankar>
Date:   Thu Dec 24 15:22:05 2015 +0530

    afr: Fix excessive logging in afr_accuse_smallfiles()
    
    Commit 2b7226f9d3470d8fe4c98c1fddb06e7f641e364d did not check for the
    validity of a dict before doing a dict_get. Fix that.
    
    Change-Id: Ie21f4da19256b17196f242cd8fd5bb76b0a69c1e
    BUG: 1294053
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/13077
    Tested-by: NetBSD Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 4 Ravishankar N 2016-01-06 13:32:31 UTC
Found one more code path where the message gets logged, hence moving the bug back to post and using the same bug ID for the next patch.

Comment 5 Vijay Bellur 2016-01-06 13:37:05 UTC
REVIEW: http://review.gluster.org/13185 (afr : Check if dict is valid in afr_replies_interpret()) posted (#1) for review on master by Ravishankar N (ravishankar)

Comment 6 Vijay Bellur 2016-01-11 04:32:27 UTC
REVIEW: http://review.gluster.org/13185 (afr : Check if dict is valid in afr_replies_interpret()) posted (#2) for review on master by Ravishankar N (ravishankar)

Comment 7 Vijay Bellur 2016-01-12 10:42:54 UTC
REVIEW: http://review.gluster.org/13185 (afr : Check if dict is valid in afr_replies_interpret()) posted (#3) for review on master by Ravishankar N (ravishankar)

Comment 8 Vijay Bellur 2016-01-18 07:12:01 UTC
REVIEW: http://review.gluster.org/13185 (afr : Check if dict is valid in afr_replies_interpret()) posted (#4) for review on master by Ravishankar N (ravishankar)

Comment 9 Vijay Bellur 2016-01-21 09:48:29 UTC
COMMIT: http://review.gluster.org/13185 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 30ef018c00b0d1be5d590c9518c159a7946d040e
Author: Ravishankar N <ravishankar>
Date:   Wed Jan 6 13:34:01 2016 +0000

    afr : Check if dict is valid in afr_replies_interpret()
    
    posix_mkdir does not send response xdata. So even though replies are
    valid, the response xdata dict is NULL. Check if dict is non-null in
    afr_replies_interpret before doing dict_get
    
    Signed-off-by: Ravishankar N <ravishankar>
    
    Change-Id: If543d68d8bfd2433519105839d5be106076cc276
    BUG: 1294053
    Reviewed-on: http://review.gluster.org/13185
    Tested-by: Ravishankar N <ravishankar>
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 10 Niels de Vos 2016-06-16 13:52:16 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.8.0, please open a new bug report.

glusterfs-3.8.0 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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user