[
https://jira.jboss.org/jira/browse/JBAS-6348?page=com.atlassian.jira.plug...
]
Pieter Bos commented on JBAS-6348:
----------------------------------
I can confirm this issue. We are somehow facing a lock that never gets released. When this
happens, transaction timeouts occur while waiting for a lock on that object in other
threads. Due to the fauly isTxExpired() method, they never time out and keep waiting. In
the end, all threads in the thread pool are in the waitForTx method. This in turn freezes
the entire application because at the end every thread in the threadpool spents his time
waiting for the lock to free or the transaction to expire - which will never happen.
We had an application freeze many times - all threads in the thread pool spent their time
in the QueuesPessimisticEJBLock.waitForTX() function, so the application no longer
responded. After fixing this issue with the patch in the description of this issue (adding
"ROLLING_BACK" as a condition too), RuntimeExceptions happen instead and the
application remains running.
Problem with QueuedPessimisticEJBLock and Arjuna
------------------------------------------------
Key: JBAS-6348
URL:
https://jira.jboss.org/jira/browse/JBAS-6348
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Transaction Manager (Arjuna)
Affects Versions: JBossAS-4.2.3.GA
Reporter: Ole Husgaard
Assignee: Jonathan Halliday
When using Arjuna, QueuedPessimisticEJBLock does not always properly detect that a
waiting tx has timed out. The problem is that QueuedPessimisticEJBLock was written for the
old TM, which did not rollback transactions on timeout, but only marked them for rollback.
Now that Arjuna is in play, it has to check for rolled back transactions too.
The isTxExpired() method should be changed to something like this:
protected boolean isTxExpired(Transaction miTx) throws Exception {
if (miTx != null
&& (miTx.getStatus() == Status.STATUS_MARKED_ROLLBACK || miTx.getStatus() ==
Status.STATUS_ROLLEDBACK)) {
return true;
}
return false;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira