fjlikun / ice4j

Automatically exported from code.google.com/p/ice4j
0 stars 0 forks source link

Deadlock in ice4j code #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Revision r283 for ice4j fixes a couple of deadlock problems. But when i 
analyzed the code, i see possibilities of introducing deadlock in the fix.

Precisely speaking, the code of concern lies in ConnectivityCheckClient.java

Inside the run() method for class PaceMaker, there is a finally block which has 
a synchronized(this) statement. Since run() method is already synchronized 
method it has lock on the PaceMaker object, and hencesynchronized(this) 
statement on the same object can result in deadlock.

Please help me understand this better. How is the deadlock situation avoided 
here.

What is the expected output? What do you see instead?
We see deadlock of threads for ConnectivityCheckClient.stop

What version of the product are you using? On what operating system?
We are using r300 but the problem was introduced in r283

Original issue reported on code.google.com by amrinder...@gmail.com on 2 Mar 2012 at 11:04

GoogleCodeExporter commented 9 years ago

Original comment by s...@sip-communicator.org on 9 Mar 2012 at 11:04