我有一个 Java/Java EE Web 应用程序,部署在 JBoss 6x 中。
有时应用程序会停止,并且似乎出现死锁情况,许多线程处于 BLOCKED 状态,如最后粘贴的 Thread Dump 的这段代码片段所示。
问题:
1. 什么是 Transaction Reaper Worker - 它锁定了哪些资源?
2. 这是 JTA 问题吗?是什么造成的。我该如何调查,进一步解决这个问题?
3. 几乎有 10 个线程处于 BLOCKED 状态,具有类似的堆栈跟踪。这个问题可能是由 db 端出现问题引起的吗
非常感谢任何帮助。
"ajp-0.0.0.0-8809-19" - Thread t@238
java.lang.Thread.State: BLOCKED
at com.arjuna.ats.arjuna.coordinator.BasicAction.removeChildThread(BasicAction.java:650)
- waiting to lock <7c0d6> (a com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction) owned by "Transaction Reaper Worker 44" t@942
at com.arjuna.ats.internal.arjuna.thread.ThreadActionData.purgeActions(ThreadActionData.java:248
....
....
Locked ownable synchronizers:
- locked <ed3045> (a java.util.concurrent.locks.ReentrantLock$FairSync)
"Transaction Reaper Worker 44" - Thread t@942
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
- waiting to lock <ed3045> (a java.util.concurrent.locks.ReentrantLock$FairSync) owned by "ajp-0.0.0.0-8809-19" t@238
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
.....
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2902)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2881)
at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1602)
- locked <7c0d6> (a com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:119)
at com.arjuna.ats.arjuna.AtomicAction.cancel(AtomicAction.java:212)
at com.arjuna.ats.arjuna.coordinator.TransactionReaper.doCancellations(TransactionReaper.java:367)
at com.arjuna.ats.internal.arjuna.coordinator.ReaperWorkerThread.run(ReaperWorkerThread.java:79)