[JBoss JIRA] Created: (JBREM-1297) Deadlock between MicroRemoteClientInvoker.establishLease and Client.notifyListeners
by Artur Karpinski (JIRA)
Deadlock between MicroRemoteClientInvoker.establishLease and Client.notifyListeners
-----------------------------------------------------------------------------------
Key: JBREM-1297
URL: https://issues.jboss.org/browse/JBREM-1297
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.5.4.SP2
Reporter: Artur Karpinski
Priority: Critical
Deadlock is probably caused by changes introduced in this fix: JBREM-1242.
Thread A:
1. MicroRemoteClientInvoker.terminateLease, locks clientLeaseLock
2. Client.notifyListeners, locks connectionValidatorLock
Thread B:
1. Client.setupClientLease, locks connectionValidatorLock
2. MicroRemoteClientInvoker.establishLease, locks connectionValidatorLock
Please check stacktraces when this deadlock occurred:
{code}
"Timer-16" - Thread t@486453
java.lang.Thread.State: BLOCKED
at org.jboss.remoting.Client.notifyListeners(Client.java:1873)
- waiting to lock <747c39d3> (a java.lang.Object) owned by "WorkManager(2)-241" t@6121
at org.jboss.remoting.LeasePinger.stopPing(LeasePinger.java:134)
at org.jboss.remoting.MicroRemoteClientInvoker.terminateLease(MicroRemoteClientInvoker.java:434)
- locked <751714e> (a java.lang.Object)
at org.jboss.remoting.ConnectionValidator$WaitOnConnectionCheckTimerTask.run(ConnectionValidator.java:1081)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
{code}
and
{code}
"WorkManager(2)-241" - Thread t@6121
java.lang.Thread.State: BLOCKED
at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:507)
- waiting to lock <751714e> (a java.lang.Object) owned by "Timer-16" t@486453
at org.jboss.remoting.Client.setupClientLease(Client.java:2056)
- locked <747c39d3> (a java.lang.Object)
at org.jboss.remoting.Client.connect(Client.java:1918)
at org.jboss.remoting.Client.connect(Client.java:737)
{code}
One way to fix this would be to add lock on connectionValidatorLock in MicroRemoteClientInvoker.terminateLease. I'm trying to analyse code to check if this fix will not introduce another deadlock problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira