Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.x
-
None
-
Solaris, embedded broker, file cursor enabled
Description
In a scenario where a single-consumer queue for non-presistent messages uses a file cursor to manage a backlog, bursts of messages result in NPEs.
Thread dumps for 3 different examples:
2011-09-07 12:43:27,057 ERROR [cursors.FilePendingMessageCursor] [] : [Usage Async Task] Caught an IO Exception getting the DiskList7_PendingCursor:snTableQueue_CHF
java.lang.NullPointerExceptionnull
at java.io.Writer.write(Writer.java:140)null
at java.io.BufferedWriter.newLine(BufferedWriter.java:225)null
at java.util.Properties.writeComments(Properties.java:671)null
at java.util.Properties.store0(Properties.java:805)null
at java.util.Properties.store(Properties.java:796)null
at org.apache.kahadb.page.PageFile.storeMetaData(PageFile.java:570)null
at org.apache.kahadb.page.PageFile.load(PageFile.java:361)null
at org.apache.activemq.store.kahadb.plist.PListStore.intialize(PListStore.java:285)null
at org.apache.activemq.store.kahadb.plist.PListStore.getPList(PListStore.java:218)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.getDiskList(FilePendingMessageCursor.java:457)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.flushToDisk(FilePendingMessageCursor.java:435)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.onUsageChanged(FilePendingMessageCursor.java:388)null
at org.apache.activemq.usage.Usage$1.run(Usage.java:268)null
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)null
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)null
at java.lang.Thread.run(Thread.java: 619)null
Exception in thread "Usage Async Task" java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.getDiskList(FilePendingMessageCursor.java:460)
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.flushToDisk(FilePendingMessageCursor.java:435)
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.onUsageChanged(FilePendingMessageCursor.java:388)
at org.apache.activemq.usage.Usage$1.run(Usage.java:268)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at java.io.Writer.write(Writer.java:140)
at java.io.BufferedWriter.newLine(BufferedWriter.java:225)
at java.util.Properties.writeComments(Properties.java:671)
================================================================
2011-09-07 12:43:40,908 ERROR [cursors.FilePendingMessageCursor] [1315421994681] : [ActiveMQ Transport: tcp:///134.242.171.26:35469]
Caught an IO Exception getting the DiskList 7_PendingCursor:snTableQueue_CHF
java.lang.NullPointerExceptionnull
at org.apache.activemq.store.kahadb.plist.PListStore$1.execute(PListStore.java:229)null
at org.apache.kahadb.page.Transaction.execute(Transaction.java:760)null
at org.apache.activemq.store.kahadb.plist.PListStore.getPLis
t(PListStore.java:225)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.getDiskList(FilePendingMessageCursor.java:457)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.tryAddMessageLast(FilePendingMessageCursor.java:226)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.addMessageLast(FilePendingMessageCursor.java:196)null
at org.apache.activemq.broker.region.Queue.sendMessage(Queue.java:1603)null
at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:715)null
at org.apache.activemq.broker.region.Queue.send(Queue.java:647)null
at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:409)null
at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:543)null
at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:301)null
at o
rg.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)null
at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)null
at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)null
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)null
at org.apache.activemq.security.AuthorizationBroker.send(AuthorizationBroker.java:192)null
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)null
at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)null
at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:468)null
at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:68
1)null
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:316)null
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)null
at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)null
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)null
at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:216)null
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)null
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)null
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)null
at java.lang.Thread.run(Thread.java:619)null
=======================================================================================
2011-09-07 12:43:41,028 ERROR [cursors.FilePendingMessageCursor] [1315421994681] : [ActiveMQ Transport: tcp:///134.242.171.26:35469]
Caught an Exception adding a message: ActiveMQObjectMessage {commandId = 82, responseRequired = false, messageId = ID:lgvn-330
53-1315415867932-0:19:1:1:78, originalDestination = null, originalTransactionId = null, producerId = ID:lgvn-33053-131541586793
2-0:19:1:1, destination = queue://snTableQueue_CHF, transactionId = null, expiration = 0, timestamp = 1315424620840,
arrival = 0, brokerInTime = 1315424620881, brokerOutTime = 0, correlationId = null, replyTo = null, persistent = false, type = null
, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@d42d49, marshalledProperties = org.apache.activemq.util.ByteSequence@1e91c40, dataStructure = null, redeliveryCounter = 0, size = 0, properties =
, readOnlyProperties = false, readOnlyBody = false, droppable = false} first to FilePendingMessageCursor
java.lang.RuntimeException: java.lang.NullPointerExceptionnull
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.getDiskList(FilePendingMessageCursor.java:460)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.tryAddMessageLast(FilePendingMessageCursor.java:226)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.addMessageLast(FilePendingMessageCursor.java:196)null
at org.apache.activemq.broker.region.Queue.sendMessage(Queue.java:1603)null
at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:715)null
at org.apache.activemq.broker.region.Queue.send(Queue.java:647)null
at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:409)null
at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:543)null
at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBrok
er.java:301)null
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)null
at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)null
at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)null
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)null
at org.apache.activemq.security.AuthorizationBroker.send(AuthorizationBroker.java:192)null
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)null
at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)null
at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:468)null
at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)null
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:316)null
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)null
at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)null
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)null
at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:216)null
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)null
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)null
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)null
at java.lang.Thread.run(Thread.java:619)nullCaused by: java.lang.NullPointerExceptionnull
at org.apache.activemq.store.kahadb.plist.PListStore$1.execute(PListStore.java:229)null
at org.apache.kahadb.page.Transaction.execute(Transaction.java:760)null
at org.apache.activemq.store.kahadb.plist.PListStore.getPList(PListStore.java:225)null
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.getDiskList(FilePendingMessageCursor.java:457)null
... 26 morenull