question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deadlock in AbstractAuthAuthority

See original GitHub issue

Description


I’m seeing a deadlock when using the AbstractAuthAuthority code. This seem to happen when there rapid requests to create a conference are being processed. Here is the out put of a thread dump (I can attach the full dump if that would help):

Found one Java-level deadlock:
=============================
"pool-7-thread-17":
  waiting to lock monitor 0x00007f1c780375a8 (object 0x000000070048bdf0, a java.lang.Object),
  which is held by "pool-7-thread-10"
"pool-7-thread-10":
  waiting to lock monitor 0x00007f1c78035ef8 (object 0x0000000782512f08, a java.util.HashMap),
  which is held by "Smack-Single Threaded Executor 0 (0)"
"Smack-Single Threaded Executor 0 (0)":
  waiting to lock monitor 0x00007f1c780375a8 (object 0x000000070048bdf0, a java.lang.Object),
  which is held by "pool-7-thread-10"

Java stack information for the threads listed above:
===================================================
"pool-7-thread-17":
	at org.jitsi.jicofo.auth.AbstractAuthAuthority.processAuthentication(AbstractAuthAuthority.java:347)
	- waiting to lock <0x000000070048bdf0> (a java.lang.Object)
	at org.jitsi.jicofo.xmpp.FocusComponent.processExtensions(FocusComponent.java:292)
	at org.jitsi.jicofo.xmpp.FocusComponent.handleConferenceIq(FocusComponent.java:343)
	at org.jitsi.jicofo.xmpp.FocusComponent.handleIQSetImpl(FocusComponent.java:221)
	at org.jitsi.xmpp.component.ComponentBase.handleIQSet(ComponentBase.java:362)
	at org.xmpp.component.AbstractComponent.processIQRequest(AbstractComponent.java:515)
	at org.xmpp.component.AbstractComponent.processIQ(AbstractComponent.java:289)
	at org.xmpp.component.AbstractComponent.processQueuedPacket(AbstractComponent.java:239)
	at org.xmpp.component.AbstractComponent.access$100(AbstractComponent.java:81)
	at org.xmpp.component.AbstractComponent$PacketProcessor.run(AbstractComponent.java:1051)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
"pool-7-thread-10":
	at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.getMembers(ChatRoomImpl.java:597)
	- waiting to lock <0x0000000782512f08> (a java.util.HashMap)
	at org.jitsi.jicofo.ChatRoomRoleAndPresence.jidAuthenticated(ChatRoomRoleAndPresence.java:313)
	at org.jitsi.jicofo.auth.AbstractAuthAuthority.notifyUserAuthenticated(AbstractAuthAuthority.java:336)
	at org.jitsi.jicofo.auth.AbstractAuthAuthority.authenticateJidWithSession(AbstractAuthAuthority.java:413)
	at org.jitsi.jicofo.auth.XMPPDomainAuthAuthority.processAuthLocked(XMPPDomainAuthAuthority.java:98)
	at org.jitsi.jicofo.auth.AbstractAuthAuthority.processAuthentication(AbstractAuthAuthority.java:347)
	- locked <0x000000070048bdf0> (a java.lang.Object)
	at org.jitsi.jicofo.xmpp.FocusComponent.processExtensions(FocusComponent.java:292)
	at org.jitsi.jicofo.xmpp.FocusComponent.handleConferenceIq(FocusComponent.java:343)
	at org.jitsi.jicofo.xmpp.FocusComponent.handleIQSetImpl(FocusComponent.java:221)
	at org.jitsi.xmpp.component.ComponentBase.handleIQSet(ComponentBase.java:362)
	at org.xmpp.component.AbstractComponent.processIQRequest(AbstractComponent.java:515)
	at org.xmpp.component.AbstractComponent.processIQ(AbstractComponent.java:289)
	at org.xmpp.component.AbstractComponent.processQueuedPacket(AbstractComponent.java:239)
	at org.xmpp.component.AbstractComponent.access$100(AbstractComponent.java:81)
	at org.xmpp.component.AbstractComponent$PacketProcessor.run(AbstractComponent.java:1051)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
"Smack-Single Threaded Executor 0 (0)":
	at org.jitsi.jicofo.auth.AbstractAuthAuthority.findSessionForJabberId(AbstractAuthAuthority.java:226)
	- waiting to lock <0x000000070048bdf0> (a java.lang.Object)
	at org.jitsi.jicofo.auth.AbstractAuthAuthority.getSessionForJid(AbstractAuthAuthority.java:251)
	at org.jitsi.jicofo.ChatRoomRoleAndPresence.checkGrantOwnerToAuthUser(ChatRoomRoleAndPresence.java:294)
	at org.jitsi.jicofo.ChatRoomRoleAndPresence.memberPresenceChanged(ChatRoomRoleAndPresence.java:146)
	at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.lambda$notifyMemberJoined$32(ChatRoomImpl.java:915)
	at org.jitsi.impl.protocol.xmpp.ChatRoomImpl$$Lambda$7/204059536.accept(Unknown Source)
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890)
	at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.notifyMemberJoined(ChatRoomImpl.java:915)
	at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.processOtherPresence(ChatRoomImpl.java:1198)
	- locked <0x0000000782512f08> (a java.util.HashMap)
	at org.jitsi.impl.protocol.xmpp.ChatRoomImpl.processPresence(ChatRoomImpl.java:1239)
	at org.jivesoftware.smackx.muc.MultiUserChat$3.processStanza(MultiUserChat.java:251)
	at org.jivesoftware.smack.AbstractXMPPConnection$5.run(AbstractXMPPConnection.java:1229)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Found 1 deadlock.

Current behavior


deadlock. And jicofo needs to be restarted.

Expected Behavior


Possible Solution


Steps to reproduce


request create conference requests rapidly.

Environment details


Using build 417 of jicofo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
paweldomascommented, Oct 9, 2018

The Pr is in review and should be merged this week.

0reactions
paweldomascommented, Oct 16, 2018

The fix is in the master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MF69538 - LIC-OTHER-WAIT DEADLOCK IN SEIZE HANDLING IN ...
Abstract LIC-OTHER-WAIT DEADLOCK IN SEIZE HANDLING IN AUTHORITY CHECK Pre/Co-Requisite PTF / Fix List REQ LICENSED PTF/FIX LEVEL.
Read more >
Avoiding Policy-based Deadlocks in Business Processes
Abstract. In the field of business process management, deadlocks describe a situation where a workflow execution is blocked and cannot be completed.
Read more >
Efficient Deadlock Detection for Concurrent Systems - [Verimag]
Abstract —Concurrent systems are prone to deadlocks that ... We propose here a new algorithm for deadlock detection ... non−authorized validate authorized.
Read more >
11. Authorization - Spring
These represent the authorities that have been granted to the principal. the GrantedAuthority objects are inserted into the Authentication object by the ...
Read more >
User Manual for Rodin v.2.2: First Refinement
Now we are going to detail the main complexity of our model: the deadlock ... there is the authorization to be in l...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found