Bug 1353855

Summary: Possible memory leak in the glusterfs client after upgrade to v3.7.12
Product: [Community] GlusterFS Reporter: Raghavendra G <rgowdapp>
Component: fuseAssignee: Raghavendra G <rgowdapp>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, csaba, mzywusko, ndevos, olim, rgowdapp, ronny.adsetts, skoduri
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1353774
: 1353856 (view as bug list) Environment:
Last Closed: 2017-09-01 17:16:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1353774, 1353856    

Comment 1 Raghavendra G 2016-07-08 08:48:02 UTC
--- Additional comment from Raghavendra G on 2016-07-08 01:58:08 EDT ---

Seems like there is a leak in inodes:

# grep fuse.itable.active glusterdump.2460.dump.1467123831 | tail -1

[xlator.mount.fuse.itable.active.2904698]

As can be seen above there are 2904698 "active" inodes, which strongly points towards a leak.

regards,
Raghavendra

--- Additional comment from Raghavendra G on 2016-07-08 02:30:54 EDT ---

[raghu@unused 1353774]$ grep ia_type=1 ./glusterdump.2460.dump.1467123831 | wc -l
3457676
[raghu@unused 1353774]$ grep ia_type=2 ./glusterdump.2460.dump.1467123831 | wc -l
637

Seems like most of the inodes that leaked are regular files.

--- Additional comment from Raghavendra G on 2016-07-08 04:44:31 EDT ---

I think leak was introduced by http://review.gluster.org/#/c/11892/
for inodes on which "need-lookup" is set (typically the ones returned by readdirp), we call entry resolution even though loc->inode is set (as inode was already present in itable). However, fuse_resolve_entry_cbk assumes loc->inode is unset always, thereby overriding loc->inode with a new value without doing an unref.

regards,
Raghavendra

Comment 2 Csaba Henk 2017-09-01 17:16:31 UTC
Clone of bug 1353774 which is duplicate of bug 1294759 which is CLOSED CURRENTRELEASE. Closing this one too.