Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5616

Recovery problem with CMR on MariaDB

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • None
    • 10.0.0.CR4
    • Transactions
    • None
    • Hide

      Steps to reproduce:
      1) enlist CMR resource
      2) enlist test XA Resource
      3) prepare CMR resource (nothing is written to xids table)
      4) prepare test XA resource
      5) finish 2PC prepare phase by writing everything to log
      7) commit CMR resource
      8) crash JVM
      9) Restart server and call recovery. Recovery run fails with exception and recovery call does not return.
      This scenario works with other databases.

      It can be reproduced by automated case:

      1. Clone the repo: "git clone git://git.app.eng.bos.redhat.com/jbossqe-eap-tests-transactions.git tests-transactions"
      2. Change directory: "cd tests-transactions/jbossts/"
      3. Run test: "mvn clean verify -Djboss.home=$JBOSS_HOME -Djbossts.noJTS -Dds.properties=$PATH_TO_datasourcesmariadb.properties -Dtest=JPACMRCrashRecoveryTestCase#commitHaltAfterCMR"

      "datasourcesmariadb.properties" and TRACE "server.log" are attached.

      Show
      Steps to reproduce: 1) enlist CMR resource 2) enlist test XA Resource 3) prepare CMR resource (nothing is written to xids table) 4) prepare test XA resource 5) finish 2PC prepare phase by writing everything to log 7) commit CMR resource 8) crash JVM 9) Restart server and call recovery. Recovery run fails with exception and recovery call does not return. This scenario works with other databases. It can be reproduced by automated case: 1. Clone the repo: "git clone git://git.app.eng.bos.redhat.com/jbossqe-eap-tests-transactions.git tests-transactions" 2. Change directory: "cd tests-transactions/jbossts/" 3. Run test: "mvn clean verify -Djboss.home=$JBOSS_HOME -Djbossts.noJTS -Dds.properties=$PATH_TO_datasourcesmariadb.properties -Dtest=JPACMRCrashRecoveryTestCase#commitHaltAfterCMR" "datasourcesmariadb.properties" and TRACE "server.log" are attached.
    • The Xids table on MariaDB needs to be created as (xid BINARY(144), transactionManagerID varchar(64), actionuid BINARY(28)

      Transaction recovery fails with error in logs when in transaction commit-markable-resource is used which is connected to MariaDB.

      10:02:14,727 DEBUG [com.arjuna.ats.arjuna] (Listener:4712) Connected to 127.0.0.1 on port 60906 on listener port 4712 for service com.arjuna.ats.internal.arjuna.recovery.WorkerService
      10:02:14,729 DEBUG [com.arjuna.ats.arjuna] (Server.Connection:127.0.0.1:60906) PeriodicRecovery: listener worker interrupts background thread
      10:02:14,729 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) PeriodicRecovery: background thread Status <== SCANNING
      10:02:14,729 INFO  [com.arjuna.ats.arjuna] (Server.Connection:127.0.0.1:60906) ARJUNA012340: RecoveryManager scan scheduled to begin.
      10:02:14,729 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) PeriodicRecovery: background thread scanning
      10:02:14,729 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) Periodic recovery first pass at Mon, 2 Nov 2015 10:02:14
      10:02:14,729 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) CommitMarkableResourceRecordRecoveryModule::periodicWorkFirstPass
      10:02:14,729 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) CommitMarkableResourceRecordRecoveryModule::connecting to: java:jboss/xa-datasources/CrashRecoveryDS
      10:02:14,730 TRACE [com.arjuna.ats.jta] (Periodic Recovery) TransactionSynchronizationRegistryImple.getTransactionKey
      10:02:15,351 ERROR [stderr] (Periodic Recovery) Exception in thread "Periodic Recovery" java.lang.ArrayIndexOutOfBoundsException
      10:02:15,351 ERROR [stderr] (Periodic Recovery)     at java.lang.System.arraycopy(Native Method)
      10:02:15,351 ERROR [stderr] (Periodic Recovery)     at com.arjuna.ats.internal.jta.recovery.arjunacore.CommitMarkableResourceRecordRecoveryModule.periodicWorkFirstPass(CommitMarkableResourceRecordRecoveryModule.java:259)
      10:02:15,351 ERROR [stderr] (Periodic Recovery)     at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:747)
      10:02:15,351 ERROR [stderr] (Periodic Recovery)     at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:375)
      10:06:58,460 TRACE [com.arjuna.ats.arjuna] (Transaction Reaper) ReaperThread.run ()
      10:06:58,460 TRACE [com.arjuna.ats.arjuna] (Transaction Reaper) TransactionReaper::check ()
      10:06:58,460 TRACE [com.arjuna.ats.arjuna] (Transaction Reaper) TransactionReaper::check - comparing 1446455218460
      10:06:58,460 TRACE [com.arjuna.ats.arjuna] (Transaction Reaper) Thread Thread[Transaction Reaper,5,main] sleeping for 9223370590399557347 
      

        1. server.log
          421 kB
          Hayk Hovsepyan
        2. datasourcesmariadb.properties
          2 kB
          Hayk Hovsepyan

            thjenkin@redhat.com Tom Jenkinson
            hhovsepy@redhat.com Hayk Hovsepyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: