[
http://jira.jboss.com/jira/browse/JBAS-4481?page=comments#action_12365494 ]
Jonathan Halliday commented on JBAS-4481:
-----------------------------------------
I've attached a simple webapp I've been using to look at this issue. It recreate
the problem Gavin sees when running the TS 4.2.3.SP4. It also appears to show the problem
is resolved when running the TS snapshot. If you disagree with this assesment, please
provide an alternative test case.
unpack the exploded .war into server/default/deploy and invoke
http://localhost:8080/test4481/test
output with JBossTS 4.2.3.SP4:
remember this Thread id, we want see the next call is on the same Thread to show it's
reusable
Thread=Thread[http-127.0.0.1-8080-1,5,jboss]
our Thread should be fresh from the pool, with no transaction associated:
app server transaction status (hopefully 6 STATUS_NO_TRANSACTION): 6
transaction manager transaction status (hopefully null): null
setting 2 second tx timeout...
starting a transaction...
app server transaction status (hopefully 0 STATUS_ACTIVE): 0
transaction manager transaction status (hopefully ActionStatus.RUNNING): TransactionImple
< ac, BasicAction: -3f57fffe:898a:46725aaf:3e status: ActionStatus.RUNNING >
sleeping 5 seconds, i.e. long enough for the tx to timeout
app server transaction status (hopefully 4, STATUS_ROLLEDBACK, becuse the timeout has
triggered already) : 4
transaction manager transaction status (hopefully ActionStatus.ABORTED: TransactionImple
< ac, BasicAction: -3f57fffe:898a:46725aaf:3e status: ActionStatus.ABORTED >
trying to resolve the transaction, which we must do because we are the owning thread...
caught an expected exception, since the tx is already resolved (hopefully
java.lang.IllegalStateException)...
java.lang.IllegalStateException:
[com.arjuna.ats.internal.jta.transaction.arjunacore.inactive]
[com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not
active!
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1323)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:163)
at MyServlet.doGet(MyServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
app server transaction status (hopefully 6 STATUS_NO_TRANSACTION becuse the tx is now
cleaned up): 4
transaction manager transaction status (hopefully null): TransactionImple < ac,
BasicAction: -3f57fffe:898a:46725aaf:3e status: ActionStatus.ABORTED >
finished.
(invoke it again)...
remember this Thread id, we want see the next call is on the same Thread to show it's
reusable
Thread=Thread[http-127.0.0.1-8080-1,5,jboss]
our Thread should be fresh from the pool, with no transaction associated:
app server transaction status (hopefully 6 STATUS_NO_TRANSACTION): 4
transaction manager transaction status (hopefully null): TransactionImple < ac,
BasicAction: -3f57fffe:898a:46725aaf:3e status: ActionStatus.ABORTED >
setting 2 second tx timeout...
starting a transaction...
10:25:19,477 INFO [STDOUT] v: 4
10:25:19,478 INFO [STDOUT] v: TransactionImple < ac, BasicAction:
-3f57fffe:898a:46725aaf:3e status: ActionStatus.ABORTED >
10:25:38,814 ERROR [STDERR] javax.transaction.NotSupportedException
10:25:38,815 ERROR [STDERR] at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:79)
10:25:38,815 ERROR [STDERR] at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:77)
10:25:38,816 ERROR [STDERR] at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:124)
output with JBossTS snapshot:
remember this Thread id, we want see the next call is on the same Thread to show it's
reusable
Thread=Thread[http-127.0.0.1-8080-1,5,jboss]
our Thread should be fresh from the pool, with no transaction associated:
app server transaction status (hopefully 6 STATUS_NO_TRANSACTION): 6
transaction manager transaction status (hopefully null): null
setting 2 second tx timeout...
starting a transaction...
app server transaction status (hopefully 0 STATUS_ACTIVE): 0
transaction manager transaction status (hopefully ActionStatus.RUNNING): TransactionImple
< ac, BasicAction: -3f57fffe:b13f:467251ee:7f status: ActionStatus.RUNNING >
sleeping 5 seconds, i.e. long enough for the tx to timeout
app server transaction status (hopefully 4, STATUS_ROLLEDBACK, becuse the timeout has
triggered already) : 4
transaction manager transaction status (hopefully ActionStatus.ABORTED: TransactionImple
< ac, BasicAction: -3f57fffe:b13f:467251ee:7f status: ActionStatus.ABORTED >
trying to resolve the transaction, which we must do because we are the owning thread...
caught an expected exception, since the tx is already resolved (hopefully
java.lang.IllegalStateException)...
java.lang.IllegalStateException:
[com.arjuna.ats.internal.jta.transaction.arjunacore.inactive]
[com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not
active!
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1360)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:163)
at MyServlet.doGet(MyServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
app server transaction status (hopefully 6 STATUS_NO_TRANSACTION becuse the tx is now
cleaned up): 6
transaction manager transaction status (hopefully null): null
finished.
Transaction timeouts leave garbage Status.ROLLEDBACK UserTransaction
object bound to the thread
-----------------------------------------------------------------------------------------------
Key: JBAS-4481
URL:
http://jira.jboss.com/jira/browse/JBAS-4481
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Transaction Manager
Affects Versions: JBossAS-4.2.0.GA
Reporter: Gavin King
Assigned To: Gavin King
Priority: Blocker
Fix For: JBossAS-4.2.1.CR1
Attachments: test4481.tar
If a transaction timeout occurs, the UserTransaction object does not get cleaned up from
the thread, even after the request ends and the thread returns to the pool. Future
requests will not be able to begin() a transaction, since the STATUS_ROLLEDBACK
UserTransaction throws this exception:
Caused by: javax.transaction.NotSupportedException
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:79)
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:77)
at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:124)
at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:29)
This means that any transaction timeout that occurs will leave the application server in
a permanently broken state and require a server restart. Hence 4.2.0.GA is currently
unusable in production!
This needs to be fixed in an immediate patch release.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira