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

ConcurrentModificationException in BasicConnectionTable.retainAll

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.6.20
    • Fix Version/s: 2.6.21
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dereed Dennis Reed
                  Reporter:
                  dereed Dennis Reed
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: