Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7463 Upgrade JGroups to 2.6.22
  3. JBPAPP-7472

ConcurrentModificationException in BasicConnectionTable.retainAll

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.2.0
    • EAP_EWP 5.1.2
    • Clustering
    • None
    • Release Notes
    • Hide
      A race condition in JGroups could lead to a ConcurrentModificationException in the BasicConnectionTable.retainAll() call. The race condition occurred on the members variable when using the TCP protocol. The appropriate synchronization has been implemented to prevent concurrent access to the variable so that the ConcurrentModificationException can now no longer occur.
      Show
      A race condition in JGroups could lead to a ConcurrentModificationException in the BasicConnectionTable.retainAll() call. The race condition occurred on the members variable when using the TCP protocol. The appropriate synchronization has been implemented to prevent concurrent access to the variable so that the ConcurrentModificationException can now no longer occur.
    • Documented as Resolved Issue
    • NEW

      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
            Eva Kopalova Eva Kopalova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: