Bug 1523455

Summary: Store allocated objects in the mem_acct
Product: [Community] GlusterFS Reporter: Nithya Balachandran <nbalacha>
Component: coreAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.12CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-glusterfs-3.12.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1522662
: 1523456 (view as bug list) Environment:
Last Closed: 2017-12-19 07:18:35 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: 1522662    
Bug Blocks: 1523456    

Description Nithya Balachandran 2017-12-08 02:41:18 UTC
+++ This bug was initially created as a clone of Bug #1522662 +++

Description of problem:
There is no way to get the address of objects of a particular type that are allocated. The struct mem_acct and struct mem_acct_rec store the overall stats but there is no easy way to track down the currently allocated objects of a particular type. 



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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


These changes add struct list heads to the struct mem_acct_rec and struct mem_header. Allocated objects will be added to the mem_acct_rec list in gf_mem_set_acct_info and removed in __gf_free. 

This allows developers to examine all the allocated objects of a particular type in memory if required and could be helpful while debugging.

This change is not compiled in by default.

--- Additional comment from Worker Ant on 2017-12-06 04:02:20 EST ---

REVIEW: https://review.gluster.org/18945 (core/memacct: save allocs in mem_acct_rec list) posted (#1) for review on master by N Balachandran

--- Additional comment from Worker Ant on 2017-12-07 10:13:58 EST ---

COMMIT: https://review.gluster.org/18945 committed in master by \"N Balachandran\" <nbalacha> with a commit message- core/memacct: save allocs in mem_acct_rec list

With configure --enable-debug, add all object allocations
to a list in the corresponding mem_acct_rec. This
allows us to see all objects of a particular type
and allows for additional debugging in case of memory
leaks.

This is not compiled in by default and must be explicitly
enabled. It is intended to be used by developers.

Change-Id: I7cf2dbeadecf994423d7e7591e85f18d2575cce8
BUG: 1522662
Signed-off-by: N Balachandran <nbalacha>

Comment 1 Worker Ant 2017-12-08 03:13:00 UTC
REVIEW: https://review.gluster.org/19010 (core/memacct: save allocs in mem_acct_rec list) posted (#1) for review on release-3.12 by N Balachandran

Comment 2 Worker Ant 2017-12-08 14:40:56 UTC
COMMIT: https://review.gluster.org/19010 committed in release-3.12 by \"N Balachandran\" <nbalacha> with a commit message- core/memacct: save allocs in mem_acct_rec list

With configure --enable-debug, add all object allocations
to a list in the corresponding mem_acct_rec. This
allows us to see all objects of a particular type
and allows for additional debugging in case of memory
leaks.

This is not compiled in by default and must be explicitly
enabled. It is intended to be used by developers.

> Change-Id: I7cf2dbeadecf994423d7e7591e85f18d2575cce8
> BUG: 1522662
> Signed-off-by: N Balachandran <nbalacha>

(cherry picked from commit 47d01546a1826dc14a8331ea8700015f1cfdc4db)
Change-Id: I7cf2dbeadecf994423d7e7591e85f18d2575cce8
BUG: 1523455
Signed-off-by: N Balachandran <nbalacha>

Comment 3 Jiffin 2017-12-19 07:18:35 UTC
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-glusterfs-3.12.4, please open a new bug report.

glusterfs-glusterfs-3.12.4 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/gluster-devel/2017-December/054093.html
[2] https://www.gluster.org/pipermail/gluster-users/