[jitsi-dev] Deadlock in IceMediaStream/StunStack


#1

Hi,
I've just found a deadlock (not the same as the one you patched very quickly last week).

Here are the stack-traces:
org.ice4j.ice.IceMediaStream.getComponents(S: 225) <---- waiting for components
org.ice4j.ice.IceMediaStream.validListContainsAllComponents(S: 701)
org.ice4j.ice.ConnectivityCheckClient.updateCheckListAndTimerStates(S: 379)
org.ice4j.ice.ConnectivityCheckClient.processTimeout(S: 780)
org.ice4j.stack.StunClientTransaction.run(S: 296) <---- acquires for StunClientTransaction.this
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 615)
java.lang.Thread.run(Thread.java: 722)

org.ice4j.stack.StunClientTransaction.cancel(S: 398) <----- waiting for StunClientTransaction.this
org.ice4j.stack.StunClientTransaction.cancel(S: 409)
org.ice4j.stack.StunStack.cancelTransactionsForAddress(S: 281)
org.ice4j.stack.StunStack.removeSocket(S: 130)
org.ice4j.ice.LocalCandidate.free(S: 281)
org.ice4j.ice.Component.free(S: 832)
org.ice4j.ice.Component.free(S: 815)
org.ice4j.ice.IceMediaStream.free(S: 298) <----- acquires components
org.ice4j.ice.Agent.removeStream(S: 1114)
org.ice4j.ice.Agent.free(S: 2026)

Best Regards
Carl Hasselskog
Co-founder and CEO
Degoo Backup AB
carl@degoo.com<mailto:carl@degoo.com>
Phone: +46 73 070 1821
http://degoo.com<http://degoo.com/>
http://twitter.com/#!/DegooBackup


#2

Thank you very much for the report! We commited revision 402 of ice4j
in response and as a fix. Please let us know how it works for you!


#3

Don't mention it! We are putting it some serious tests write now by running it on thousands of computers with >20 concurrent connections at each computer. I'll let you know if we find any more of these. Deadlocks can be a real pain to find so I fully understand that these have slipped passed the radar.

Thanks for a great library!

Regards
Carl
Degoo

ยทยทยท

-----Original Message-----
From: lubo@sip-communicator.org [mailto:lubo@sip-communicator.org] On Behalf Of Lyubomir Marinov
Sent: den 2 juni 2014 20:45
To: Jitsi Developers
Cc: Carl Hasselskog
Subject: Re: [jitsi-dev] Deadlock in IceMediaStream/StunStack

Thank you very much for the report! We commited revision 402 of ice4j in response and as a fix. Please let us know how it works for you!