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 --------------------------------------------------------------
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
COMMIT: https://review.gluster.org/19458 committed in master by "Shyamsundar Ranganathan" <srangana> with a commit message- cluster/dht: Fixed leak in dht_populate_inode_for_dentry Fixed an issue in dht_populate_inode_for_dentry where a layout is set in the inode without checking if it is already set. This overwrites the value each time without freeing the already existing layout. Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd BUG: 1541264 Signed-off-by: N Balachandran <nbalacha>
REVIEW: https://review.gluster.org/19471 (cluster/dht: Fixed a leak in inode_ref) posted (#1) for review on master by N Balachandran
COMMIT: https://review.gluster.org/19471 committed in master by "Amar Tumballi" <amarts> with a commit message- cluster/dht: Fixed a leak in inode_ref Introduced by commit d9f773ba719397c128 Change-Id: I3f3103a5a80daed7562ace72e5aa53b77e74fb94 BUG: 1541264 Signed-off-by: N Balachandran <nbalacha>
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-v4.1.0, please open a new bug report. glusterfs-v4.1.0 has been announced on the Gluster mailinglists [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://lists.gluster.org/pipermail/announce/2018-June/000102.html [2] https://www.gluster.org/pipermail/gluster-users/