activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jayson Minard (JIRA)" <>
Subject [jira] Updated: (AMQ-1971) ConcurrentModificationException in high volume broker
Date Mon, 13 Oct 2008 06:56:52 GMT


Jayson Minard updated AMQ-1971:

    Attachment: amq1971.patch

I have a tested patch for the ConcurrentModificationException in AMQ-1971, this also uncovered
a bug with a related class.  See below:

Patch to fix ConcurrentModificationException which is caused by not having a perfectly synchronized
this.iterator and this.batchList in AbstractStoreCursor.  Also removed any access to these
member variables from subclasses to ensure they are synchronized and make sure they are not
manipulated seperately.  This caused a small change in TopicStorePrefetch which had a reference
to batchList although it actually overrode the ancestor class which meant that its remove()
method never actually worked.  So that was replaced with a call to AbstractSoreCursor to do
the actual remove work.  A few TODO comments are left in the patch for review by someone that
knows more.

Basically, the fix is to ensure that all changes to batchList cause a release of the cached

> ConcurrentModificationException in high volume broker 
> ------------------------------------------------------
>                 Key: AMQ-1971
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Jayson Minard
>            Assignee: Rob Davies
>         Attachments: amq1971.patch
> This is occurring in the thousands as messages come through.    We have a network of
5 brokers although they do most of their work internally (publisher/consumer for queue are
only on same broker) and do less work crossing to a central broker.
> java.util.ConcurrentModificationException
> 	at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(
> 	at java.util.LinkedHashMap$
> 	at java.util.LinkedHashMap$
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at org.apache.activemq.thread.DeterministicTaskRunner.runTask(
> 	at org.apache.activemq.thread.DeterministicTaskRunner$
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> 	at java.util.concurrent.ThreadPoolExecutor$
> 	at

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

View raw message