Bug 1344425 - fd leak in disperse
Summary: fd leak in disperse
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: disperse
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Ashish Pandey
QA Contact: Matt Zywusko
URL:
Whiteboard:
Depends On: 1344396
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-09 15:56 UTC by Pranith Kumar K
Modified: 2017-08-17 08:26 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.9.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1344396
Environment:
Last Closed: 2017-08-17 08:26:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Pranith Kumar K 2016-06-09 15:56:14 UTC
+++ This bug was initially created as a clone of Bug #1344396 +++

Description of problem:

The disperse xlator uses __fd_unref() to release references to the fd. However this function doesn't make the cleanup of the fd resources if this was the last reference.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Pranith Kumar K on 2016-06-09 11:21:24 EDT ---

Could you give a reference to the function you are referring to where this cleanup is not happening as we intend it to?

--- Additional comment from Xavier Hernandez on 2016-06-09 11:27:19 EDT ---

In function ec_lock_update_fd() we choose the newest fd to keep it in the lock structure. If there's already an fd assigned, we release it using __fd_unref(). We use this function because we are already inside a region protected bye inode->lock, so we cannot call fd_unref().

The problem is that this function doesn't do any cleanup. It only decrements the ref counter. All cleanup is made in fd_unref().

--- Additional comment from Vijay Bellur on 2016-06-09 11:35:30 EDT ---

REVIEW: http://review.gluster.org/14683 (cluster/ec: Fix invalid __fd_unref() call) posted (#1) for review on master by Xavier Hernandez (xhernandez)


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