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

JTS: EIS can't recover transaction when heuristic outcome happens

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 7.1.0.DR9
    • 7.1.0.DR6
    • Transactions
    • None
    • Hide

      Crashrecovery testsuite could be used for reproducing the issue (the method rmerrWithRecovery at org.jboss.as.test.jbossts.crashrec.jca.test.JcaInflowTransactionTestCase needs to be unignored

      mvn clean verify -am -pl jbossts -DfailIfNoTests=false -fn -Djbossts.noJTA -Dtest=JcaInflowTransactionTestCase#rmerrWithRecovery
      
      Show
      Crashrecovery testsuite could be used for reproducing the issue (the method rmerrWithRecovery at org.jboss.as.test.jbossts.crashrec.jca.test.JcaInflowTransactionTestCase needs to be unignored mvn clean verify -am -pl jbossts -DfailIfNoTests= false -fn -Djbossts.noJTA -Dtest=JcaInflowTransactionTestCase#rmerrWithRecovery

    Description

      I hit a trouble similar to JBEAP-5638 but in this case for JTS. I'm not able to recover heuristic transaction for scenario

      • test client sends prepare command
      • test client sends commit command
      • first XAResource commits, secondXAResource throws XAException#XAER_RMERR on commit start
      • test client gets error code XAException#XA_HEURMIX
      • now the transaction participant is in heuristic state
      • tried to commit the created txn -> fails as in heuristic and can't be operated
      • using :recover command for the transaction participant
      • tried to commit the txn -> expecting the commit succeed and txn is committed

      There are two troubles. First is NullPointerException is thrown during a try to commit transaction in heuristic state [1].
      Second is not possible to read transaction participant from object store via jboss-cli commands (even when expose-all-logs is used) and that way it's not possible to call recover the participant in heuristic state.

      [1]

      2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1) java.lang.NullPointerException2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)  
       at com.arjuna.ats.internal.jta.transaction.jts.subordinate.jca.SubordinateAtomicTransaction.getXid(SubordinateAtomicTransaction.java:80)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at com.arjuna.ats.internal.jta.transaction.jts.subordinate.jca.TransactionImple.baseXid(TransactionImple.java:126)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)  at com.arjuna.ats.internal.jta.transaction.jts.jca.TransactionImporterImple.getImportedTransaction(TransactionImporterImple.java:135)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple.commit(XATerminatorImple.java:83)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at org.jboss.as.test.jbossts.crashrec.jca.rar.TestResourceTxnWorkUnit.run(Unknown Source)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:223)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at java.lang.Thread.run(Thread.java:745)2016-10-05 16:19:23,537 ERROR [stderr] (default-threads - 1)
        at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      2016-10-05 16:19:23,538 ERROR [org.jboss.as.test.jbossts.crashrec.jca.rar.TestResourceTxnWorkUnit] (default-threads - 1) Unspecified sever exception: java.lang.NullPointerException at com.arjuna.ats.internal.jta.transaction.jts.subordinate.jca.TransactionImple.recover(TransactionImple.java:135)
       at com.arjuna.ats.internal.jta.transaction.jts.jca.TransactionImporterImple.getImportedTransaction(TransactionImporterImple.java:141)
       at com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple.commit(XATerminatorImple.java:83) at org.jboss.as.test.jbossts.crashrec.jca.rar.TestResourceTxnWorkUnit.run(Unknown Source) at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:223)
       at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)
       at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
       at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)
       at java.lang.Thread.run(Thread.java:745)
       at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      

      [2]

      [standalone@localhost:42042 /] /subsystem=transactions/log-store=log-store:read-resource(recursive=true, include-runtime=true)
      {
          "outcome" => "success",
          "result" => {
              "expose-all-logs" => false,
              "type" => "default",
              "transactions" => undefined
          }
      }
      [standalone@localhost:42042 /] /subsystem=transactions/log-store=log-store:write-attribute(name=expose-all-logs, value=true)
      {
          "outcome" => "success",
          "result" => undefined
      }
      [standalone@localhost:42042 /] /subsystem=transactions/log-store=log-store:probe()
      {"outcome" => "success"}
      [standalone@localhost:42042 /] /subsystem=transactions/log-store=log-store:read-resource(recursive=true, include-runtime=true)
      {
          "outcome" => "success",
          "result" => {
              "expose-all-logs" => true,
              "type" => "default",
              "transactions" => {
                  "0:ffff7f000001:3716dcba:57f50b7d:14" => {
                      "age-in-seconds" => undefined,
                      "id" => "0:ffff7f000001:3716dcba:57f50b7d:14",
                      "jmx-name" => undefined,
                      "type" => "Recovery/FactoryContact",
                      "participants" => undefined
                  },
                  "0:ffff7f000001:3716dcba:57f50b7d:28" => {
                      "age-in-seconds" => undefined,
                      "id" => "0:ffff7f000001:3716dcba:57f50b7d:28",
                      "jmx-name" => undefined,
                      "type" => "StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple/ServerTransaction/JCA",
                      "participants" => undefined
                  },
                  "0:ffff52e38d0c:c91:4140398c:0" => {
                      "age-in-seconds" => undefined,
                      "id" => "0:ffff52e38d0c:c91:4140398c:0",
                      "jmx-name" => undefined,
                      "type" => "RecoveryCoordinator",
                      "participants" => undefined
                  }
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              thjenkin@redhat.com Tom Jenkinson
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Ondrej Chaloupka Ondrej Chaloupka (Inactive)
              Ondrej Chaloupka Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: