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

KahaDB - Inconsistent error handling on corrupt journal reads

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.14.0
    • Fix Version/s: 5.15.0
    • Component/s: KahaDB, Message Store
    • Labels:
      None

      Description

      When the journal is corrupt, for example if it is overwritten with null or zero. The result of reading from corrupt locations is inconsistent.
      Errors occur but not all result in a trip to the IOExceptionHander where the option to stop the broker is available.
      ClassCastExceptions and RuntimeExceptions can bubble up to the cursors in error.

      ERROR | Failed to page in more queue messages  | org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[XXXXX] Task-300
      java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.activemq.store.kahadb.data.KahaTraceCommand cannot be cast to org.apache.activemq.store.kahadb.data.KahaAddMessageCommand
      	at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.reset(AbstractStoreCursor.java:145)

      or

      ERROR | Failed to load message at: 1084:12816246 | org.apache.activemq.store.kahadb.KahaDBStore | ActiveMQ BrokerService[XXXX] Task-702
      org.apache.activemq.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
      	at org.apache.activemq.protobuf.InvalidProtocolBufferException.invalidTag(InvalidProtocolBufferException.java:48)
      	at org.apache.activemq.protobuf.CodedInputStream.readTag(CodedInputStream.java:75) 

        Attachments

          Activity

            People

            • Assignee:
              gtully Gary Tully
              Reporter:
              gtully Gary Tully
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: