Bug 861044

Summary: Memory leak in volume set handle
Product: [Community] GlusterFS Reporter: Krutika Dhananjay <kdhananj>
Component: glusterdAssignee: Krutika Dhananjay <kdhananj>
Severity: unspecified Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 13:55:16 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Krutika Dhananjay 2012-09-27 07:42:45 EDT
Description of problem:
dict_ref and dict_unref were modified to log the refcount and address of the dictionary. It was observed that the refcount of the dict created in volume set handler never becomes 0 (implying the dict is ref'd but never unref'd), when the commands "volume set" and "volume set help" fail in handle.

[root@kd glusterfs]# gluster volume info test
Volume Name: test
Type: Distribute
Volume ID: 05581668-d5ee-41cc-94ec-90f747633a28
Status: Created
Number of Bricks: 1
Transport-type: tcp
Brick1: kd:/export2/test1

[root@kd glusterfs]# gluster volume set test performance.write-behind off
volume set: failed: operation failed
volume set: failed

glusterd log:

[2012-09-27 11:21:56.173677] E [dict.c:486:dict_ref] (-->/usr/local/lib/libgfrpc.so.0(rpcsvc_handle_rpc_call+0x2ec) [0x7fde90676d60] (-->/usr/local/lib/glusterfs/3git/xlator/mgmt/glusterd.so(glusterd_handle_set_volume+0xcb) [0x7fde8d689b52] (-->/usr/local/lib/libglusterfs.so.0(dict_new+0x31) [0x7fde9089c66a]))) 0-DICT REF: dict ptr:  0x7fde8f300cc0 refcount = 1

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Vijay Bellur 2013-02-03 15:35:23 EST
CHANGE: http://review.gluster.org/4003 (glusterd: do dict unref after sending reply to cli) merged in master by Anand Avati (avati@redhat.com)