locked
Exception when clearing system regions RRS feed

  • Question

  • Hi,

    I've received the following error when running a command to clear the system regions of a named cache. Normally this cache works fine. Can anybody help with what went wrong ?

     

    AppFabric Caching service crashed with exception {System.Runtime.CallbackException: Async Callback threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
    
       at Microsoft.ApplicationServer.Caching.MultiDirectoryHashtable.GetPlaceHolderObject(Object key)
    
       at Microsoft.ApplicationServer.Caching.MultiDirectoryHashtable.PreProcess(MDHObjectNode oldObjectNode, MDHObjectNode& newObjectNode, MDHOperationInfo& operationInfo)
    
       at Microsoft.ApplicationServer.Caching.MultiDirectoryHashtable.PutNodeInSlot(MDHOperationInfo& operationInfo, MDHDirectoryNode dir, Int32 slotIndex)
    
       at Microsoft.ApplicationServer.Caching.MultiDirectoryHashtable.TryOperation(MDHOperationInfo& operationInfo)
    
       at Microsoft.ApplicationServer.Caching.MultiDirectoryHashtable.PerformOperation(MDHOperationInfo& operationInfo)
    
       at Microsoft.ApplicationServer.Caching.MultiDirectoryHashtable.GetAndLock(Object key, TimeSpan lockTimeOut, Boolean lockKey, DMOperationCallBack preOperation, DMOperationCallBack postOperation, Object opState)
    
       at Microsoft.ApplicationServer.Caching.DMHashContainer.GetAndLock(Object key, TimeSpan lockTimeOut, Boolean lockKey, Object opState)
    
       at Microsoft.ApplicationServer.Caching.OMRegion.GetAndLock(Object key, TimeSpan lockTimeOut, Boolean lockKey, Object opState)
    
       at Microsoft.ApplicationServer.Caching.ObjectManager.GetAndLock(String cacheName, String regionName, Object key, TimeSpan lockTimeOut, DataCacheLockHandle& lHandle, Boolean lockKey, Object opState)
    
       at Microsoft.ApplicationServer.Caching.VelocityDataStore.ProcessWriteRequest(RequestBody request)
    
       at Microsoft.ApplicationServer.Caching.VelocityDataStore.ProcessMessageRequest(RequestBody request)
    
       at Microsoft.ApplicationServer.Caching.DistributedObjectManager.OnReceiveMessageFromRemoteDRM(IReplyContext replyContext)
    
       at Microsoft.ApplicationServer.Caching.WcfServerChannel.InvokeCallback(Message message, IChannelContainer container)
    
       at Microsoft.ApplicationServer.Caching.WcfServerChannel.CompleteProcessing(IAsyncResult result)
    
       at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    
       --- End of inner exception stack trace ---
    
       at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    
       at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
    
       at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
    
       at System.ServiceModel.Channels.SocketConnection.AsyncReadCallback(Boolean haveResult, Int32 error, Int32 bytesRead)
    
       at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    
       at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)}. Check debug log for more information

     

     

     

    Tuesday, March 1, 2011 4:23 PM

Answers

  • This defect is actually a known issue and will be fixed in the upcoming release of AppFabric caching. 

    I believe you are calling this ClearRegion in testing only, to start your run afresh. If you need to call it, then at the moment cluster restart is the only option.

     


    MSFT
    Monday, March 7, 2011 10:25 AM

All replies

  • Hi

    1. Can you detail the list of steps you executed which resulted into this problem?

    2. Which version of AppFabric Cache are you using?

    3. Is this always reproducible or intermittent?

    thanks,

    Ankur 

    Thursday, March 3, 2011 6:10 AM
    Moderator
  • We get the problem when running a C# console app to cleared the regions of a named cache. The console app basically uses...

     foreach (var regionName in cache.GetSystemRegions())
     {
      cache.ClearRegion(regionName);
      Console.WriteLine("Cleared region {0}", regionName);
     }
    

    We're running v1.0 of app fabric and have only had this issue intermittently.

     

    Thanks. 

    Thursday, March 3, 2011 4:54 PM
  • It looks like there are other operations are going on in the parallel when ClearRegion is being invoked, as the stack trace shows 'GetAndLock' being run by cache service. Can you please describe in a little more details what all operations are being done on the cache ?  Not to say that service should crash while doing some operations, just that having understanding of the scenario will help us debug it faster.
    MSFT
    Friday, March 4, 2011 4:40 PM
  • This defect is actually a known issue and will be fixed in the upcoming release of AppFabric caching. 

    I believe you are calling this ClearRegion in testing only, to start your run afresh. If you need to call it, then at the moment cluster restart is the only option.

     


    MSFT
    Monday, March 7, 2011 10:25 AM
  • We use this ClearRegion app to allow developers to flush a cache so that their latest data changes are picked up. It's possible then that two developers were calling the command at the same time for the same shared cache. 

    Thanks for the help.

    Wednesday, March 9, 2011 2:47 PM
  • Hay Gopal , Is this issue fixed or we still have a problem with this .

    I am using Appfabric 1.1 and still see it.

    Monday, July 20, 2015 12:36 PM