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

NPE during FIND_MBRS when using shared transport

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 3.5
    • 3.5
    • None

      The following code within org.jgroups.protocols.TP.sendToSingleMember(...) throws an NPE if the transport is shared:

          Responses responses=(Responses)up(new Event(Event.FIND_MBRS, Arrays.asList(dest)));
          try {
              for(PingData data : responses) {
                  if(data.getAddress() != null && data.getAddress().equals(dest)) {
                      if((physical_dest=data.getPhysicalAddr()) != null) {
                          sendUnicast(physical_dest, buf, offset, length);
                          return;
                      }
                  }
              }
          }
          finally {
              responses.done();
          }
      

      This is because up(Event) always returns null when using a shared transport.
      The same issue affects org.jgroups.protocols.TP.fetchPhysicalAddrs(...):

          if(!missing.isEmpty()) {
              Responses rsps=(Responses)up(new Event(Event.FIND_MBRS, missing));
              rsps.done();
          }
      

              rhn-engineering-bban Bela Ban
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: