]
Hayk Hovsepyan updated WFLY-5616:
---------------------------------
Steps to Reproduce:
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
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.
Recovery problem with CMR on MariaDB
-------------------------------------
Key: WFLY-5616
URL:
https://issues.jboss.org/browse/WFLY-5616
Project: WildFly
Issue Type: Bug
Components: Transactions
Affects Versions: 10.0.0.CR4
Reporter: Hayk Hovsepyan
Assignee: Tom Jenkinson
Priority: Blocker
Attachments: datasourcesmariadb.properties, server.log
Transaction recovery fails with error in logs when in transaction
commit-markable-resource is used which is connected to MariaDB.
{code}
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
{code}