Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > async http handler crashes occasionally on iis7

Reply
Thread Tools

async http handler crashes occasionally on iis7

 
 
Mark Weaver
Guest
Posts: n/a
 
      02-07-2010
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]
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web service Async call doesn't work on Win 2008/IIS7 Ideas? Anthony Hunt ASP .Net Web Services 0 03-20-2009 04:58 PM
IIS7 - HTTP Error 404.3 - Not Found, VISTA Bussiness / Framework 3.5 Juan Marcial ASP .Net 5 12-13-2008 11:28 PM
iis7 / Vista http handler permission issue? help please =?Utf-8?B?ZGF2ZQ==?= ASP .Net 0 06-23-2007 03:09 AM
Newbie: async mode dedicated versus async mode interactive!! Pink_Floyd Cisco 4 06-16-2006 12:16 AM
Async webservice call in async webpage (.Net 2.0) does not return Steven ASP .Net Web Services 0 11-30-2005 01:06 AM



Advertisments
 



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