[Bugs] [Bug 1541277] New: dht_layout_t leak in dht_populate_inode_for_dentry

bugzilla at redhat.com bugzilla at redhat.com
Fri Feb 2 07:33:13 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1541277

            Bug ID: 1541277
           Summary: dht_layout_t leak in dht_populate_inode_for_dentry
           Product: GlusterFS
           Version: 4.0
         Component: distribute
          Assignee: bugs at gluster.org
          Reporter: nbalacha at redhat.com
                CC: bugs at gluster.org
        Depends On: 1541264
            Blocks: 1541267



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

Description of problem:
dht_populate_inode_for_dentry does not check if the inode already has a layout
set and overwrites the value each time without freeing the already existing
layout.
This happens only in non-distributed volumes (where dht has a single child
subvol).

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


How reproducible:
Consistently

Steps to Reproduce:

1.Create a 1x2 volume 
2.Fuse mount the volume and create 5 directories in the root of the volume.
mkdir dir-{1..5}
3. Take a statedump of the mount process.
4. Run ls -lR in a loop.
for i in {1..10000}; do ls -lR; done
5. After the loop completes, take another statedump of the mount process and
compare the values for usage-type gf_dht_mt_dht_layout_t memusage


Actual results:

With the latest upstream master:

Before:
======
[cluster/distribute.leak-dht - usage-type gf_dht_mt_dht_layout_t memusage]      
size=456                                                                        
num_allocs=8                                                                    
max_size=584                                                                    
max_num_allocs=10                                                               
total_allocs=21


After:
=====
[cluster/distribute.leak-dht - usage-type gf_dht_mt_dht_layout_t memusage]      
size=10240520                                                                   
num_allocs=160009                                                               
max_size=10240520                                                               
max_num_allocs=160009                                                           
total_allocs=160027 




Expected results:

No leak

Additional info:

----------------------------------------------------------------------
Results after commenting out the call to dht_populate_inode_for_dentry
----------------------------------------------------------------------

Before:
=======

[cluster/distribute.leak-dht - usage-type gf_dht_mt_dht_layout_t memusage]      
size=456                                                                        
num_allocs=8                                                                    
max_size=456                                                                    
max_num_allocs=8                                                                
total_allocs=8


After:
======
[cluster/distribute.leak-dht - usage-type gf_dht_mt_dht_layout_t memusage]      
size=456                                                                        
num_allocs=8                                                                    
max_size=456                                                                    
max_num_allocs=8                                                                
total_allocs=8 

--------------------------------------------------------------

--- Additional comment from Worker Ant on 2018-02-02 02:10:49 EST ---

REVIEW: https://review.gluster.org/19458 (cluster/dht: Fixed leak in
dht_populate_inode_for_dentry) posted (#1) for review on master by N
Balachandran


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1541264
[Bug 1541264] dht_layout_t leak in dht_populate_inode_for_dentry
https://bugzilla.redhat.com/show_bug.cgi?id=1541267
[Bug 1541267] dht_layout_t leak in dht_populate_inode_for_dentry
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list