![]() |
async http handler crashes occasionally on iis7
I have an asynchronous http handler that crashes on iis7 (on w2k8 x64
or w7 x64) -- I didn't see this behaviour on iis6 (w2k3 x86) where it was running for around 2 years. It's reasonably reproducible under load. Basically the handler is just calling BeginRead() on a file, then BeginWrite() on HttpResponse.OutputStream, then when finished it calls the callback passed to BeginProcessRequest. On the odd occasion this callback throws a NullReferenceException, with the backtrace listed below. I've logged everything it does to a StringBuilder to check what it's doing, but I don't see anything other than read/write/finish -- which is the same as the case where it doesn't crash. google doesn't show much up for the backtrace. I assume I'm doing something wrong that trips up iis7, but I can't see it, any hints? (I have checked that the handler is not completing synchronously -- the IAsyncResult objects from the BeginRead callback on the file and the BeginWrite callbacks on the OutputStream all say .CompletedSynchronously=false). Thanks, Mark backtrace: System.Web.dll!System.Web.HttpApplication.CurrentM oduleContainer.get() Line 552 + 0x19 bytes C# System.Web.dll! System.Web.HttpApplication.PipelineStepManager.Res umeSteps(System.Exception error) Line 3755 + 0xc bytes C# System.Web.dll! System.Web.HttpApplication.ResumeStepsFromThreadPo olThread(System.Exception error) Line 2270 + 0xd bytes C# System.Web.dll! System.Web.HttpApplication.CallHandlerExecutionSte p.ResumeStepsWithAssert(System.Exception error) Line 3302 + 0xf bytes C# System.Web.dll! System.Web.HttpApplication.CallHandlerExecutionSte p.OnAsyncHandlerCompletion(System.IAsyncResult ar) Line 3298 C# NPSL.FsCache.dll! NPSL.FsCache.AsyncResultNoResult.Complete(System.E xception exception = null, bool completedSynchronously = false) Line 65 + 0x2a bytes C# NPSL.FilePak.dll!NPSL.FilePak.FilePakHandler.Write Completed(object extraData = {NPSL.FsCache.AsyncResultNoResult}, System.Exception e = null) Line 80 + 0x1a bytes C# NPSL.FsCache.dll! NPSL.FsCache.CachedFile.WriteAsyncInfo.Finish(Syst em.Exception e = null, string reason = "BeginRead completed: ok") Line 145 + 0x27 bytes C# NPSL.FsCache.dll!NPSL.FsCache.CachedFile.WriteAsyn cInfo.BeginRead() Line 246 + 0x1c bytes C# NPSL.FsCache.dll! NPSL.FsCache.CachedFile.WriteAsyncInfo.OutputWrite Completed(System.IAsyncResult ar = {System.Runtime.Remoting.Messaging.AsyncResult}) Line 160 + 0x9 bytes C# mscorlib.dll! System.Runtime.Remoting.Messaging.AsyncResult.Sync ProcessMessage(System.Runtime.Remoting.Messaging.I Message msg) + 0x168 bytes mscorlib.dll! System.Runtime.Remoting.Messaging.StackBuilderSink .AsyncProcessMessage(System.Runtime.Remoting.Messa ging.IMessage msg, System.Runtime.Remoting.Messaging.IMessageSink replySink) + 0x33e bytes mscorlib.dll! System.Runtime.Remoting.Proxies.AgileAsyncWorkerIt em.ThreadPoolCallBack(object o) + 0x58 bytes mscorlib.dll!System.Threading.ExecutionContext.run TryCode(object userData) + 0x178 bytes [Native to Managed Transition] [Managed to Native Transition] mscorlib.dll! System.Threading.ExecutionContext.Run(System.Threa ding.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x62 bytes mscorlib.dll! System.Threading._ThreadPoolWaitCallback.PerformWa itCallbackInternal(System.Threading._ThreadPoolWai tCallback tpWaitCallBack) + 0x61 bytes mscorlib.dll! System.Threading._ThreadPoolWaitCallback.PerformWa itCallback(object state) + 0x4f bytes [Appdomain Transition] |
| All times are GMT. The time now is 02:39 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.