shoal
  1. shoal
  2. SHOAL-23

Occassional NPE see in DistribuedStateCache sync()

    Details

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

      Operating System: All
      Platform: All

    • Issuezilla Id:
      23

      Description

      While running com.sun.enterprise.shoal.ShoalMessagingTest, the NPE below is
      being seen. This is not happening when the rungmsdemo.sh(bat) test is run.
      Possible issue with some object's init not happening in time.

      Jun 2, 2007 9:00:32 AM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow syncDSC
      WARNING: Exception during DSC sync:java.lang.NullPointerException
      java.lang.NullPointerException
      at com.sun.enterprise.ee.cms.impl.jxta.DistributedStateCacheImpl.syncCac
      he(DistributedStateCacheImpl.java:423)
      at com.sun.enterprise.ee.cms.impl.jxta.ViewWindow.syncDSC(ViewWindow.jav
      a:519)
      at com.sun.enterprise.ee.cms.impl.jxta.ViewWindow.determineAndAddNewMemb
      erJoins(ViewWindow.java:236)
      at com.sun.enterprise.ee.cms.impl.jxta.ViewWindow.analyzeMasterChangeVie
      w(ViewWindow.java:209)
      at com.sun.enterprise.ee.cms.impl.jxta.ViewWindow.analyzeViewChange(View
      Window.java:193)
      at com.sun.enterprise.ee.cms.impl.jxta.ViewWindow.newViewObserved(ViewWi
      ndow.java:101)
      at com.sun.enterprise.ee.cms.impl.jxta.ViewWindow.run(ViewWindow.java:85
      )
      at java.lang.Thread.run(Thread.java:595)

        Activity

        Hide
        shreedhar_ganapathy added a comment -

        User: shreedhar_ganapathy
        Date: 2007-06-02 17:33:31+0000
        Log:
        Fix for Issue 23: NPE in DSC occassionally in syncCache()
        GMSContext is not inited. Instead of calling the getGMSContext() method which
        does the right thing, the code in question relies on the ctx variable directly.

        File Changes:

        Directory: /shoal/gms/src/java/com/sun/enterprise/ee/cms/impl/jxta/
        ===================================================================

        File [changed]: DistributedStateCacheImpl.java
        Url:
        https://shoal.dev.java.net/source/browse/shoal/gms/src/java/com/sun/enterprise/ee/cms/impl/jxta/DistributedStateCacheImpl.java?r1=1.13&r2=1.14
        Delta lines: +4 -4
        -------------------
        — DistributedStateCacheImpl.java 2007-05-30 22:46:21+0000 1.13
        +++ DistributedStateCacheImpl.java 2007-06-02 17:33:28+0000 1.14
        @@ -73,7 +73,7 @@
        *

        • @author Shreedhar Ganapathy
        • Date: June 20, 2006
        • * @version $Revision: 1.13 $
          + * @version $Revision: 1.14 $
          */
          public class DistributedStateCacheImpl implements DistributedStateCache { private final ConcurrentHashMap<GMSCacheable, Object> cache = @@ -277,8 +277,8 @@ return retval; }

          else{

        • if(!memberToken.equals(ctx.getServerIdentityToken())){
        • MemberStates state =
          ctx.getGroupCommunicationProvider().getMemberState(memberToken);
          + if(!memberToken.equals(getGMSContext().getServerIdentityToken())){
          + MemberStates state =
          getGMSContext().getGroupCommunicationProvider().getMemberState(memberToken);
          if(state.equals(MemberStates.ALIVE)) {
          ConcurrentHashMap<GMSCacheable, Object>
          temp = new ConcurrentHashMap<GMSCacheable, Object>(cache);
          @@ -420,7 +420,7 @@
          final DSCMessage msg = new DSCMessage(temp,
          DSCMessage.OPERATION.ADDALLLOCAL.toString(),
          isCoordinator);
        • if(!memberToken.equals(ctx.getServerIdentityToken())){
          + if(!memberToken.equals(getGMSContext().getServerIdentityToken())){
          logger.log(Level.FINER, "Sending sync message from
          DistributedStateCache " +

        "to member "+memberToken);

        Show
        shreedhar_ganapathy added a comment - User: shreedhar_ganapathy Date: 2007-06-02 17:33:31+0000 Log: Fix for Issue 23: NPE in DSC occassionally in syncCache() GMSContext is not inited. Instead of calling the getGMSContext() method which does the right thing, the code in question relies on the ctx variable directly. File Changes: Directory: /shoal/gms/src/java/com/sun/enterprise/ee/cms/impl/jxta/ =================================================================== File [changed] : DistributedStateCacheImpl.java Url: https://shoal.dev.java.net/source/browse/shoal/gms/src/java/com/sun/enterprise/ee/cms/impl/jxta/DistributedStateCacheImpl.java?r1=1.13&r2=1.14 Delta lines: +4 -4 ------------------- — DistributedStateCacheImpl.java 2007-05-30 22:46:21+0000 1.13 +++ DistributedStateCacheImpl.java 2007-06-02 17:33:28+0000 1.14 @@ -73,7 +73,7 @@ * @author Shreedhar Ganapathy Date: June 20, 2006 * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ */ public class DistributedStateCacheImpl implements DistributedStateCache { private final ConcurrentHashMap<GMSCacheable, Object> cache = @@ -277,8 +277,8 @@ return retval; } else{ if(!memberToken.equals(ctx.getServerIdentityToken())){ MemberStates state = ctx.getGroupCommunicationProvider().getMemberState(memberToken); + if(!memberToken.equals(getGMSContext().getServerIdentityToken())){ + MemberStates state = getGMSContext().getGroupCommunicationProvider().getMemberState(memberToken); if(state.equals(MemberStates.ALIVE)) { ConcurrentHashMap<GMSCacheable, Object> temp = new ConcurrentHashMap<GMSCacheable, Object>(cache); @@ -420,7 +420,7 @@ final DSCMessage msg = new DSCMessage(temp, DSCMessage.OPERATION.ADDALLLOCAL.toString(), isCoordinator); if(!memberToken.equals(ctx.getServerIdentityToken())){ + if(!memberToken.equals(getGMSContext().getServerIdentityToken())){ logger.log(Level.FINER, "Sending sync message from DistributedStateCache " + "to member "+memberToken);

          People

          • Assignee:
            shreedhar_ganapathy
            Reporter:
            shreedhar_ganapathy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: