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

NullPointerException in GMS caused by FD_SOCK

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.1.7, 4.2.13
    • 4.2.12
    • None
    • False
    • False
    • Undefined

    Description

      FD_SOCK passes it's suspected_mbrs collection up in the SUSPECT event instead of making a copy.

      If another thread changes the suspected_mbrs collection while GMS is handling the SUSPECT event, GMS may insert a null element in the Request array, causing a NullPointerException:

      java.lang.NullPointerException
      	at java.base/java.util.Objects.requireNonNull(Objects.java:221)
      	at java.base/java.util.concurrent.ConcurrentLinkedQueue.offer(ConcurrentLinkedQueue.java:355)
      	at java.base/java.util.concurrent.ConcurrentLinkedQueue.add(ConcurrentLinkedQueue.java:283)
      	at org.jgroups.protocols.pbcast.ViewHandler._add(ViewHandler.java:206)
      	at org.jgroups.protocols.pbcast.ViewHandler.add(ViewHandler.java:70)
      	at org.jgroups.protocols.pbcast.GMS.up(GMS.java:853)
      	at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:247)
      	at org.jgroups.stack.Protocol.up(Protocol.java:299)
      	at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:583)
      	at org.jgroups.protocols.FD_SOCK.suspect(FD_SOCK.java:501)
      	at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:261)
      	at org.jgroups.protocols.MERGE3.up(MERGE3.java:281)
      	at org.jgroups.protocols.Discovery.up(Discovery.java:300)
      	at org.jgroups.protocols.TP.passMessageUp(TP.java:1400)
      	at org.jgroups.util.SubmitToThreadPool$SingleLoopbackHandler.run(SubmitToThreadPool.java:72)
      

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-bban Bela Ban
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: