activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-3982) Overlapping PList iterators can read wrong data or throw exceptions about chunk streams not existing.
Date Mon, 20 Aug 2012 15:21:37 GMT

    [ https://issues.apache.org/jira/browse/AMQ-3982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437928#comment-13437928
] 

Timothy Bish commented on AMQ-3982:
-----------------------------------

One error that can be seen:

{noformat}
2012-07-24 11:39:05,287 [n.ch] Scheduler] ERROR Queue                          - Problem retrieving
message for browse
java.lang.NullPointerException
	at org.apache.kahadb.index.ListNode.access$200(ListNode.java:37)
	at org.apache.kahadb.index.ListNode$NodeMarshaller.writePayload(ListNode.java:265)
	at org.apache.kahadb.index.ListNode$NodeMarshaller.writePayload(ListNode.java:255)
	at org.apache.kahadb.page.Transaction.store(Transaction.java:248)
	at org.apache.kahadb.index.ListIndex.storeNode(ListIndex.java:326)
	at org.apache.kahadb.index.ListNode.store(ListNode.java:348)
	at org.apache.kahadb.index.ListNode.access$500(ListNode.java:37)
	at org.apache.kahadb.index.ListNode$ListIterator.remove(ListNode.java:227)
	at org.apache.activemq.store.kahadb.plist.PList$PListIterator$1.execute(PList.java:228)
	at org.apache.kahadb.page.Transaction.execute(Transaction.java:765)
	at org.apache.activemq.store.kahadb.plist.PList$PListIterator.remove(PList.java:225)
	at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor$DiskIterator.remove(FilePendingMessageCursor.java:517)
	at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.remove(FilePendingMessageCursor.java:321)
	at org.apache.activemq.broker.region.Queue.doBrowse(Queue.java:1061)
	at org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:804)
	at org.apache.activemq.broker.region.Queue.access$100(Queue.java:91)
	at org.apache.activemq.broker.region.Queue$2.run(Queue.java:131)
	at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
{noformat}

and another:

{noformat}
2012-08-08 20:49:47,918 [n.ch] Scheduler] ERROR Queue - Problem retrieving message for browse
java.util.NoSuchElementException: Chunk stream does not exist, page: 75281 is marked free
at org.apache.kahadb.index.ListNode$ListIterator.getFromNextNode(ListNode.java:165)
at org.apache.kahadb.index.ListNode$ListIterator.hasNext(ListNode.java:176)
at org.apache.activemq.store.kahadb.plist.PList$PListIterator.hasNext(PList.java:204)
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor$DiskIterator.hasNext(FilePendingMessageCursor.java:503)
at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.hasNext(FilePendingMessageCursor.java:297)
at org.apache.activemq.broker.region.Queue.doBrowse(Queue.java:1052)
at org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:804)
at org.apache.activemq.broker.region.Queue.access$100(Queue.java:91)
at org.apache.activemq.broker.region.Queue$2.run(Queue.java:131)
at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.io.EOFException: Chunk stream does not exist, page: 75281 is marked free
at org.apache.kahadb.page.Transaction$2.readPage(Transaction.java:455)
at org.apache.kahadb.page.Transaction$2.<init>(Transaction.java:432)
at org.apache.kahadb.page.Transaction.openInputStream(Transaction.java:429)
at org.apache.kahadb.page.Transaction.load(Transaction.java:405)
at org.apache.kahadb.page.Transaction.load(Transaction.java:362)
at org.apache.kahadb.index.ListIndex.loadNode(ListIndex.java:306)
{noformat}
                
> Overlapping PList iterators can read wrong data or throw exceptions about chunk streams
not existing.
> -----------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3982
>                 URL: https://issues.apache.org/jira/browse/AMQ-3982
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.6.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 5.7.0
>
>
> When multiple PList iterators are in use and happen have an overlapping read of PageFile
data on disk they can reset each others seek offset and cause an exception to be thrown about
"chunk stream does not exist" or read of a page in the Free list.  The reason is that the
hasNext of PList iterator needs to by sync'd on the index lock to prevent two iterators from
entering into a readPage call concurrently.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message