Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-226

Possible race condition between top-down and bottom-up recovery

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 4.2.3.SP4
    • Fix Version/s: 4.2.3.SP8, 4.2.3.CP06, 4.4.0.GA
    • Component/s: JTA
    • Labels:
      None
    • Environment:

      Mac OS X, JDK 1.4.2.

    • Workaround Description:
      Hide

      Re-order the recovery modules so that bottom-up recovery is triggered first. In that way the XAResourceRecovery instances are instantiated.

      <property
      name="com.arjuna.ats.arjuna.recovery.recoveryExtension0" value="com.arjuna.ats.internal.jta.recovery.\
      arjunacore.XARecoveryModule"/>
      <property
      name="com.arjuna.ats.arjuna.recovery.recoveryExtension1" value="com.arjuna.ats.internal.arjuna.recove\
      ry.AtomicActionRecoveryModule"/>
      <property
      name="com.arjuna.ats.arjuna.recovery.recoveryExtension2" value="com.arjuna.ats.internal.txoj.recovery\
      .TORecoveryModule"/>

      Show
      Re-order the recovery modules so that bottom-up recovery is triggered first. In that way the XAResourceRecovery instances are instantiated. <property name="com.arjuna.ats.arjuna.recovery.recoveryExtension0" value="com.arjuna.ats.internal.jta.recovery.\ arjunacore.XARecoveryModule"/> <property name="com.arjuna.ats.arjuna.recovery.recoveryExtension1" value="com.arjuna.ats.internal.arjuna.recove\ ry.AtomicActionRecoveryModule"/> <property name="com.arjuna.ats.arjuna.recovery.recoveryExtension2" value="com.arjuna.ats.internal.txoj.recovery\ .TORecoveryModule"/>

      Description

      In local JTA recovery for non-serializable XAResources, the XAResourceRecovery implementation is needed to obtain a new XAResource. If a new resource isn't obtained (because the XAResourceRecovery instances haven't all been triggered yet), top-down recovery retries on subsequent recovery sweeps. Meanwhile, bottom up recovery can kick in and use an XAResource from a XAResourceRecovery that is now available and fail to locate any information on the transaction that will drive it top-down. Upon failing to find the transaction, it uses presumed abort and rolls back the instance, when in fact it should wait and commit it. But it doesn't do that until several phases have passed, and in which case most of the time top-down recovery will have re-run, found the XAResource and committed the transaction.

      I'm fairly sure this is a race condition and does exist, but am still checking. Work around exists at the moment though.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jhalliday Jonathan Halliday
                  Reporter:
                  marklittle Mark Little
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: