none
Detected use of SPRequest for previously closed SPWeb object EventID 90hv

    Question

  • Any ideas about this error message? We have a large sharepoint 2010 env with extensive and deep document libraries. We use StoragePoint and Varonis (demo), but I think we were seeing this error before Varonis got into the system. I saw another post about the event ID 90hv associated with Project and sharepoint, something about an ampersand in the name field. Probabilly not the same thing. This even seems to occur all the time. Appreciate any help here.

    Thanks, Berney

    06/17/2011 09:19:25.37 w3wp.exe (0x057C) 0x0670 SharePoint Foundation General 90hv Unexpected Detected use of SPRequest for previously closed SPWeb object.  Please close SPWeb objects when you are done with all objects obtained from them, but not before.  Stack trace:    at Microsoft.SharePoint.SPFolder.EnsureFileFolderData()     at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()     at Varonis.Core.Sharepoint.FileWalkProvider.SiteEnumerator.EnumerateEntities(SPFolder folder, List`1 entities)     at Varonis.Core.Sharepoint.FileWalkProvider.SiteEnumerator.EnumerateEntitiesByHint(String hint)     at Varonis.Core.Sharepoint.FileWalkProvider.SiteEnumerator.GetSubCollection(Guid siteId, String path, String hint, EnumerationStrategy enumStrategy)     at Varonis.Core.Sharepoint.FileWalkProvider.SiteEnumerator.GetSubCollection(Guid siteId, String path, String hint)     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)     at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)     at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)     at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)     at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)     at System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.SinkProcessDelegateAdapter.ProcessMessage()     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.<>c__DisplayClass1.<InvokeAction>b__0()     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.<>c__DisplayClass6.<InvokeAction>b__3()     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()     at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.InvokeAction(IMessage inputMessage, ProcessMessage processMessage)     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.InvokeAction(SinkProcessDelegateAdapter processAdapter)     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.System.Runtime.Remoting.Channels.IServerChannelSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)     at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)     at System.Runtime.Remoting.Channels.Http.HttpHandlerTransportSink.HandleRequest(HttpContext context)     at System.Runtime.Remoting.Channels.Http.HttpRemotingHandler.InternalProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 

    Friday, June 17, 2011 2:50 PM

Answers

  • The SPBaseCollection is being returned and used after the SPWeb that was used to get it has been closed. This will leak memory. Returning SP objects in method calls is not a good practice. It is like returning System.IO.Stream objects and expecting callers to clean up. Whatever needs to be done with the SPBaseCollecton should be done before closing the SPWeb object.
    Blog | SharePoint Field Notes Dev Tool | ClassMaster
    • Marked as answer by Wayne Fan Friday, June 24, 2011 1:44 AM
    Sunday, June 19, 2011 10:05 PM

All replies

  • The SPBaseCollection is being returned and used after the SPWeb that was used to get it has been closed. This will leak memory. Returning SP objects in method calls is not a good practice. It is like returning System.IO.Stream objects and expecting callers to clean up. Whatever needs to be done with the SPBaseCollecton should be done before closing the SPWeb object.
    Blog | SharePoint Field Notes Dev Tool | ClassMaster
    • Marked as answer by Wayne Fan Friday, June 24, 2011 1:44 AM
    Sunday, June 19, 2011 10:05 PM
  • Sorry I haven't responded, for some reason I still don't get emails from the forums. Anyway, we aren't using any custom code sharepoint yet. Any way you can think of to narrow this down to the application causing the problem?

    Berney

    Tuesday, July 05, 2011 5:33 PM
  • Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.SinkProcessDelegateAdapter.ProcessMessage()     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.<>c__DisplayClass1.<InvokeAction>b__0()     at Varonis.Core.Sharepoint.FileWalkProvider.Remoting.CustomServerSink.<>c__DisplayClass6.<InvokeAction>b__3()     at

     

    Varonis is in the Stack trace you posted, so you are using custom code.


    Blog | SharePoint Field Notes Dev Tool | ClassMaster
    Tuesday, July 05, 2011 8:43 PM
  • Sorry I misspoke, or miswrote. We didn't write any custom code, but we have installed some third party tools.I will consentrate on that one. Thanks for the pointer.

     

    Berney

    Wednesday, July 06, 2011 1:07 AM