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

Broker Deadlock when limiting size of temp store, and using VirtualTopics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.3.2, 5.4.1
    • None
    • Broker
    • None
    • Mac 10.6.5 (and Linux Centos)

    Description

      When limiting the Temp Table space the broker will dead lock:

      • 1 Producer Thread (own connection) writing to VirtualTopic.FooTwo
        • writes 40000 messages
      • 2 Consumer Threads (each own connection) consuming from Consumer.X.VirtualTopic.FooTwo
        • consumes message (auto ack - but message ack for good measure - delay of 100ms between consumption)

      The dead lock occurs when using the either the KahaDB or ActiveMQPersistence persistence, and seems more related to the KahaDB implementation used for the Temp storage area.

      I shall attach a test jar, which is a executable jar, from which the issue can be replicated (I shall attach a zip of the source too - maven project)

      The tests can be run as:

      • java -classpath 5.4.1-deadlock-jar-with-dependencies.jar bbc.forge.domt.activemq.investigation.KahaDBTempStorageDeadlockReplication54Test

      or

      • java -classpath 5.4.1-deadlock-jar-with-dependencies.jar bbc.forge.domt.activemq.investigation.TempStorageDeadlockReplication54Test

      These classes are also Unit Test Cases.

      • Producer logs to producer.log
      • Consumes log to consumer.log
      • A Monitor thread just run in the background that detail the number of messages sent and consumed... logs to monitor.log
      • tests write to the dir target/activemq-data

      To disable limiting the temp storage add the System property limit.temp=false, i.e.

      • java -Dlimit.temp=false -classpath 5.4.1-deadlock-jar-with-dependencies.jar bbc.forge.domt.activemq.investigation.TempStorageDeadlockReplication54Test

      This seems to be a different/additional issue to AMQ-2475

      thanks in advance, let me know if you need any more information.
      /dom

      Attachments

        1. StoreQueueCursor.patch.txt
          1 kB
          Dominic Tootell
        2. Queue.patch.txt
          1 kB
          Dominic Tootell
        3. FilePendingMessageCursor.patch.txt
          2 kB
          Dominic Tootell
        4. StoreQueueCursor.java
          10 kB
          Dominic Tootell
        5. FilePendingMessageCursor.java
          18 kB
          Dominic Tootell
        6. Queue.java
          85 kB
          Dominic Tootell
        7. activemq-deadlock-replication-541.tar.gz
          6 kB
          Dominic Tootell

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dominict Dominic Tootell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: