[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-dev
Subject:    [jira] [Comment Edited] (AMQ-3982) Overlapping PList iterators can read wrong data or throw exceptio
From:       "Gary Tully (JIRA)" <jira () apache ! org>
Date:       2012-08-30 16:06:07
Message-ID: 344605231.16976.1346342767905.JavaMail.jiratomcat () arcas
[Download RAW message or body]


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

Gary Tully edited comment on AMQ-3982 at 8/31/12 3:04 AM:
----------------------------------------------------------

a variant of the concurrent add iterate test that fails.

Syncing all updates, seeks and writes in pagefile should resolve, but there is \
somehting more: {code}
synchronized (this) {
  readFile.seek(toOffset(pageId))
  readFile.readFully(data);
}
...
synchronized (this) {
  writeFile.seek(toOffset(w.page.getPageId()));
  writeFile.write(w.getDiskBound(), 0, pageSize);
}{code}
                
      was (Author: gtully):
    a variant of the concurrent add iterate test that fails
                  
> 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
> 
> Attachments: new.txt
> 
> 
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic