Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fixes a deadlock which we observed. (#345)
The call reInviteParticipants triggered by an ICE failure notification resulted in a synchronous call to expireChannels (while holding the lock on #participantLock), followed by an attempt to lock #bridges in inviteParticipant. This fix makes sure that we never lock #bridges first and then #participants. =================================================== "pool-1-thread-1": at org.jitsi.jicofo.JitsiMeetConferenceImpl.reInviteParticipants(JitsiMeetConferenceImpl.java:2426) - waiting to lock <0x0000000700ece2b8> (a java.lang.Object) at org.jitsi.jicofo.JitsiMeetConferenceImpl.onBridgeDown(JitsiMeetConferenceImpl.java:2295) - locked <0x0000000700ece758> (a java.util.LinkedList) at org.jitsi.jicofo.JitsiMeetConferenceImpl.handleEvent(JitsiMeetConferenceImpl.java:2235) at org.jitsi.eventadmin.EventAdminImpl.callEventHandler(EventAdminImpl.java:207) at org.jitsi.eventadmin.EventAdminImpl.access$000(EventAdminImpl.java:34) at org.jitsi.eventadmin.EventAdminImpl$1.run(EventAdminImpl.java:187) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) "Smack-Single Threaded Executor 0 (0)": at org.jitsi.jicofo.JitsiMeetConferenceImpl.inviteParticipant(JitsiMeetConferenceImpl.java:798) - waiting to lock <0x0000000700ece758> (a java.util.LinkedList) at org.jitsi.jicofo.JitsiMeetConferenceImpl.reInviteParticipants(JitsiMeetConferenceImpl.java:2448) - locked <0x0000000700ece2b8> (a java.lang.Object) at org.jitsi.jicofo.JitsiMeetConferenceImpl.reInviteParticipant(JitsiMeetConferenceImpl.java:2414) at org.jitsi.jicofo.JitsiMeetConferenceImpl.onSessionInfo(JitsiMeetConferenceImpl.java:1543) at org.jitsi.protocol.xmpp.AbstractOperationSetJingle.processJingleIQ(AbstractOperationSetJingle.java:349) at org.jitsi.protocol.xmpp.AbstractOperationSetJingle.handleIQRequest(AbstractOperationSetJingle.java:78) at org.jivesoftware.smack.AbstractXMPPConnection$3.run(AbstractXMPPConnection.java:1154) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
- Loading branch information