Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1383

ConcurrentModificationException in BasicConnectionTable.retainAll

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.6.21
    • 2.6.20
    • None

      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.

              rhn-support-dereed Dennis Reed
              rhn-support-dereed Dennis Reed
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: