Uploaded image for project: 'HornetQ'
  1. HornetQ
  2. HORNETQ-1141

Deadlock involving hornetq-failure-check-thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.2.14.Final, 2.3.0.CR1
    • Fix Version/s: 2.3.0.Final
    • Component/s: Core, Stomp
    • Labels:
      None

      Description

      I get a deadlock (most of the time) when running a following scenario. 1 publisher 2 subscribers on a single non durable topic. Publisher is trying to emit 1,000,000 events as quickly as possible and subscribers are listening to them.
      Payload is approx. 3k of JSON.
      Both publisher and subscribers are using STOMP 1.0

      jstack output:

      Found one Java-level deadlock:
      =============================
      "Thread-28 (HornetQ-server-HornetQServerImpl::serverUUID=3ae97963-7c30-11e2-9079-f37e9800aa9a-421092395)":
      waiting to lock monitor 7fa37403c4d0 (object 7c0369850, a org.hornetq.core.server.impl.ServerSessionImpl),
      which is held by "hornetq-failure-check-thread"
      "hornetq-failure-check-thread":
      waiting to lock monitor 7fa37782bd90 (object 7c03ef5e8, a java.lang.Object),
      which is held by "Thread-28 (HornetQ-server-HornetQServerImpl::serverUUID=3ae97963-7c30-11e2-9079-f37e9800aa9a-421092395)"

      Java stack information for the threads listed above:
      ===================================================
      "Thread-28 (HornetQ-server-HornetQServerImpl::serverUUID=3ae97963-7c30-11e2-9079-f37e9800aa9a-421092395)":
      at org.hornetq.core.server.impl.ServerSessionImpl.commit(ServerSessionImpl.java:622)

      • waiting to lock <7c0369850> (a org.hornetq.core.server.impl.ServerSessionImpl)
        at org.hornetq.core.protocol.stomp.StompSession.sendMessage(StompSession.java:105)
        at org.hornetq.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:798)
        at org.hornetq.core.server.impl.ServerConsumerImpl.handle(ServerConsumerImpl.java:313)
      • locked <7c03ef5e8> (a java.lang.Object)
        at org.hornetq.core.server.impl.QueueImpl.handle(QueueImpl.java:2195)
      • locked <7c0369048> (a org.hornetq.core.server.impl.QueueImpl)
        at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1746)
      • locked <7c0369048> (a org.hornetq.core.server.impl.QueueImpl)
        at org.hornetq.core.server.impl.QueueImpl.access$1100(QueueImpl.java:77)
        at org.hornetq.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:2454)
        at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
        "hornetq-failure-check-thread":
        at org.hornetq.core.server.impl.ServerConsumerImpl.setStarted(ServerConsumerImpl.java:501)
      • waiting to lock <7c03ef5e8> (a java.lang.Object)
        at org.hornetq.core.server.impl.ServerConsumerImpl.close(ServerConsumerImpl.java:329)
        at org.hornetq.core.server.impl.ServerSessionImpl.doClose(ServerSessionImpl.java:306)
      • locked <7c0369850> (a org.hornetq.core.server.impl.ServerSessionImpl)
        at org.hornetq.core.server.impl.ServerSessionImpl.access$100(ServerSessionImpl.java:86)
        at org.hornetq.core.server.impl.ServerSessionImpl$1.done(ServerSessionImpl.java:1053)
        at org.hornetq.core.persistence.impl.journal.OperationContextImpl.executeOnCompletion(OperationContextImpl.java:188)
        at org.hornetq.core.persistence.impl.journal.JournalStorageManager.afterCompleteOperations(JournalStorageManager.java:447)
        at org.hornetq.core.server.impl.ServerSessionImpl.close(ServerSessionImpl.java:1043)
        at org.hornetq.core.server.impl.ServerSessionImpl.connectionFailed(ServerSessionImpl.java:1316)
        at org.hornetq.core.protocol.stomp.StompConnection.callFailureListeners(StompConnection.java:342)
        at org.hornetq.core.protocol.stomp.StompConnection.fail(StompConnection.java:242)
        at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$FailureCheckAndFlushThread.run(RemotingServiceImpl.java:631)

      Found 1 deadlock.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gaohoward Howard Gao
                Reporter:
                bore-plus-plus Dalibor Novak
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: