Uploaded image for project: 'Openfire (ARCHIVED)'
  1. Openfire (ARCHIVED)
  2. JM-1105

Possible Deadlock When Closing HTTP Sessions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None

      Description

      We just found another HTTP related deadlock in our system. This time no plugins were involved. Please have a look at the thread dump below.

      Regards, Lars

      Found one Java-level deadlock:
      =============================
      "pool-openfire1502":
      waiting to lock monitor 0x00002aaafd6ab5b0 (object 0x00002aaabeb95550, a org.jivesoftware.openfire.http.HttpSession),
      which is held by "pool-openfire182"
      "pool-openfire182":
      waiting to lock monitor 0x00002aaaf4dd4280 (object 0x00002aaabeb957f8, a org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection),
      which is held by "pool-9-thread-546"
      "pool-9-thread-546":
      waiting to lock monitor 0x00002aaafd6ab5b0 (object 0x00002aaabeb95550, a org.jivesoftware.openfire.http.HttpSession),
      which is held by "pool-openfire182"

      Java stack information for the threads listed above:
      ===================================================
      "pool-openfire1502":
      at org.jivesoftware.openfire.http.HttpSession.getLastActivity(HttpSession.java:312)

      • waiting to lock <0x00002aaabeb95550> (a org.jivesoftware.openfire.http.HttpSession)
        at org.jivesoftware.openfire.http.HttpSessionManager$HttpSessionReaper.run(HttpSessionManager.java:291)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
        "pool-openfire182":
        at org.jivesoftware.openfire.net.VirtualConnection.close(VirtualConnection.java:139)
      • waiting to lock <0x00002aaabeb957f8> (a org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection)
        at org.jivesoftware.openfire.http.HttpSession.close(HttpSession.java:130)
      • locked <0x00002aaabeb95550> (a org.jivesoftware.openfire.http.HttpSession)
        at org.jivesoftware.openfire.http.HttpSessionManager$HttpSessionReaper.run(HttpSessionManager.java:293)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
        "pool-9-thread-546":
        at org.jivesoftware.openfire.http.HttpSession.closeConnection(HttpSession.java:636)
      • waiting to lock <0x00002aaabeb95550> (a org.jivesoftware.openfire.http.HttpSession)
        at org.jivesoftware.openfire.http.HttpSession.access$200(HttpSession.java:42)
        at org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection.closeVirtualConnection(HttpSession.java:707)
        at org.jivesoftware.openfire.net.VirtualConnection.close(VirtualConnection.java:144)
      • locked <0x00002aaabeb957f8> (a org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection)
        at org.jivesoftware.openfire.handler.IQAuthHandler.login(IQAuthHandler.java:211)
        at org.jivesoftware.openfire.handler.IQAuthHandler.handleIQ(IQAuthHandler.java:141)
        at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:48)
        at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:300)
        at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)
        at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)
        at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:110)
        at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:67)
        at org.jivesoftware.openfire.http.HttpSession.sendPendingPackets(HttpSession.java:429)
      • locked <0x00002aaabebc3698> (a java.util.LinkedList)
        at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.run(HttpSessionManager.java:311)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)

      Found 1 deadlock.

        Attachments

          Activity

            People

            Assignee:
            alex Alex Wenckus
            Reporter:
            alex Alex Wenckus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: