Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   async http handler crashes occasionally on iis7 (http://www.velocityreviews.com/forums/t714238-async-http-handler-crashes-occasionally-on-iis7.html)

Mark Weaver 02-07-2010 03:58 PM

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57