Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-1950

Deadlock using temporary queues in Pure Master/Slave setup

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.2.0
    • Component/s: Broker
    • Labels:
      None
    • Environment:

      JBoss 4.0.5 GA with ActiveMQ resource adapter and Java 1.6 update 7

      I used the ActiveMQ 5.2.0 RC1 from 10th september.

      Description

      The deadlock occurs on the slave after sending some 30 messages. Sending a few at a time works fine.
      The test application is a MessageDrivenBean that sends a message to another MDB with a temporary reply queue.

      Name: TempQueue: ID:selten.marketxs.com-40254-1222245868043-0:14:6
      State: WAITING on java.util.concurrent.locks.ReentrantLock$NonfairSync@f30862 owned by: VMTransport: vm://solow.marketxs.com#1
      Total blocked: 0 Total waited: 1

      Stack trace:
      sun.misc.Unsafe.park(Native Method)
      java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:747)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:778)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1114)
      java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
      java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)
      org.apache.activemq.broker.region.Queue.iterate(Queue.java:992)

      • locked org.apache.activemq.broker.region.Queue$2@16b775f
        org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)

      Name: VMTransport: vm://solow.marketxs.com#1
      State: BLOCKED on org.apache.activemq.broker.region.Queue$2@16b775f owned by: TempQueue: ID:selten.marketxs.com-40254-1222245868043-0:14:6
      Total blocked: 9 Total waited: 2,684

      Stack trace:
      org.apache.activemq.broker.region.Queue.iterate(Queue.java:952)
      org.apache.activemq.broker.region.Queue.wakeup(Queue.java:1136)
      org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:249)
      org.apache.activemq.broker.region.TempQueue.addSubscription(TempQueue.java:74)
      org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:275)

      • locked java.lang.Object@1ba2be8
        org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:378)
        org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
        org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
        org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:83)
        org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
        org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:93)
        org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:541)
        org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:345)
        org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
        org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
        org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
        org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
        org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
        org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)

      I'll try to reproduce the issue with a stand-alone JMS client. It also happens without JBoss clustering.

        Attachments

        1. StandaloneApp.java
          5 kB
          Gary Tully
        2. ASF.LICENSE.NOT.GRANTED--deadlock.txt
          39 kB
          Hans Bausewein
        3. ASF.LICENSE.NOT.GRANTED--activemqjee-0.0.4-src.tar.gz
          6 kB
          Hans Bausewein
        4. amq-1950.patch.2.txt
          3 kB
          Gary Tully

          Activity

            People

            • Assignee:
              gtully Gary Tully
              Reporter:
              hansb Hans Bausewein

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment