Deadlock seen with Narayana 5.0.4 and WildFly 8.2.1.Final
bvnghiem1012 Jul 17, 2016 10:42 PMHi all,
I do upgrade Narayana 5.0.0 on WildFly 8.2.1. Final to 5.0.4 to fix some issues. Now I am seeing a deadlock as below. The reaper thread is creating a deadlock against a DB reading thread.
Found one Java-level deadlock:
=============================
"Transaction Reaper Worker 21":
waiting for ownable synchronizer 0x0000000521acc560, (a java.util.concurrent.locks.ReentrantLock$FairSync),
which is held by "default task-393"
"default task-393":
waiting to lock monitor 0x00007f024c73bce8 (object 0x000000059efbaf30, a com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction),
which is held by "Transaction Reaper Worker 21"
Java stack information for the threads listed above:
===================================================
"Transaction Reaper Worker 21":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000521acc560> (a java.util.concurrent.locks.ReentrantLock$FairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:224)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.lock(BaseWrapperManagedConnection.java:373)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnection.rollback(LocalManagedConnection.java:113)
at org.jboss.jca.core.tx.jbossts.LocalXAResourceImpl.rollback(LocalXAResourceImpl.java:242)
at com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource.rollback(XAOnePhaseResource.java:205)
at com.arjuna.ats.internal.arjuna.abstractrecords.LastResourceRecord.topLevelAbort(LastResourceRecord.java:126)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2993)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2972)
at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1675)
- locked <0x000000059efbaf30> (a com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:127)
at com.arjuna.ats.arjuna.AtomicAction.cancel(AtomicAction.java:215)
at com.arjuna.ats.arjuna.coordinator.TransactionReaper.doCancellations(TransactionReaper.java:381)
at com.arjuna.ats.internal.arjuna.coordinator.ReaperWorkerThread.run(ReaperWorkerThread.java:78)
"default task-393":
at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1632)
- waiting to lock <0x000000059efbaf30> (a com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:127)
at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:186)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1189)
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.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:173)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010)
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:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy175.findUserByName(Unknown Source)
Any hint about this issue is appreciated.
Thanks,
Nghiem