[jboss-jira] [JBoss JIRA] (JGRP-1916) ConcurrentModificationException in FD_ALL
Bela Ban (JIRA)
issues at jboss.org
Thu Feb 26 10:26:50 EST 2015
[ https://issues.jboss.org/browse/JGRP-1916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bela Ban resolved JGRP-1916.
----------------------------
Resolution: Done
Thanks Dan, fixed as suggested
> ConcurrentModificationException in FD_ALL
> -----------------------------------------
>
> Key: JGRP-1916
> URL: https://issues.jboss.org/browse/JGRP-1916
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.6.2
> Reporter: Dan Berindei
> Assignee: Bela Ban
> Fix For: 3.6.3
>
>
> When DEBUG logging is enabled, FD_ALL logs the set of suspected members without proper synchronization. If another thread modifies the {{suspected_mbrs}} set at the same time, it can cause a {{ConcurrentModificationException}} and the {{SUSPECT}} event will be lost.
> {noformat}
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922)
> at java.util.HashMap$KeyIterator.next(HashMap.java:956)
> at java.util.AbstractCollection.toString(AbstractCollection.java:457)
> at java.lang.String.valueOf(String.java:2847)
> at java.lang.StringBuilder.append(StringBuilder.java:128)
> at org.jgroups.protocols.FD_ALL.suspect(FD_ALL.java:368)
> at org.jgroups.protocols.FD_ALL$TimeoutChecker.run(FD_ALL.java:444)
> at org.jgroups.util.TimeScheduler3$Task.run(TimeScheduler3.java:287)
> at org.jgroups.util.TimeScheduler3$RecurringTask.run(TimeScheduler3.java:321)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> I would also suggest adding a synchronized block in {{getSuspectedMembers()}}, {{init()}} and {{stop()}}.
> FD_ALL2 seems to have the same problem.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list