shoal
  1. shoal
  2. SHOAL-52

NPE in LWRMulticast.pipeMsgEvent

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: GMS
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      52

      Description

      Issue detected with glassfish nightly FCS of 4/10/2008 and patch shoal-gms.jar
      and jxta.jar. Issue observed in running SIFT functional test and glassfish
      replication devtest. Additionaly had a jxtalogging.jar that enabled jxta
      warnings.

      The following NPE happened many, many times. Stack trace differs but the
      LWRMulticast.java line 223 is always line with NPE.

      [#|2008-04-14T17:58:39.461-0400|SEVERE|sun-comms-
      appserver1.0|net.jxta.impl.pipe.InputPipeImpl|_ThreadID=21;_ThreadName=Executor

      • 2;_RequestID=c77a2b94-7058-4cc7-b46d-049a8d506499;|Uncaught Throwable in
        listener for : urn:jxta:uuid-
        1DA181435A1B427E8C0DB06E6FEE831A7F57B1A44FDB469D9F94BE4B0722C28904
        (com.sun.enterprise.jxtamgmt.LWRMulticast)
        java.lang.NullPointerException
        at com.sun.enterprise.jxtamgmt.LWRMulticast.pipeMsgEvent
        (LWRMulticast.java:223)
        at net.jxta.impl.pipe.InputPipeImpl.processIncomingMessage
        (InputPipeImpl.java:219)
        at net.jxta.impl.pipe.WirePipe.callLocalListeners(WirePipe.java:383)
        at net.jxta.impl.pipe.WirePipe.processIncomingMessage(WirePipe.java:359)
        at net.jxta.impl.pipe.WirePipeImpl.processIncomingMessage
        (WirePipeImpl.java:338)
        at net.jxta.impl.endpoint.EndpointServiceImpl.processIncomingMessage
        (EndpointServiceImpl.java:964)
        at net.jxta.impl.endpoint.EndpointServiceInterface.processIncomingMessage
        (EndpointServiceInterface.java:342)
        at net.jxta.impl.rendezvous.RendezVousServiceProvider.processReceivedMessage
        (RendezVousServiceProvider.java:502)
        at net.jxta.impl.rendezvous.StdRendezVousService.processReceivedMessage
        (StdRendezVousService.java:240)
        at net.jxta.impl.rendezvous.RendezVousServiceProvider.processIncomingMessage
        (RendezVousServiceProvider.java:159)
        at net.jxta.impl.endpoint.EndpointServiceImpl.processIncomingMessage
        (EndpointServiceImpl.java:964)
        at net.jxta.impl.endpoint.EndpointServiceInterface.processIncomingMessage
        (EndpointServiceInterface.java:342)
        at net.jxta.impl.endpoint.mcast.McastTransport.processMulticast
        (McastTransport.java:749)
        at net.jxta.impl.endpoint.mcast.McastTransport$DatagramProcessor.run
        (McastTransport.java:871)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
        (ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run
        (ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
        #]

        Activity

        Hide
        shreedhar_ganapathy added a comment -

        ..

        Show
        shreedhar_ganapathy added a comment - ..
        Hide
        shreedhar_ganapathy added a comment -

        ..

        Show
        shreedhar_ganapathy added a comment - ..
        Hide
        hamada added a comment -

        Patch committed to address initialization race condition of local id.

        — LWRMulticast.java 2008-02-23 00:31:20+0000 1.9
        +++ LWRMulticast.java 2008-04-15 16:32:05+0000 1.10
        @@ -139,18 +139,7 @@
        public LWRMulticast(ClusterManager manager,
        PipeAdvertisement pipeAd,
        PipeMsgListener msgListener) throws IOException {

        • super();
          joinGroup(manager, pipeAd, msgListener);
        • MessageTransport endpointRouter =
          (manager.getNetPeerGroup().getEndpointService()).getMessageTransport("jxta");
        • if (endpointRouter != null) {
        • routeControl = (RouteControl)
          endpointRouter.transportControl(EndpointRouter.GET_ROUTE_CONTROL, null);
        • RouteAdvertisement route = routeControl.getMyLocalRoute();
        • if (route != null) { - routeAdvElement = new TextDocumentMessageElement(ROUTEADV, - (XMLDocument) route.getDocument(MimeMediaType.XMLUTF8), null); - }
        • }
          -
          }

        /**
        @@ -161,9 +150,8 @@

        • @param msgListener The application message listener
        • @throws IOException if an io error occurs
          */
        • public void joinGroup(ClusterManager manager,
        • PipeAdvertisement pipeAd,
        • PipeMsgListener msgListener) throws IOException {
          + public void joinGroup(ClusterManager manager, PipeAdvertisement pipeAd,
          PipeMsgListener msgListener) throws IOException
          Unknown macro: {+ if (pipeAd.getType() != null &&!pipeAd.getType().equals(PipeService.PropagateType)) { throw new IOException("Only propagate pipe advertisements are supported"); }@@ -174,13 +162,23 @@ throw new IllegalArgumentException("msgListener can not be null"); }

          this.manager = manager;
          + this.localPeerID = manager.getNetPeerGroup().getPeerID();
          + srcElement = new StringMessageElement(SRCIDTAG, localPeerID.toString(),
          null);
          +
          + MessageTransport endpointRouter =
          (manager.getNetPeerGroup().getEndpointService()).getMessageTransport("jxta");
          + if (endpointRouter != null)

          Unknown macro: {+ routeControl = (RouteControl)endpointRouter.transportControl(EndpointRouter.GET_ROUTE_CONTROL, null);+ RouteAdvertisement route = routeControl.getMyLocalRoute();+ if (route != null) { + routeAdvElement = new TextDocumentMessageElement(ROUTEADV, + (XMLDocument) route.getDocument(MimeMediaType.XMLUTF8), null); + }+ }

          this.msgListener = msgListener;
          this.pipeAdv = pipeAd;
          this.pipeSvc = manager.getNetPeerGroup().getPipeService();
          this.in = pipeSvc.createInputPipe(pipeAd, this);
          outputPipe = pipeSvc.createOutputPipe(pipeAd, 1);

        • localPeerID = manager.getNetPeerGroup().getPeerID();
        • srcElement = new StringMessageElement(SRCIDTAG, localPeerID.toString(),
          null);
          LOG.log(Level.FINEST, "Statring LWRMulticast on pipe id :" +
          pipeAdv.getID());
          bound = true;
          }
          @@ -220,7 +218,7 @@

        MessageElement element;
        PeerID id = getSource(message);

        • if (id.equals(localPeerID)) {
          + if (id != null && id.equals(localPeerID)) { //loop back return; }
        Show
        hamada added a comment - Patch committed to address initialization race condition of local id. — LWRMulticast.java 2008-02-23 00:31:20+0000 1.9 +++ LWRMulticast.java 2008-04-15 16:32:05+0000 1.10 @@ -139,18 +139,7 @@ public LWRMulticast(ClusterManager manager, PipeAdvertisement pipeAd, PipeMsgListener msgListener) throws IOException { super(); joinGroup(manager, pipeAd, msgListener); MessageTransport endpointRouter = (manager.getNetPeerGroup().getEndpointService()).getMessageTransport("jxta"); if (endpointRouter != null) { routeControl = (RouteControl) endpointRouter.transportControl(EndpointRouter.GET_ROUTE_CONTROL, null); RouteAdvertisement route = routeControl.getMyLocalRoute(); if (route != null) { - routeAdvElement = new TextDocumentMessageElement(ROUTEADV, - (XMLDocument) route.getDocument(MimeMediaType.XMLUTF8), null); - } } - } /** @@ -161,9 +150,8 @@ @param msgListener The application message listener @throws IOException if an io error occurs */ public void joinGroup(ClusterManager manager, PipeAdvertisement pipeAd, PipeMsgListener msgListener) throws IOException { + public void joinGroup(ClusterManager manager, PipeAdvertisement pipeAd, PipeMsgListener msgListener) throws IOException Unknown macro: {+ if (pipeAd.getType() != null &&!pipeAd.getType().equals(PipeService.PropagateType)) { throw new IOException("Only propagate pipe advertisements are supported"); }@@ -174,13 +162,23 @@ throw new IllegalArgumentException("msgListener can not be null"); } this.manager = manager; + this.localPeerID = manager.getNetPeerGroup().getPeerID(); + srcElement = new StringMessageElement(SRCIDTAG, localPeerID.toString(), null); + + MessageTransport endpointRouter = (manager.getNetPeerGroup().getEndpointService()).getMessageTransport("jxta"); + if (endpointRouter != null) Unknown macro: {+ routeControl = (RouteControl)endpointRouter.transportControl(EndpointRouter.GET_ROUTE_CONTROL, null);+ RouteAdvertisement route = routeControl.getMyLocalRoute();+ if (route != null) { + routeAdvElement = new TextDocumentMessageElement(ROUTEADV, + (XMLDocument) route.getDocument(MimeMediaType.XMLUTF8), null); + }+ } this.msgListener = msgListener; this.pipeAdv = pipeAd; this.pipeSvc = manager.getNetPeerGroup().getPipeService(); this.in = pipeSvc.createInputPipe(pipeAd, this); outputPipe = pipeSvc.createOutputPipe(pipeAd, 1); localPeerID = manager.getNetPeerGroup().getPeerID(); srcElement = new StringMessageElement(SRCIDTAG, localPeerID.toString(), null); LOG.log(Level.FINEST, "Statring LWRMulticast on pipe id :" + pipeAdv.getID()); bound = true; } @@ -220,7 +218,7 @@ MessageElement element; PeerID id = getSource(message); if (id.equals(localPeerID)) { + if (id != null && id.equals(localPeerID)) { //loop back return; }
        Hide
        sheetalv added a comment -

        This is not consistently reproducible.

        Show
        sheetalv added a comment - This is not consistently reproducible.
        Hide
        sheetalv added a comment -

        don't see this issue frequently. Hence lowering the priority.

        Show
        sheetalv added a comment - don't see this issue frequently. Hence lowering the priority.
        Hide
        Joe Fialli added a comment -

        Fix checked in for issue 52 as noted on April 16 comments below.

        Have not seen issue recently, marking as fixed.

        Show
        Joe Fialli added a comment - Fix checked in for issue 52 as noted on April 16 comments below. Have not seen issue recently, marking as fixed.

          People

          • Assignee:
            hamada
            Reporter:
            Joe Fialli
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: