activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Samplonius (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1264) Kaha crashes after database recovery looking for "data--2"
Date Sun, 24 Jun 2007 06:45:33 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39498
] 

Tom Samplonius commented on AMQ-1264:
-------------------------------------

I tested this again in activemq-5.0-20070621.

I used a Net::Stomp based client to produce 250,000 mesages into a queue.  And then used a
consumer to grab messages.  After consuming 85,000 of the message, I "kill -9" (immediate
exit) the java process, and then started ActiveMQ again.

ActiveMQ starts a Kaha recovery:

INFO  AMQPersistenceAdapter          - Journal Recovery Started from: DataManager:(data-)
INFO  AMQPersistenceAdapter          - Recovered 176328 operations from redo log in 2905.979
seconds.

(which takes a really long time, as you can see)

And it still does this.  This looks like a trivial bug?  It looks someone just appended two
hypens to "data".  Probably because the DataManager starts with "data-" (as logged above),
and then adds "-1" afterwards.

ERROR AsyncDataManager               - Looking for key 1 but not found in fileMap: {2=data-2
number = 2 , length = 33554395 refCount = 0, 4=data-4 number = 4 , length = 3913200 refCount
= 3, 3=data-3 number = 3 , length = 33554195 refCount = 0}
ERROR QueueStorePrefetch             - Failed to fill batch
java.io.IOException: Failed to read to journal for: offset = 28983199, file = 1, size = -1,
type = 0. Reason: java.io.IOException: Could not locate data file data--1
        at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:31)
        at org.apache.activemq.store.amq.AMQPersistenceAdapter.createReadException(AMQPersistenceAdapter.java:541)
        at org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand(AMQPersistenceAdapter.java:421)
...

> Kaha crashes after database recovery looking for "data--2"
> ----------------------------------------------------------
>
>                 Key: AMQ-1264
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1264
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Message Store
>    Affects Versions: 5.0.0
>         Environment: apache-activemq-4.2-20070602
> tom@light:~/activemq$ java -version
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01)
> Java HotSpot(TM) Server VM (build diablo-1.5.0_07-b01, mixed mode)
>            Reporter: Tom Samplonius
>            Assignee: Rob Davies
>
>   There is a problem when using the default persistence settings, and ActiveMQ is shutdown
uncleanly with messages in a queue.  After a restart (and log recovery), and attempt to read
a message out of the queue, generates the following error (and ActiveMQ hangs).
>   It appears that there are too many "-" in a concatenation somewhere, as the logfiles
are "data-1", "data-2", etc, not "data--1", which is probably is what is generating the exception.
>   This is with 4.2-SNAPSHOT-20070602.
> ERROR AsyncDataManager               - Looking for key 1 but not found in fileMap: {3=data-3
number = 3 , length = 9051046 refCount = 3}
> ERROR QueueStorePrefetch             - Failed to fill batch
> java.io.IOException: Failed to read to journal for: offset = 20785811, file = 1, size
= -1, type = 0. Reason: java.io.IOException: Could not locate data file data--1
>         at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:31)
>         at org.apache.activemq.store.amq.AMQPersistenceAdapter.createReadException(AMQPersistenceAdapter.java:529)
>         at org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand(AMQPersistenceAdapter.java:409)
>         at org.apache.activemq.store.amq.AMQMessageStore.getMessage(AMQMessageStore.java:382)
>         at org.apache.activemq.store.amq.RecoveryListenerAdapter.recoverMessageReference(RecoveryListenerAdapter.java:52)
>         at org.apache.activemq.store.kahadaptor.KahaReferenceStore.recover(KahaReferenceStore.java:63)
>         at org.apache.activemq.store.kahadaptor.KahaReferenceStore.recoverNextMessages(KahaReferenceStore.java:89)
>         at org.apache.activemq.store.amq.AMQMessageStore.recoverNextMessages(AMQMessageStore.java:477)
>         at org.apache.activemq.broker.region.cursors.QueueStorePrefetch.fillBatch(QueueStorePrefetch.java:159)
>         at org.apache.activemq.broker.region.cursors.QueueStorePrefetch.hasNext(QueueStorePrefetch.java:110)
>         at org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java:122)
>         at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1007)
>         at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:992)
>         at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:215)
>         at org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:241)
>         at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:341)
>         at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:87)
>         at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:79)
>         at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:87)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:97)
>         at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:566)
>         at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:313)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:282)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188)
>         at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:81)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:119)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompSubscribe(ProtocolConverter.java:351)
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommad(ProtocolConverter.java:149)
>         at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:71)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.IOException: Could not locate data file data--1
>         at org.apache.activemq.kaha.impl.async.AsyncDataManager.getDataFile(AsyncDataManager.java:259)
>         at org.apache.activemq.kaha.impl.async.AsyncDataManager.read(AsyncDataManager.java:477)
>         at org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand(AMQPersistenceAdapter.java:406)
>         ... 30 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message