[infinispan-issues] [JBoss JIRA] Created: (ISPN-890) NPE in JGroupsTransport

Mircea Markus (JIRA) jira-events at lists.jboss.org
Mon Jan 24 11:01:52 EST 2011


NPE in JGroupsTransport
-----------------------

                 Key: ISPN-890
                 URL: https://issues.jboss.org/browse/ISPN-890
             Project: Infinispan
          Issue Type: Bug
          Components: State transfer
    Affects Versions: 4.2.0.Final
            Reporter: Mircea Markus
            Assignee: Manik Surtani
             Fix For: 5.0.0.Final


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 (!winningPartition.containsMember(channel.getAddress())) return true; //!!! 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. 


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list