Bug 1379924 - gfapi: Fix fd ref leaks
Summary: gfapi: Fix fd ref leaks
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: libgfapi
Version: rhgs-3.2
Hardware: All
OS: All
Target Milestone: ---
: RHGS 3.2.0
Assignee: Soumya Koduri
QA Contact: surabhi
Depends On: 1379285
Blocks: 1351528 1379707 1379708 1379710
TreeView+ depends on / blocked
Reported: 2016-09-28 06:53 UTC by Soumya Koduri
Modified: 2017-03-23 05:49 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.8.4-3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1379285
Last Closed: 2017-03-23 05:49:35 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0486 0 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.2.0 security, bug fix, and enhancement update 2017-03-23 09:18:45 UTC

Description Soumya Koduri 2016-09-28 06:53:23 UTC
+++ This bug was initially created as a clone of Bug #1379285 +++

Description of problem:

From the code inspection, have observed that there are fd ref leaks for few fd-based gfapi fops. 'glfs_resolve_fd' returns a fd (either existing or migrated) with an extra ref taken. This needs to be unref'ed at the end of the operation.

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

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

--- Additional comment from Worker Ant on 2016-09-26 05:35:39 EDT ---

REVIEW: http://review.gluster.org/15573 (gfapi: Fix few fd ref leaks) posted (#1) for review on master by soumya k (skoduri@redhat.com)

--- Additional comment from Worker Ant on 2016-09-27 02:43:38 EDT ---

COMMIT: http://review.gluster.org/15573 committed in master by Niels de Vos (ndevos@redhat.com) 
commit d27cffab670858d7812bbb458a0833303d009b3b
Author: Soumya Koduri <skoduri@redhat.com>
Date:   Mon Sep 26 14:54:27 2016 +0530

    gfapi: Fix few fd ref leaks
    From the code inspection, have observed that there are fd ref
    leaks for few fd-based gfapi fops. 'glfs_resolve_fd' returns
    a fd (either existing or migrated) with an extra ref taken.
    This needs to be unref'ed at the end of the operation.
    Change-Id: Id63394e3e7deafb0c8b06444f2ae847248b126db
    BUG: 1379285
    Signed-off-by: Soumya Koduri <skoduri@redhat.com>
    Reviewed-on: http://review.gluster.org/15573
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    Smoke: Gluster Build System <jenkins@build.gluster.org>

Comment 5 Atin Mukherjee 2016-10-12 09:46:28 UTC
Upstream mainline : http://review.gluster.org/15573
Upstream 3.8 : http://review.gluster.org/15585
downstream : https://code.engineering.redhat.com/gerrit/86107

Comment 7 surabhi 2016-11-23 12:07:07 UTC
Ran Basic sanity on ganesha and don't see any issues with fd leak.
Will have inputs from Samba and Qemu (users of libgfapi), if basic sanity works fine there , will move the BZ to verified.

Comment 8 Vivek Das 2016-11-24 10:45:13 UTC
Ran basic sanity including mount, unmount, IOs, share connect disconnects and did not see any issues with fd leak.

Comment 9 SATHEESARAN 2016-11-24 10:47:35 UTC
Tested RHGS 3.2.0 interim build ( glusterfs-3.8.4-5.el7rhgs ) with RHEL 7.3 with following components :

I could able to create VMs and ran I/O inside the VMs. All works good.

Note: I haven't tested for the memory footprint or fd leaks with gfapi

Comment 10 surabhi 2016-11-25 07:30:23 UTC
As there are no regressions seen on nfs-ganesha, samba and Qemu because of this patch, moving the BZ to verified.



Comment 12 errata-xmlrpc 2017-03-23 05:49:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.