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

Dennis Reed (Issue Comment Edited) (JIRA) jira-events at lists.jboss.org
Wed Dec 7 11:10:40 EST 2011


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

Dennis Reed edited comment on JGRP-1383 at 12/7/11 11:09 AM:
-------------------------------------------------------------

Another manifestation of this race condition:

One or more nodes in a cluster could not create a connection (to a higher IP node) because
the connection is immediately closed.
The root cause appears to be the other node thinks there's already a connection open, while
this node has forgotten about that connection, but not closed it (due to this race condition
happening just before the removeAll call in BasicConnectionTable.retainAll).

                
      
> 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