Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-3555

Invalid Journal Update Record could break compacting

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.19.1, 2.20.0
    • None
    • None

    Description

      I had a bug in an older version of Artemis, and the newer broker would not be able to open compacting, leading to this exception:

      AMQ142032: Error reading journal file: java.lang.IllegalArgumentException: Keys and values must be >= 0
      at org.apache.activemq.artemis.utils.collections.ConcurrentLongHashSet.checkBiggerEqualZero(ConcurrentLongHashSet.java:428) [artemis-commons-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.utils.collections.ConcurrentLongHashSet.contains(ConcurrentLongHashSet.java:119) [artemis-commons-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.journal.impl.AbstractJournalUpdateTask.containsRecord(AbstractJournalUpdateTask.java:247) [artemis-journal-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.journal.impl.JournalCompactor.onReadUpdateRecordTX(JournalCompactor.java:484) [artemis-journal-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:849) [artemis-journal-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.core.journal.impl.JournalImpl.compact(JournalImpl.java:1868) [artemis-journal-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.commands.tools.journal.CompactJournal.compactJournal(CompactJournal.java:79) [artemis-cli-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.commands.tools.journal.CompactJournal.compactJournals(CompactJournal.java:47) [artemis-cli-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.commands.tools.journal.CompactJournal.execute(CompactJournal.java:38) [artemis-cli-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:157) [artemis-cli-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:105) [artemis-cli-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:132) [artemis-cli-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java.base:]
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [java.base:]
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java.base:]
      at java.base/java.lang.reflect.Method.invoke(Method.java:566) [java.base:]
      at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134) [artemis-boot.jar:2.20.0-SNAPSHOT]
      at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50) [artemis-boot.jar:2.20.0-SNAPSHOT]

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Clebert Suconic made transition -
            Open Closed
            39d 20h 44m 1
            Robbie Gemmell made transition -
            Closed Reopened
            35d 23h 59m 1
            Robbie Gemmell made transition -
            Reopened Closed
            5m 58s 1

            People

              Unassigned Unassigned
              clebertsuconic Clebert Suconic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m