Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-15922

XA transaction Rollback fails with MSSQL database

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.2.0.GA
    • None
    • None
    • Hide

      1) Download our testsuite: https://gitlab.mw.lab.eng.bos.redhat.com/istraka/tests-transactions
      2) install all artifacts:
      mvn clean install -Dmaven.test.skip.exec=true
      3) Run the test JPAInjectedFailureTestCase

      mvn clean verify -Djboss.dist=/path/jboss-eap-7.2 -Dtest=JPAInjectedFailureTestCase -Dds0.db=mssql2016 -Dds0.jdbc.driver.jar=mssql-jdbc-6.4.0.jre8.jar -Dds0.jdbc.driver.class=com.microsoft.sqlserver.jdbc.SQLServerDriver -Dds0.jdbc.xa-class=com.microsoft.sqlserver.jdbc.SQLServerXADataSource -Dds0.jdbc.driver.path=/path/mssql-jdbc-6.4.0.jre8.jar -Dds0.hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect -Dds0.db.name=crashrec -Dds0.user=crashrec -Dds0.pass=crashrec '-Dds0.jdbc.url=jdbc:sqlserver://mssql-2016.rhev-ci-vms.eng.rdu2.redhat.com:1433;DatabaseName=crashrec' -Dskip-download-sources -U -B -Dmaven.test.failure.ignore=true -Dsurefire.test.failure.ignore=true -fn -Dsurefire.rerunFailingTestsCount=1 -Dsurefire.forked.process.timeout=0 -Dproxy.port=12345 -Dts.jbossts1.node.identifier=NZFO -Dts.jbossts2.node.identifier=hQvt -Dts.jbossts3.node.identifier=vNag

      Show
      1) Download our testsuite: https://gitlab.mw.lab.eng.bos.redhat.com/istraka/tests-transactions 2) install all artifacts: mvn clean install -Dmaven.test.skip.exec=true 3) Run the test JPAInjectedFailureTestCase mvn clean verify -Djboss.dist=/path/jboss-eap-7.2 -Dtest=JPAInjectedFailureTestCase -Dds0.db=mssql2016 -Dds0.jdbc.driver.jar=mssql-jdbc-6.4.0.jre8.jar -Dds0.jdbc.driver.class=com.microsoft.sqlserver.jdbc.SQLServerDriver -Dds0.jdbc.xa-class=com.microsoft.sqlserver.jdbc.SQLServerXADataSource -Dds0.jdbc.driver.path=/path/mssql-jdbc-6.4.0.jre8.jar -Dds0.hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect -Dds0.db.name=crashrec -Dds0.user=crashrec -Dds0.pass=crashrec '-Dds0.jdbc.url=jdbc:sqlserver://mssql-2016.rhev-ci-vms.eng.rdu2.redhat.com:1433;DatabaseName=crashrec' -Dskip-download-sources -U -B -Dmaven.test.failure.ignore=true -Dsurefire.test.failure.ignore=true -fn -Dsurefire.rerunFailingTestsCount=1 -Dsurefire.forked.process.timeout=0 -Dproxy.port=12345 -Dts.jbossts1.node.identifier=NZFO -Dts.jbossts2.node.identifier=hQvt -Dts.jbossts3.node.identifier=vNag

      When injecting arbitrary failures to transaction processing, the XA transaction fails rollback when using SQL Server driver.
      The following Exception is raised:

      2018-11-19 20:21:06,687 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff7f000001:-63a5f4f9:5bf30be2:4e in state  CANCEL_INTERRUPTED
      2018-11-19 20:21:06,690 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012120: TransactionReaper::check worker Thread[Transaction Reaper Worker 0,5,main] not responding to interrupt when cancelling TX 0:ffff7f000001:-63a5f4f9:5bf30be2:4e -- worker marked as zombie and TX scheduled for mark-as-rollback
      2018-11-19 20:21:36,135 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-8) SQL Error: 1206, SQLState: S00045
      2018-11-19 20:21:36,135 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-8) The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.
      2018-11-19 20:21:36,136 INFO  [org.hibernate.event.internal.DefaultLoadEventListener] (default task-8) HHH000327: Error performing load command : org.hibernate.exception.SQLGrammarException: could not load an entity: [org.jboss.as.test.jbossts.crashrec.jpa.TestEntity#inject_fail_on_commit_rollback]
      2018-11-19 20:21:36,302 WARN  [com.arjuna.ats.jta] (Transaction Reaper Worker 0) ARJUNA016045: attempted rollback of < formatId=131077, gtrid_length=32, bqual_length=36, tx_uid=0:ffff7f000001:-63a5f4f9:5bf30be2:4e, node_name=NZFO, branch_uid=0:ffff7f000001:-63a5f4f9:5bf30be2:52, subordinatenodename=null, eis_name=java:jboss/xa-datasources/CrashRecoveryDS > (XAResourceWrapperImpl@2b6644e6[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@6d4525ef pad=false overrideRmValue=false productName=Microsoft SQL Server productVersion=13.00.4001 jndiName=java:jboss/xa-datasources/CrashRecoveryDS]) failed with exception code XAException.XAER_NOTA: javax.transaction.xa.XAException: The function ROLLBACK: failed. The status is: -4. Error: "*** SQLJDBC_XA DTC_ERROR Context: xa_rollback, state=1, StatusCode:-4 (0xFFFFFFFC) ***"
              at com.microsoft.sqlserver.jdbc.SQLServerXAResource.DTC_XA_Interface(SQLServerXAResource.java:652)
              at com.microsoft.sqlserver.jdbc.SQLServerXAResource.rollback(SQLServerXAResource.java:803)
              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.rollback(XAManagedConnection.java:357)
              at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.rollback(XAResourceWrapperImpl.java:196)
              at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:362)
              at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:3023)
              at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:3002)
              at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1674)
              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:124)
              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)
      

              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              fmarchio@redhat.com Francesco Marchioni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: