[ https://issues.apache.org/jira/browse/AMQ-6670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Tully resolved AMQ-6670. ----------------------------- Resolution: Fixed > KahaDB - Inconsistent error handling on corrupt journal reads > ------------------------------------------------------------- > > Key: AMQ-6670 > URL: https://issues.apache.org/jira/browse/AMQ-6670 > Project: ActiveMQ > Issue Type: Bug > Components: KahaDB, Message Store > Affects Versions: 5.14.0 > Reporter: Gary Tully > Assignee: Gary Tully > Fix For: 5.15.0 > > > 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. > {code}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){code} > or {code}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) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)