[jbossts-issues] [JBoss JIRA] (JBTM-1865) Transaction reported to be rolled back, although committed with one participant

Christian von Kutzleben (JIRA) jira-events at lists.jboss.org
Wed Jul 31 11:10:26 EDT 2013


    [ https://issues.jboss.org/browse/JBTM-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794273#comment-12794273 ] 

Christian von Kutzleben commented on JBTM-1865:
-----------------------------------------------

@Tom:
It turned out now, that closing this ticket was premature.
I have changed the exception to the generic XAException.XAER_RMERR and the symptom is the same.

Mark has argued, that a HeuristicMixedException should be thrown then (see discussion in JBTM-1866), 
but I do still get a EJBTransactionRolledbackException, and one branch is actually committed.

So according to your arguments, that is clearly a bug, and a HeuristicMixedException should be thrown.
Could you please reopen this issue?

Debug output pasted below.

Thank you!

Christian

16:58:48,126 INFO  [stdout] (EJB default - 5) ### prepare called on 1881524688 with < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80954:-38731f8:51f9261d:35, node_name=1, branch_uid=0:ffffc0a80954:-38731f8:51f9261d:37, subordinatenodename=null, eis_name=unknown eis name >
16:58:48,136 INFO  [stdout] (EJB default - 5) ### prepare called on 1088729141 with < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80954:-38731f8:51f9261d:35, node_name=1, branch_uid=0:ffffc0a80954:-38731f8:51f9261d:3a, subordinatenodename=null, eis_name=unknown eis name >
16:58:48,151 INFO  [stdout] (EJB default - 5) ### prepare called on 1710000347 with < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80954:-38731f8:51f9261d:35, node_name=1, branch_uid=0:ffffc0a80954:-38731f8:51f9261d:3d, subordinatenodename=null, eis_name=unknown eis name >

16:58:48,156 INFO  [stdout] (EJB default - 5) ### commit called on 1881524688 with < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80954:-38731f8:51f9261d:35, node_name=1, branch_uid=0:ffffc0a80954:-38731f8:51f9261d:37, subordinatenodename=null, eis_name=unknown eis name >

16:58:52,641 WARN  [com.arjuna.ats.jta] (EJB default - 5) ARJUNA016036: commit on < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80954:-38731f8:51f9261d:35, node_name=1, branch_uid=0:ffffc0a80954:-38731f8:51f9261d:37, subordinatenodename=null, eis_name=unknown eis name > (com.versant.odbms.XAResourceImpl at 7025c9d0) failed with exception $XAException.XAER_RMERR: com.versant.odbms.VersantXAException: Commit error: Network error on database [jpadb1 at localhost].
	at com.versant.odbms.XAResourceImpl.getResult(XAResourceImpl.java:557) [versantjpa-2.0.jar:]
	at com.versant.odbms.XAResourceImpl.commit(XAResourceImpl.java:141) [versantjpa-2.0.jar:]
	at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelCommit(XAResourceRecord.java:451)
	at com.arjuna.ats.arjuna.coordinator.BasicAction.doCommit(BasicAction.java:2732)
	at com.arjuna.ats.arjuna.coordinator.BasicAction.doCommit(BasicAction.java:2648)
	at com.arjuna.ats.arjuna.coordinator.BasicAction.phase2Commit(BasicAction.java:1813)
	at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1504)
	
16:58:52,646 INFO  [stdout] (EJB default - 5) ### rollback called on 1088729141 with < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80954:-38731f8:51f9261d:35, node_name=1, branch_uid=0:ffffc0a80954:-38731f8:51f9261d:3a, subordinatenodename=null, eis_name=unknown eis name >
16:58:52,651 INFO  [stdout] (EJB default - 5) ### rollback called on 1710000347 with < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80954:-38731f8:51f9261d:35, node_name=1, branch_uid=0:ffffc0a80954:-38731f8:51f9261d:3d, subordinatenodename=null, eis_name=unknown eis name >

16:58:52,656 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 5) JBAS014134: EJB Invocation failed on component ReconnectTestBean for method public abstract long com.versant.jpa.j2ee.jboss.beans.ReconnectTestBeanRemote.modifyAndStopDbBeforeCommit(com.versant.jpa.j2ee.jboss.entities.J2EEBook,com.versant.jpa.foundation.Option,int): javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:114) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:94) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:252) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
...
Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
	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.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:91) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
	... 30 more
	


                
> Transaction reported to be rolled back, although committed with one participant
> -------------------------------------------------------------------------------
>
>                 Key: JBTM-1865
>                 URL: https://issues.jboss.org/browse/JBTM-1865
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Transaction Core
>    Affects Versions: 4.17.4
>            Reporter: Christian von Kutzleben
>            Assignee: Tom Jenkinson
>
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, I'll file the second issue shortly and update this ticket accordingly.
> Scenario: 
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the first database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> But now things go awry:
> 1. There is a XAResource.rollback() issued to the second XAResource.
> 2. The client receives a EJBTransactionRolledbackException, although
> one branch has been completed.
> Note, that our database does not support heuristical completion of a branch at all, i.e. there should be no Heuristic* exception be thrown either.
> The correct behavior is, to report the transaction as success to the client, commit all branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossts-issues mailing list