-
1. Re: Memory leak in ManagedScheduledExecutorService?
ctomc Apr 7, 2015 8:47 AM (in response to maxim.maslov)from where are ArrayList$Sublist? are they still there after few full GC cycles?
if so, who is holding references?
-
2. Re: Memory leak in ManagedScheduledExecutorService?
maxim.maslov Apr 7, 2015 1:59 PM (in response to ctomc)Tomaz Cerar wrote:
from where are ArrayList$Sublist?
I suspect that ArrayList$Sublists are produced by the org.jboss.invocation.InterceptionContext.clone() method (jboss-invocation-1.2.1.Final.jar module):
/** * Clone this interceptor context instance. The cloned context will resume execution at the same point that * this context would have at the moment it was cloned. * * @return the copied context */ public InterceptorContext clone() { final InterceptorContext clone = new InterceptorContext(); final Map<String, Object> contextData = this.contextData; if (contextData != null) { clone.contextData = new HashMap<String, Object>(contextData); } clone.privateData.putAll(privateData); clone.target = target; clone.method = method; clone.constructor = constructor; clone.parameters = parameters; clone.timer = timer; final int next = interceptorIterator.nextIndex(); clone.setInterceptors(interceptors.subList(next, interceptors.size())); return clone; }
are they still there after few full GC cycles?
The Sublists survive full GC.
if so, who is holding references?
The last ArrayList$Sublist object in the chain is referenced by org.jboss.invocation.InterceptorContext object ('interceptorIterator' field)
The object before the last is referenced by:
- the last ArrayList$Sublist object and
- org.jboss.invocation.InterceptorContex object ('interceptors' field)
The first ArrayList$Sublist object refers to ArrayList that contains two objects:
[0] : org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor
[1] : org.jboss.invocation.TerminalInterceptor
-
3. Re: Memory leak in ManagedScheduledExecutorService?
emmartins Apr 15, 2015 11:17 AM (in response to maxim.maslov)Yes, it's WFLY-4187, and it's fixed at Jboss Invocation 1.4.1.Final, which should be integrated in next WildFly 9 release.
-
4. Re: Memory leak in ManagedScheduledExecutorService?
maxim.maslov Apr 15, 2015 12:37 PM (in response to emmartins)Thanks a lot.