[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1429) ConcurrentModificationException is thrown from JBM MessagingQueue.java
Mr. Overlord (JIRA)
jira-events at lists.jboss.org
Fri Oct 31 02:43:20 EDT 2008
[ https://jira.jboss.org/jira/browse/JBMESSAGING-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12436429#action_12436429 ]
Mr. Overlord commented on JBMESSAGING-1429:
-------------------------------------------
Hello All.
This problem revealed itself (to me) on an 8 node cluster.
With a 4 node cluster, I could not reproduce it.
I would imagine the more nodes you have the easier it is to reproduce it - try it with a 10+ node cluster.
I fixed this problem by modifying org.jboss.messaging.core.impl.MessagingQueue.
I replaced this line:
suckers = new HashSet();
With this one:
suckers = new org.jboss.messaging.util.ConcurrentHashSet();
That fixed it for me.
> ConcurrentModificationException is thrown from JBM MessagingQueue.java
> ----------------------------------------------------------------------
>
> Key: JBMESSAGING-1429
> URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1429
> Project: JBoss Messaging
> Issue Type: Bug
> Affects Versions: 1.4.0.SP3.CP02
> Environment: Sybase ASE 15.02, JDBC Driver jTDS 1.2.1, JBoss-EAP-4.3_CP1, JDK -1.5.0_10
> Reporter: Tyronne Wickramarathne
> Assignee: Tim Fox
> Fix For: 1.4.0.SP3.CP05
>
>
> 2008-10-08 17:57:44,955 [WorkerThread#18[10.0.15.102:49566]] ERROR org.jboss.messaging.util.ExceptionUtil - ConsumerEndpoint[g7-swt4i2mf-1-8mfqh2mf-h5u36p-x2f0a] close [i7-rwu4i2mf-1-8mfqh2mf-h5u36p-x2f0a]
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$KeyIterator.next(HashMap.java:877)
> I couldn't reproduce this problem locally. However, I have noted the code segment which leads to this problem. This exception is thrown when unregisterSucker() or registerSucker() is called by the time the HashSet containing suckers are iterated. Replacing the HashSet with ConcurrentHashMap is the easiest fix it seems though the other approach is to use synchronized(lock) in the informSuckers().
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list