Bug 1235989

Summary: Do null check before dict_ref
Product: [Community] GlusterFS Reporter: Susant Kumar Palai <spalai>
Component: libglusterfsclientAssignee: Susant Kumar Palai <spalai>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, rgowdapp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-16 13:17:09 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:

Description Susant Kumar Palai 2015-06-26 09:50:20 UTC
Description of problem:
For the determination of local bricks for rebalance operation, dht_find_local_subvol_cbk populates the brick info in the dht_conf_t structure and return a NULL dictionary. syncop_getxattr_cbk does dict_ref on the NULL dict,hence it throws up warning message of dict being NULL everytime while doing rebalance.


[2015-06-25 03:01:27.639192] W [dict.c:603:dict_ref] (--> /usr/lib64/libglusterfs.so.0(_gf_log_callingfn+0x1e0)[0x7f2b463e7fc0] (--> /usr/lib64/libglusterfs.so.0(dict_ref+0x6e)[0x7f2b463e054e] (--> usr/lib64/libglusterfs.so.0(syncop_getxattr_cbk+0x43)[0x7f2b464275f3] (--> /usr/lib64/glusterfs/3.7.1/xlator/cluster/distribute.so(dht_find_local_subvol_cbk+0x289)[0x7f2b3881aae9] (--> usr/lib64/glusterfs/3.7.1/xlator/cluster/replicate.so(afr_getxattr_node_uuid_cbk+0xec)[0x7f2b38a62edc] ))))) 0-dict: dict is NULL
 

Expected results:
 Shoud do a NULL check before dict_ref.

Comment 1 Anand Avati 2015-06-26 09:54:04 UTC
REVIEW: http://review.gluster.org/11409 (libglusterfs: Do null check before dict_ref) posted (#2) for review on master by Susant Palai (spalai)

Comment 2 Anand Avati 2015-06-26 12:59:17 UTC
REVIEW: http://review.gluster.org/11409 (libglusterfs: Do null check before dict_ref) posted (#3) for review on master by Susant Palai (spalai)

Comment 3 Anand Avati 2015-06-30 08:49:21 UTC
REVIEW: http://review.gluster.org/11409 (libglusterfs: Pass non NULL xattr in dht_find_local_subvol_cbk to avoid               null dict_ref) posted (#4) for review on master by Susant Palai (spalai)

Comment 4 Anand Avati 2015-06-30 08:50:56 UTC
REVIEW: http://review.gluster.org/11409 (dht: return non NULL xattr for ret > 0) posted (#5) for review on master by Susant Palai (spalai)

Comment 5 Anand Avati 2015-06-30 09:02:23 UTC
REVIEW: http://review.gluster.org/11409 (dht: return non NULL xattr for ret >= 0) posted (#6) for review on master by Susant Palai (spalai)

Comment 6 Anand Avati 2015-06-30 12:53:28 UTC
REVIEW: http://review.gluster.org/11409 (dht: return non NULL xattr,xdata for ret >= 0) posted (#7) for review on master by Susant Palai (spalai)

Comment 7 Anand Avati 2015-08-11 20:22:05 UTC
REVIEW: http://review.gluster.org/11409 (dht: return non NULL xattr,xdata for ret >= 0) posted (#8) for review on master by Raghavendra Talur (rtalur)

Comment 8 Anand Avati 2015-08-14 04:03:09 UTC
COMMIT: http://review.gluster.org/11409 committed in master by Raghavendra G (rgowdapp) 
------
commit fdbff3c4d34296825c2aac023cb07519d922903d
Author: Susant Palai <spalai>
Date:   Thu Jun 25 17:40:18 2015 +0530

    dht: return non NULL xattr,xdata for ret >= 0
    
    Change-Id: I4a3dd8c00894ceeed4af77df2d960f372281a03b
    BUG: 1235989
    Signed-off-by: Susant Palai <spalai>
    Reviewed-on: http://review.gluster.org/11409
    Reviewed-by: Raghavendra Talur <rtalur>
    Reviewed-by: Raghavendra G <rgowdapp>
    Tested-by: Raghavendra G <rgowdapp>

Comment 9 Niels de Vos 2016-06-16 13:17:09 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