[jbossts-issues] [JBoss JIRA] (JBTM-3210) Recovery listener gets stuck with processing when unexpected exception happens

Ondrej Chaloupka (Jira) issues at jboss.org
Thu Oct 10 11:19:02 EDT 2019


Ondrej Chaloupka created JBTM-3210:
--------------------------------------

             Summary: Recovery listener gets stuck with processing when unexpected exception happens
                 Key: JBTM-3210
                 URL: https://issues.jboss.org/browse/JBTM-3210
             Project: JBoss Transaction Manager
          Issue Type: Bug
          Components: Recovery
    Affects Versions: 5.9.8.Final
            Reporter: Ondrej Chaloupka
            Assignee: Ondrej Chaloupka


If the recovery is triggered with tx listener by socket call like {{SCAN}} and the recovery process itself finishes with an unexpected exception (e.g. {{IllegalStateException}}) then the listener is not informed about this happens to close and report back to user. This ends up with hanging connection and the stuck {{doRecovery}} call.

The stack trace of the {{ISE}} is like this
{code}
ERROR [stderr] (Periodic Recovery) Exception in thread "Periodic Recovery" java.lang.IllegalArgumentException
  at com.arjuna.ats.internal.jta.transaction.arjunacore.jca.TransactionImporterImple.recoverTransaction(TransactionImporterImple.java:127)
  at com.arjuna.ats.internal.jta.transaction.arjunacore.jca.TransactionImporterImple.recoverTransaction(TransactionImporterImple.java:52)
  at com.arjuna.ats.internal.jta.recovery.arjunacore.SubordinateAtomicActionRecoveryModule.periodicWorkFirstPass(SubordinateAtomicActionRecoveryModule.java:74)
  at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:770)
  at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:382)
{code}

Stuck connection is like this
{code}
"Server.Connection:127.0.0.1:42768" #193 daemon prio=5 os_prio=0 tid=0x00007f9c20002000 nid=0x11ed8 in Object.wait() [0x00007f9dd08f8000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000000d6f5ec08> (a com.arjuna.ats.internal.arjuna.recovery.WorkerService)
	at java.lang.Object.wait(Object.java:502)
	at com.arjuna.ats.internal.arjuna.recovery.WorkerService.doWork(WorkerService.java:101)
	- locked <0x00000000d6f5ec08> (a com.arjuna.ats.internal.arjuna.recovery.WorkerService)
	at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:88)
{code}

Tx listener waits forever as the connection is never flushed (https://github.com/jbosstm/narayana/blob/5.9.8.Final/txbridge/src/test/java/org/jboss/jbossts/txbridge/tests/inbound/junit/InboundCrashRecoveryTests.java#L193)



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jbossts-issues mailing list