[ grinder-Bugs-3406177 ] Instrumented objects are not garbage collected

SourceForge.net <[email protected]> Fri, 09 Sep 2011 16:05:17 +0100
Newsgroups gmane.comp.java.grinder.devel
Message-ID <[email protected]>
Bugs item #3406177, was opened at 2011-09-08 12:47
Message generated for change (Comment added) made by philipa
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=3406177&group_id=18598

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core engine
Group: None
>Status: Pending
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: GaryM ()
>Assigned to: Philip Aston (philipa)
Summary: Instrumented objects are not garbage collected

Initial Comment:
I'm created a new instrumented object every Grinder run and eventually running out of tenured heap space in my JVM on extended soak tests.

>From Phil:

Each instrumented object uses memory to bind the instrumentation to the appropriate Test - a reasonable requirement. Unfortunately, The Grinder does not tidy up this memory if an instrumented object is garbage collected, and so instrumenting an object and throwing it away is an effective memory leak. Further, it will maintain a strong reference to the target object, pinning it in memory too.

Each instrumentation point in an object uses a CopyOnWriteArrayList, and hence a RentrantLock. This can be seen in an allocation stack trace (attached).


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

>Comment By: Philip Aston (philipa)
Date: 2011-09-09 16:05

Message:
Looks like this is actually a bug in a third party class.

Please can you try the patch I'll attach to this bug. Just add it to the
start of the CLASSPATH you use to start the agent process.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=3406177&group_id=18598

------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT 
space for its ease of implementation, lower cost, and increased 
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/