Memory Leak in Profiler: Disabling the profiler is still collecting stats, and holding the instance of deleted DB #7320

Closed
prabodhshrivastava opened this Issue Apr 9, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@prabodhshrivastava

prabodhshrivastava commented Apr 9, 2017

OrientDB Version: 2.2.17

Java Version: open JDK 8.x.x

OS: Windows all

Expected behavior

If Profiler is disabled then it should not collect any type of stats. And it should not hold the reference of deleted DB

Actual behavior

If OProfiler is disabled then its should not collect stats. In our application we are creating lots of temporary memory based DB(memory) and then when trying to delete it, Db is getting deleted but profiler is holding the reference of the DB. Thus profiler is preventing it in GC cycles. Application is going out of memory.

Steps to reproduce

Create many OMemory DBs on fly and then call delete on that datastore one after other.
After some time take the heap dump of Java process, check if HashMap inside OProfilerStub is holding the reference of that DB

Please let me know if you have questions

@prabodhshrivastava prabodhshrivastava changed the title from Disabling the profiler is still collecting stats, and holding the instance of deleted DB to Memory Leak in Profiler: Disabling the profiler is still collecting stats, and holding the instance of deleted DB Apr 9, 2017

@lvca lvca added the bug label Apr 14, 2017

@tglman

This comment has been minimized.

Show comment
Hide comment
@tglman

tglman May 3, 2017

Member

Hi @prabodhshrivastava,

I removed the reference to the storage from the profiler, so now will be garbage collected, some counter are kept inside the storage for internal purpose and after exposed by the profiler, so that's why it seems that if you torn off the profiler the count continue to go on.

If you don't mind I close this.

Regards

Member

tglman commented May 3, 2017

Hi @prabodhshrivastava,

I removed the reference to the storage from the profiler, so now will be garbage collected, some counter are kept inside the storage for internal purpose and after exposed by the profiler, so that's why it seems that if you torn off the profiler the count continue to go on.

If you don't mind I close this.

Regards

@tglman tglman closed this May 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment