[
https://issues.jboss.org/browse/JBTM-840?page=com.atlassian.jira.plugin.s...
]
Andrew Dinn commented on JBTM-840:
----------------------------------
This may be an endless loop or it may just be that you threads are making incredibly slow
progress. A similar problem was observed and patched in JBTM-599. In that case delayed
threads were always released after a 120 second timeout occurred. So, you might just be
hitting repeated 120 second waits on most of your threads most of the time.
When I looked at JBTM-599 I fixed the immediate issue but I suspected there were probably
other places where wakeups would fail to be delivered and hence where threads could get
left hanging until a timeout occurred. This class needs a thorough audit and a few more
complex test cases to ensure the concurrency management is valid.
AsynchStore.addWork() never leaves overlfow lock loop
-----------------------------------------------------
Key: JBTM-840
URL:
https://issues.jboss.org/browse/JBTM-840
Project: JBoss Transaction Manager
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.14.0
Environment: Ubuntu 10/Java 1.6/MySQL 5.5/JBoss JTS 4.14.0/Spring 3.0/Hibernate
3.6
Reporter: Tom Waterhouse
It looks like somehow when using CacheStore with JBoss JTA it is possible to get into an
endless loop. On the server our app is deployed one cpu is pegged at 100% usage. A
thread dump revealed that a thread is executing AsyncStore.addWork() and never leaves
(thread dump shows line 330, _overflowLock.wait()).
Our cache size is set to 200k.
Here is from the thread dump:
"aggregation-1-14" prio=10 tid=0x00007f0508d0e800 nid=0x46e0 in Object.wait()
[0x00007f050c8eb000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at com.arjuna.ats.internal.arjuna.objectstore.AsyncStore.addWork(CacheStore.java:330)
- locked <0x00000007822a75f8> (a java.lang.Object)
at
com.arjuna.ats.internal.arjuna.objectstore.CacheStore.write_state(CacheStore.java:116)
at
com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore.write_committed(FileSystemStore.java:134)
at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2218)
- locked <0x0000000789f8f530> (a
com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction)
at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1458)
- locked <0x0000000789f8f530> (a
com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction)
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:99)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1158)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119)
at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy187.execute(Unknown Source)
at
com.attensa.core.executor.AggregationCallableImpl.call(AggregationCallableImpl.java:106)
at
com.attensa.core.executor.AggregationCallableImpl.call(AggregationCallableImpl.java:25)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira