Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2015

KahaDB corruption when sending large message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • JBoss A-MQ 6.3.x
    • JBoss A-MQ 6.2.1, JBoss A-MQ 6.3
    • broker, kahadb
    • None
    • Hide

      In order to reproduce:
      1. Install an out-of-the-box RedHat A-MQ
      2. Activate the admin user in etc/users.properties
      3. In activemq.xml, add the attribute ' checkForCorruptJournalFiles="true" ' to the node broker/persistenceAdapter/kahaDB
      4. Start A-MQ
      5. activemq:producer --user admin --password admin --brokerUrl tcp://localhost:61616 --persistent true --messageSize 34000000 --messageCount 1
      6. Stop A-MQ
      7. Start A-MQ again. The startup fails with error:

      Show
      In order to reproduce: 1. Install an out-of-the-box RedHat A-MQ 2. Activate the admin user in etc/users.properties 3. In activemq.xml, add the attribute ' checkForCorruptJournalFiles="true" ' to the node broker/persistenceAdapter/kahaDB 4. Start A-MQ 5. activemq:producer --user admin --password admin --brokerUrl tcp://localhost:61616 --persistent true --messageSize 34000000 --messageCount 1 6. Stop A-MQ 7. Start A-MQ again. The startup fails with error:

    Description

      When sending a large message (~33MB) to KahaDB that is configured for checkForCorruptJournalFiles="true", it corrupts the KahaDB on the next broker restart.

      The broker raises this error at startup

      14:23:16,374 | ERROR | AMQ-1-thread-1   | ActiveMQServiceFactory           | 231 - io.fabric8.mq.mq-fabric - 1.2.0.redhat-630187 | Exception on start: java.io.IOException: Detected missing/corrupt journal files referenced by:[0:TEST] 1 messages affected.
      java.io.IOException: Detected missing/corrupt journal files referenced by:[0:TEST] 1 messages affected.
      	at org.apache.activemq.store.kahadb.MessageDatabase.recoverIndex(MessageDatabase.java:921)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.MessageDatabase$5.execute(MessageDatabase.java:676)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:779)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.MessageDatabase.recover(MessageDatabase.java:673)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:429)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:447)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:283)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:205)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:223)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:658)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:642)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:607)[219:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]
      	at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.doStart(ActiveMQServiceFactory.java:549)[231:io.fabric8.mq.mq-fabric:1.2.0.redhat-630187]
      	at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.access$400(ActiveMQServiceFactory.java:359)[231:io.fabric8.mq.mq-fabric:1.2.0.redhat-630187]
      	at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration$1.run(ActiveMQServiceFactory.java:490)[231:io.fabric8.mq.mq-fabric:1.2.0.redhat-630187]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_111]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_111]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_111]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_111]
      	at java.lang.Thread.run(Thread.java:745)[:1.7.0_111]
      

      Attachments

        Activity

          People

            gtully@redhat.com Gary Tully
            rhn-support-tmielke Torsten Mielke
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: