Bug 979058 - IBM MQ crash recovery - shown error messages on crash at prepare phase
IBM MQ crash recovery - shown error messages on crash at prepare phase
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Transaction Manager (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ER4
: EAP 6.1.1
Assigned To: tom.jenkinson
Depends On:
Blocks: 986047
  Show dependency treegraph
Reported: 2013-06-27 09:52 EDT by Ondrej Chaloupka
Modified: 2013-09-16 16:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-16 16:20:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ondrej Chaloupka 2013-06-27 09:52:07 EDT
When crash recovery is run against IBM MQ broker when the server is halted after prepare method being called on the IBM MQ XA resource then you can find these error messages [1] in the log.

But it seems that these error messages do not have influence the crash recovery functionality. I think that the messages are shown in case that TM calls recovery and there are no xids to recover. I've found the error messages in case that I just start the server with resource adapter configured and I waited some time to recovery was launched.

I think that that this is caused by some change in the transaction manager code base because these messages are not shown for version 4.17.3. For 4.17.4 and 5.0.0 could be caught.

How to reproduce:
1) Checkout crash recovery tests
git clone git://git.app.eng.bos.redhat.com/jbossqe/eap-tests-transactions.git
2) cd eap-tests-transactions/integration/jbossts
3) export JBOSS_HOME=.../jboss-eap-6.1.0.GA
(when you run this for AS7.2 or EAP6.1.0.ER5 you can find yourself not getting the error messages)
4) Run the IBM MQ crash recovery test
mvn clean verify -Djboss.dist=$JBOSS_HOME -Dtest=JMSIBMMQCrashRecoveryTestCase#prepareHalt -Dibmmq -Djbossts.noJTS
5) Check server log for errors
vim integration/jbossts/target/jbossas-jbossts/standalone/log/server.log
The test will download resource adapter and run the test against broker. For more details on app server configuration you can check the integration/jbossts/target/jbossas-jbossts/standalone/configuration/standalone-full.xml file after the test was run or take a look on document https://hurl.corp.redhat.com/56fd5bb under title "IBM WebSphere MQ transaction crash recovery testing for EAP6".

[1] Error messages shown in the log after crash recovery is done
INFO  [org.jboss.as.test.jbossts.common.TestXAResourceRecovered] (Periodic Recovery) TestXAResourceRecovered.recover(i=8388608)
INFO  [org.jboss.as.test.jbossts.common.TestXAResourceRecoveryHelper] (Periodic Recovery) recover()
INFO  [org.jboss.as.test.jbossts.common.TestXAResourceRecoveryHelper] (Periodic Recovery) returning 0 Xids
ERROR [stderr] (Periodic Recovery) javax.transaction.xa.XAException: The method 'xa_rollback' has failed with errorCode '-7'.
ERROR [stderr] (Periodic Recovery)  at com.ibm.mq.jmqi.JmqiXAResource.rollback(JmqiXAResource.java:795)
ERROR [stderr] (Periodic Recovery)  at com.ibm.mq.connector.xa.XARWrapper.rollback(XARWrapper.java:494)
ERROR [stderr] (Periodic Recovery)  at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.rollback(XAResourceWrapperImpl.java:174)
ERROR [stderr] (Periodic Recovery)  at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.handleOrphan(XARecoveryModule.java:741)
ERROR [stderr] (Periodic Recovery)  at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass(XARecoveryModule.java:647)
ERROR [stderr] (Periodic Recovery)  at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:419)
ERROR [stderr] (Periodic Recovery)  at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:194)
ERROR [stderr] (Periodic Recovery)  at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789)
ERROR [stderr] (Periodic Recovery)  at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371)
WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMFAIL: javax.transaction.xa.XAException: The method 'xa_recover' has failed with errorCode '-7'.
 at com.ibm.mq.jmqi.JmqiXAResource.recover(JmqiXAResource.java:749)
 at com.ibm.mq.connector.xa.XARWrapper.recover(XARWrapper.java:461)
 at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:165)
 at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass(XARecoveryModule.java:695) [jbossjts-jacorb-4.17.4.Final-redhat-2.jar:4.17.4.Final-redhat-2]
 at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:419) [jbossjts-jacorb-4.17.4.Final-redhat-2.jar:4.17.4.Final-redhat-2]
 at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:194) [jbossjts-jacorb-4.17.4.Final-redhat-2.jar:4.17.4.Final-redhat-2]
 at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-jacorb-4.17.4.Final-redhat-2.jar:4.17.4.Final-redhat-2]
 at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.4.Final-redhat-2.jar:4.17.4.Final-redhat-2]
Comment 1 tom.jenkinson 2013-06-27 14:46:05 EDT
Comment 2 Ondrej Chaloupka 2013-08-16 12:02:50 EDT
It seems that I put incorrect flags for this issue.
Verified for EAP 6.1.1.ER6. This issue was fixed in 4.17.6.

Tom, are you agree that I can set this jira to verified? I'm asking just because this is not in status ON_QA.
Comment 3 tom.jenkinson 2013-08-19 03:54:26 EDT
Hi Ondra,
I tried to mark the bz as POST:

"For all JBoss bugs, it is mandatory to set the target milestone field to a non-empty value before a bug can be moved past the ASSIGNED state. i.e. to POST, MODIFIED, ON_DEV, ON_QA, VERIFIED or RELEASE_PENDING. "

Comment 4 Ondrej Chaloupka 2013-08-19 04:26:55 EDT
Hi Tom,

I hope that you will agree - I changed the milestone to 6.1.1.GA. What is true as the bug is fixed from 6.1.1.ER4.

Comment 5 tom.jenkinson 2013-08-19 04:32:45 EDT
Thanks Ondra
Comment 6 Ondrej Chaloupka 2013-08-26 01:34:36 EDT
Verified  for EAP 6.1.1.ER6.

Note You need to log in before you can comment on or make changes to this bug.