[
https://issues.jboss.org/browse/ISPN-3777?page=com.atlassian.jira.plugin....
]
Dan Berindei updated ISPN-3777:
-------------------------------
Status: Pull Request Sent (was: Pull Request Sent)
Git Pull Request:
https://github.com/infinispan/infinispan/pull/2263,
https://github.com/infinispan/infinispan/pull/2282 (was:
https://github.com/infinispan/infinispan/pull/2263)
* InvocationContextInterceptor now sets the InvocationContext thread-local
* Batching mode now also uses InvocationContextInterceptor, so there is
only one place where the thread local is set/removed.
* InvocationContextFactory was extracted from InvocationContextContainer
* The thread-local is not set when the classloader is not needed, or when
the call classloader (either from AdvancedCache.with(ClassLoader) or from
the thread's context classloader) is the same as the configured
classloader (by default, the context classloader of the thread that
created the GlobalConfiguration).
* DefaultContextClassResolver now prefers the classloader in the
configuration to the current thread's context classloader (but if they
are different, the context classloader was already set in the
InvocationContext and returned by EmbeddedContextClassResolver).
ThreadLocal in AbstractInvocationContextContainer is leaking
instances of LocalTxInvocationContext
--------------------------------------------------------------------------------------------------
Key: ISPN-3777
URL:
https://issues.jboss.org/browse/ISPN-3777
Project: Infinispan
Issue Type: Bug
Affects Versions: 6.0.0.Final
Reporter: Marko Lukša
Assignee: Marko Lukša
Priority: Critical
When running CapeDwarf log tests on Infinispan 6.0.0 & Wildfly, we're seeing lots
of retained instances of LocalTxInvocationContext.
So far I've seen the instances that are not removed are created at the following two
points:
{code}
java.lang.Exception: Creation stack
at
org.infinispan.context.impl.LocalTxInvocationContext.<init>(LocalTxInvocationContext.java:42)
at
org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:100)
at org.infinispan.CacheImpl.getInvocationContext(CacheImpl.java:615)
at
org.infinispan.CacheImpl.getInvocationContextWithImplicitTransaction(CacheImpl.java:599)
at
org.infinispan.CacheImpl.getInvocationContextWithImplicitTransactionForAsyncOps(CacheImpl.java:569)
at org.infinispan.CacheImpl.putAsync(CacheImpl.java:996)
at org.infinispan.DecoratedCache.putAsync(DecoratedCache.java:238)
at org.infinispan.AbstractDelegatingCache.putAsync(AbstractDelegatingCache.java:131)
at
org.jboss.capedwarf.log.CapedwarfLogService$AsyncLogWriter.put(CapedwarfLogService.java:378)
at
org.jboss.capedwarf.log.CapedwarfLogService.requestFinished(CapedwarfLogService.java:348)
at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.capedwarf.aspects.proxy.AspectContext.proceed(AspectContext.java:47)
at
org.jboss.capedwarf.aspects.DisableSocketsAspect.invoke(DisableSocketsAspect.java:43)
at org.jboss.capedwarf.aspects.proxy.AspectWrapper.invoke(AspectWrapper.java:50)
at org.jboss.capedwarf.aspects.proxy.AspectContext.proceed(AspectContext.java:52)
at
org.jboss.capedwarf.aspects.GlobalTimeLimitAspect.invoke(GlobalTimeLimitAspect.java:44)
at org.jboss.capedwarf.aspects.proxy.AspectWrapper.invoke(AspectWrapper.java:50)
at org.jboss.capedwarf.aspects.proxy.AspectContext.proceed(AspectContext.java:52)
at org.jboss.capedwarf.aspects.proxy.AspectHandler.invoke(AspectHandler.java:60)
at
org.jboss.capedwarf.log.ExposedLogService_$$_jvst183_0.requestFinished(ExposedLogService_$$_jvst183_0.java)
at org.jboss.capedwarf.appidentity.GAEListener.requestDestroyed(GAEListener.java:125)
at
io.undertow.servlet.core.ApplicationListeners.requestDestroyed(ApplicationListeners.java:225)
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:226)
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:72)
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:145)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:139)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:638)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
{code}
and
{code}
java.lang.Exception: Creation stack
at
org.infinispan.context.impl.LocalTxInvocationContext.<init>(LocalTxInvocationContext.java:42)
at
org.infinispan.context.TransactionalInvocationContextContainer.createTxInvocationContext(TransactionalInvocationContextContainer.java:110)
at
org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:145)
at
org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:58)
at
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:532)
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1170)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1306)
at org.infinispan.CacheImpl.putInternal(CacheImpl.java:869)
at org.infinispan.CacheImpl.put(CacheImpl.java:861)
at org.infinispan.DecoratedCache.put(DecoratedCache.java:401)
at org.infinispan.AbstractDelegatingCache.put(AbstractDelegatingCache.java:276)
at
org.jboss.capedwarf.log.CapedwarfLogService$SyncLogWriter.put(CapedwarfLogService.java:390)
at
org.jboss.capedwarf.log.CapedwarfLogService.requestFinished(CapedwarfLogService.java:348)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.capedwarf.aspects.proxy.AspectContext.proceed(AspectContext.java:47)
at
org.jboss.capedwarf.aspects.DisableSocketsAspect.invoke(DisableSocketsAspect.java:43)
at org.jboss.capedwarf.aspects.proxy.AspectWrapper.invoke(AspectWrapper.java:50)
at org.jboss.capedwarf.aspects.proxy.AspectContext.proceed(AspectContext.java:52)
at
org.jboss.capedwarf.aspects.GlobalTimeLimitAspect.invoke(GlobalTimeLimitAspect.java:44)
at org.jboss.capedwarf.aspects.proxy.AspectWrapper.invoke(AspectWrapper.java:50)
at org.jboss.capedwarf.aspects.proxy.AspectContext.proceed(AspectContext.java:52)
at org.jboss.capedwarf.aspects.proxy.AspectHandler.invoke(AspectHandler.java:60)
at
org.jboss.capedwarf.log.ExposedLogService_$$_jvst8b1_0.requestFinished(ExposedLogService_$$_jvst8b1_0.java)
at org.jboss.capedwarf.appidentity.GAEListener.requestDestroyed(GAEListener.java:125)
at
io.undertow.servlet.core.ApplicationListeners.requestDestroyed(ApplicationListeners.java:225)
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:226)
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:72)
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:145)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:139)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:638)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira