Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5068

Possible NullPointerException in DistributedReplicantManager#_add()

    XMLWordPrintable

    Details

      Description

      DistributedReplicantManager#_add() can be called before
      asynchHandler initialization when multiple nodes starts
      simultaneously. It results NullPointerException below:

      2007-11-09 20:40:17,315 ERROR [org.jboss.ha.framework.server.DistributedReplicantManagerImpl.DefaultPartition] _add failed
      java.lang.NullPointerException
      at org.jboss.ha.framework.server.DistributedReplicantManagerImpl._add(DistributedReplicantManagerImpl.java:622)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
      at org.jboss.ha.framework.server.HAPartitionImpl.handle(HAPartitionImpl.java:1126)
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:654)
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:544)
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:367)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:777)
      at org.jgroups.JChannel.up(JChannel.java:1091)

      Impact:

      Nothing so far, just appearing the ERROR log above.

      To reproduce this:

      It's very hard to reproduce, the following hack needed.

      Insert Thread.sleep() call before asynchHandler initialization in
      DistributedReplicantManager#start() and boot multiple nodes
      simultaneously.

      DistributedReplicantManager#start():
      // Create the asynch listener handler thread
      Thread.sleep(10000);
      asynchHandler = new AsynchEventHandler(this, "AsynchKeyChangeHandler");
      asynchHandler.start();

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brian.stansberry Brian Stansberry
                  Reporter:
                  tkimura Takayoshi Kimura
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: