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

ConcurrentModificationException sending notifications in ReplicatedHashMap.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.5.2, 2.6
    • 2.6
    • None

      ReplicatedHashMap does this at line 587;

      for(Notification notif: notifs)
      notif.contentsSet(map);

      which causes a ConcurrentModificationException if the 'notifs' list is being modified during the execution. This class should use an Iterator over the 'notifs' list instead. There are several places where this occurs but this is illustrative.

      2007-11-06 15:47:07,948 ERROR [Multiplexer,udp,192.168.164.229:34526] log.GeronimoLog (GeronimoLog.java:108) - uncaught exception in Thread[Multiplexer,udp,192.168.164.229:34526,10,MultiplexerThreads] (thread group=org.jgroups.util.Util$1[name=JGroups,maxpri=10] )
      java.util.ConcurrentModificationException
      at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
      at java.util.AbstractList$Itr.next(AbstractList.java:343)
      at org.jgroups.blocks.ReplicatedHashMap._putAll(ReplicatedHashMap.java:587)
      at org.jgroups.blocks.ReplicatedHashMap.setState(ReplicatedHashMap.java:716)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:645)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:745)
      at org.jgroups.JChannel.up(JChannel.java:1069)
      at org.jgroups.mux.Multiplexer$Task.run(Multiplexer.java:1026)
      at org.jgroups.mux.Multiplexer$ExecuteTask.run(Multiplexer.java:1050)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)

              rhn-engineering-bban Bela Ban
              rnewson_jira Robert Newson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: