Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-890

NullPointerException when merging views

    Details

    • Estimated Difficulty:
      Low

      Description

      NPR is thrown in the following method of JGroupsTransport:

      private boolean needsToRejoin(View v) {
      if (v instanceof MergeView) {
      MergeView mv = (MergeView) v;
      org.jgroups.Address coord = v.getMembers().get(0);
      View winningPartition = null;
      for (View p : mv.getSubgroups()) {
      if (p.getMembers().get(0).equals(coord))

      { winningPartition = p; break; }

      }

      if (Unable to render embedded object: File (winningPartition.containsMember(channel.getAddress())) return true; //) not found.!! here is where NPE is thrown
      }
      return false;
      }

      Here is the stack:

      2011-01-24 15:14:01,842 ERROR [org.jgroups.protocols.pbcast.NAKACK] (Incoming-1,Infinispan-Cluster,NodeE-9505) couldn't deliver message [dst: <null>, src: NodeE-9505 (3 headers), size=0 bytes]
      java.lang.NullPointerException
      at org.infinispan.remoting.transport.jgroups.JGroupsTransport.needsToRejoin(JGroupsTransport.java:521)
      at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$000(JGroupsTransport.java:88)
      at org.infinispan.remoting.transport.jgroups.JGroupsTransport$NotifyMerge.emitNotification(JGroupsTransport.java:465)
      at org.infinispan.remoting.transport.jgroups.JGroupsTransport.viewAccepted(JGroupsTransport.java:502)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:728)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:771)
      at org.jgroups.JChannel.up(JChannel.java:1466)
      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:953)
      at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:440)
      at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:262)
      at org.jgroups.protocols.FRAG2.up(FRAG2.java:189)
      at org.jgroups.protocols.FC.up(FC.java:502)
      at org.jgroups.protocols.pbcast.GMS.installView(GMS.java:596)
      at org.jgroups.protocols.pbcast.CoordGmsImpl.handleViewChange(CoordGmsImpl.java:243)
      at org.jgroups.protocols.pbcast.GMS.up(GMS.java:796)
      at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233)
      at org.jgroups.protocols.UNICAST.up(UNICAST.java:309)
      at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:842)
      at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:675)
      at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:131)
      at org.jgroups.protocols.FD.up(FD.java:265)
      at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:268)
      at org.jgroups.protocols.MERGE2.up(MERGE2.java:209)
      at org.jgroups.protocols.Discovery.up(Discovery.java:291)
      at org.jgroups.protocols.TP.passMessageUp(TP.java:1092)
      at org.jgroups.protocols.TP$3.run(TP.java:1016)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:680)

      Seems like winningPartition might be null in the method. This fails in 1/50 runs of StateTransferFunctionalTest.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                manik Manik Surtani
                Reporter:
                mircea.markus Mircea Markus
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: