Bug 1739337 - DHT: severe memory leak in dht rename
Summary: DHT: severe memory leak in dht rename
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: 7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1722512 1722698
Blocks: 1726294
TreeView+ depends on / blocked
 
Reported: 2019-08-09 05:08 UTC by Nithya Balachandran
Modified: 2019-08-09 11:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1722698
Environment:
Last Closed: 2019-08-09 11:41:26 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 23182 0 None Merged cluster/dht: Fixed a memleak in dht_rename_cbk 2019-08-09 11:41:25 UTC

Description Nithya Balachandran 2019-08-09 05:08:48 UTC
+++ This bug was initially created as a clone of Bug #1722698 +++

+++ This bug was initially created as a clone of Bug #1722512 +++

Description of problem:

The dht rename codepath has a severe leak if it needs to create a linkto file. 
Version-Release number of selected component (if applicable):


How reproducible:
Consistently

Steps to Reproduce:
1. Create a 2x3 distribute replicate volume and fuse mount it.
2. Create 2 directories, dir1 and dir1-new in the root of the volume
3. Find 2 filenames which will hash to different subvols when created in these directories. For example, in my setup dir1/file-1 and dir1-new/newfile-1 hash to different subvols. This is necessary as the leak is in the path which creates a linkto file.
4. Run the following script and watch the memory usage for the mount process using top.



Actual results:
Memory rises steadily. Statedumps show that the number of active inodes keeps increasing.

Expected results:
Memory should not increase as there is a single file on the volume.


Additional info:


--- Additional comment from Nithya Balachandran on 2019-06-20 14:10:03 UTC ---

(In reply to Nithya Balachandran from comment #0)
> Description of problem:
> 
> The dht rename codepath has a severe leak if it needs to create a linkto
> file. 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible:
> Consistently
> 
> Steps to Reproduce:
> 1. Create a 2x3 distribute replicate volume and fuse mount it.
> 2. Create 2 directories, dir1 and dir1-new in the root of the volume
> 3. Find 2 filenames which will hash to different subvols when created in
> these directories. For example, in my setup dir1/file-1 and
> dir1-new/newfile-1 hash to different subvols. This is necessary as the leak
> is in the path which creates a linkto file.
> 4. Run the following script and watch the memory usage for the mount process
> using top.
> 
> 
Forgot to mention the script in the description:

while (true); do for in in {1..20000}; do touch /mnt/fuse1/dir1/file-1; mv -f /mnt/fuse1/dir1/file-1 /mnt/fuse1/dir1-new/newfile-1; done ;rm -rf /mnt/fuse1/dir1-new/*; done

--- Additional comment from Worker Ant on 2019-06-21 03:38:32 UTC ---

REVIEW: https://review.gluster.org/22912 (cluster/dht:  Fixed a memleak in dht_rename_cbk) posted (#1) for review on master by N Balachandran

--- Additional comment from Worker Ant on 2019-07-02 11:52:04 UTC ---

REVIEW: https://review.gluster.org/22912 (cluster/dht:  Fixed a memleak in dht_rename_cbk) merged (#5) on master by N Balachandran

Comment 1 Worker Ant 2019-08-09 05:11:42 UTC
REVIEW: https://review.gluster.org/23182 (cluster/dht:  Fixed a memleak in dht_rename_cbk) posted (#1) for review on release-7 by N Balachandran

Comment 2 Worker Ant 2019-08-09 11:41:26 UTC
REVIEW: https://review.gluster.org/23182 (cluster/dht:  Fixed a memleak in dht_rename_cbk) merged (#2) on release-7 by Rinku Kothiya


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