[jboss-jira] [JBoss JIRA] (JGRP-1383) ConcurrentModificationException in BasicConnectionTable.retainAll

Dennis Reed (Commented) (JIRA) jira-events at lists.jboss.org
Thu Nov 3 15:16:47 EDT 2011


    [ https://issues.jboss.org/browse/JGRP-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639834#comment-12639834 ] 

Dennis Reed commented on JGRP-1383:
-----------------------------------

See attached JGRP-1383-test.tgz for test case.
It contains a README with details.

Since this is a race condition, it's difficult to trigger reliably, so I used Byteman to trigger it.  
Because it uses Byteman, I did not check it in the JGroups source.

                
> ConcurrentModificationException in BasicConnectionTable.retainAll
> -----------------------------------------------------------------
>
>                 Key: JGRP-1383
>                 URL: https://issues.jboss.org/browse/JGRP-1383
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 2.6.20
>            Reporter: Dennis Reed
>            Assignee: Dennis Reed
>             Fix For: 2.6.21
>
>         Attachments: JGRP-1383-test.tgz
>
>
> java.util.ConcurrentModificationException
> 	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
> 	at java.util.HashMap$KeyIterator.next(HashMap.java:828)
> 	at java.util.AbstractSet.removeAll(AbstractSet.java:154)
> 	at org.jgroups.blocks.BasicConnectionTable.retainAll(BasicConnectionTable.java:344)
> 	at org.jgroups.protocols.TCP.retainAll(TCP.java:59)
> 	at org.jgroups.protocols.BasicTCP.handleDownEvent(BasicTCP.java:265)
> 	at org.jgroups.protocols.TP.down(TP.java:1145)
>         ...
> BasicTCP is missing a synchoronize on "members" when it passes it to TCP.retainAll.
> If members is modified by another thread (in TP.handleDownEvent) while BasicConnectionTable's Set.removeAll
> call is iterating over it, it triggers a ConcurrentModificationException.

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

        


More information about the jboss-jira mailing list