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

Bug 1047902

Summary: Possible small memory leak in rpcsvc_drc_init()
Product: [Community] GlusterFS Reporter: santosh pradhan <spradhan>
Component: nfsAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, vagarwal
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: Environment:
Last Closed: 2014-11-11 08:26:20 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 santosh pradhan 2014-01-02 14:31:54 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:

Actual results:

Expected results:

Additional info:

1. The routine rpcsvc_drc_init() is only used while initialization of NFS xlator. It should just check for nfs.drc option and init DRC feature accordingly. If it's set to OFF, then rpcsvc_drc_init() allocates memory for svc.drc and set ret value to 0 and goes to out: block where drc is leaked.

2. rpcsvc_drc_init() should just allocate svc.drc and init it. Here svc.drc can never be valid. 

3. If svc.drc gets init'd here, no point of checking for drc type here.

Comment 1 Anand Avati 2014-01-02 15:29:07 UTC
REVIEW: http://review.gluster.org/6628 (gNFS: Small memory leak in rpcsvc_drc_init()) posted (#1) for review on master by Santosh Pradhan (spradhan)

Comment 2 Anand Avati 2014-01-02 15:32:44 UTC
REVIEW: http://review.gluster.org/6628 (gNFS: Small memory leak in rpcsvc_drc_init()) posted (#2) for review on master by Santosh Pradhan (spradhan)

Comment 3 Anand Avati 2014-01-04 06:17:43 UTC
COMMIT: http://review.gluster.org/6628 committed in master by Vijay Bellur (vbellur) 
------
commit 825b976ee30a53e89fe747b4a3ba8f2eb862047c
Author: Santosh Kumar Pradhan <spradhan>
Date:   Thu Jan 2 20:55:59 2014 +0530

    gNFS: Small memory leak in rpcsvc_drc_init()
    
    1. The routine rpcsvc_drc_init() is only used while initialization of
    NFS xlator. It should just check for nfs.drc option and init DRC feature
    accordingly. If it's set to OFF, then rpcsvc_drc_init() allocates memory
    for svc.drc and set ret value to 0 and goes to out: block where drc is
    leaked.
    
    2. rpcsvc_drc_init() should just allocate svc.drc and init it. Here
    svc.drc can never be valid.
    
    3. If svc.drc gets init'd here, no point of checking for drc type here.
    
    Change-Id: I4085771cdb8c9c15d1b9c548b77929a37f27c124
    BUG: 1047902
    Signed-off-by: Santosh Kumar Pradhan <spradhan>
    Reviewed-on: http://review.gluster.org/6628
    Reviewed-by: Niels de Vos <ndevos>
    Reviewed-by: Rajesh Joseph <rjoseph>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 6 Niels de Vos 2014-09-22 12:34:22 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 7 Niels de Vos 2014-11-11 08:26:20 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