[jbossts-issues] [JBoss JIRA] (JBTM-3111) Periodic recovery thread and thread terminating transaction manager can deadlock

Ondra Chaloupka (Jira) issues at jboss.org
Fri Feb 15 10:29:00 EST 2019


Ondra Chaloupka created JBTM-3111:
-------------------------------------

             Summary: Periodic recovery thread and thread terminating transaction manager can deadlock
                 Key: JBTM-3111
                 URL: https://issues.jboss.org/browse/JBTM-3111
             Project: JBoss Transaction Manager
          Issue Type: Bug
          Components: Recovery
    Affects Versions: 5.9.2.Final
            Reporter: Ondra Chaloupka
            Assignee: Ondra Chaloupka


The fix for issue WFLY-10841, which was causing the WFLY was not cleanly finished, brought potential dead lock on threads of periodic recovery and the thread terminating the transaction manager.

When looking to WFLY-10841 the thread dump talks about

{code}
"Periodic Recovery":
	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.setScanState(XARecoveryModule.java:1088)
	- waiting to lock <0xc8f80918> (a java.util.concurrent.atomic.AtomicInteger)
	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:240)
	- locked <0xc8f64470> (a com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule)
	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:816)
	at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:382)

"ServerService Thread Pool -- 8":
	at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.removeXAResourceRecoveryHelper(XARecoveryModule.java:119)
	- waiting to lock <0xc8f64470> (a com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule)
	- locked <0xc8f80918> (a java.util.concurrent.atomic.AtomicInteger)
	at com.arjuna.ats.jbossatx.jta.RecoveryManagerService.removeXAResourceRecovery(RecoveryManagerService.java:129)
	at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryRegistryImpl.removeXAResourceRecovery(XAResourceRecoveryRegistryImpl.java:63)
	at org.jboss.as.connector.subsystems.datasources.XaDataSourceService.stopService(XaDataSourceService.java:66)
	- locked <0xc8f95a38> (a org.jboss.as.connector.subsystems.datasources.XaDataSourceService)
	at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:188)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
	at java.lang.Thread.run(Thread.java:748)
	at org.jboss.threads.JBossThread.run(JBossThread.java:485)
{code}

We need to avaoid this dead lock.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jbossts-issues mailing list