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

ConcurrentModificationException in ActiveMQ Journal Checkpoint Worker

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.4.2
    • 5.5.0
    • Message Store
    • None
    • CentOS 5.2

    Description

      There appears to be a race condition accessing Journal.getHashMap() from the ActiveMQ Journal Checkpoint Worker thread. Under high loads, we occasionally see the following exception in our logs:

      Exception in thread "ActiveMQ Journal Checkpoint Worker" java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
      at java.util.HashMap$EntryIterator.next(HashMap.java:834)
      at java.util.HashMap$EntryIterator.next(HashMap.java:832)
      at java.util.AbstractMap.putAll(AbstractMap.java:255)
      at java.util.TreeMap.putAll(TreeMap.java:304)
      at java.util.TreeMap.<init>(TreeMap.java:162)
      at org.apache.kahadb.journal.Journal.getFileMap(Journal.java:660)
      at org.apache.activemq.store.kahadb.MessageDatabase.checkpointUpdate(MessageDatabase.java:970)
      at org.apache.activemq.store.kahadb.MessageDatabase.access$400(MessageDatabase.java:82)
      at org.apache.activemq.store.kahadb.MessageDatabase$9.execute(MessageDatabase.java:599)
      at org.apache.kahadb.page.Transaction.execute(Transaction.java:728)
      at org.apache.activemq.store.kahadb.MessageDatabase.checkpointCleanup(MessageDatabase.java:597)
      at org.apache.activemq.store.kahadb.MessageDatabase$3.run(MessageDatabase.java:249)

      This leads to the thread aborting prematurely.

      Attachments

        Issue Links

          Activity

            People

              gtully Gary Tully
              ccondit Craig Condit
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: