ASP.NET 2.0 Crash case study: Unhandled exceptions
For a long time all my case studies have been on 1.1. it’s time to venture out in 2.0 land and look at what may seem like a 2.0 specific issue.
I say “may seem” because this case study will only directly crash if you are using 2.0, but as you’ll learn later the problem existed in 1.1 and 1.0, it was just way harder to track down.
Problem description:
Once in a while ASP.NET crashes and we see events in the system event log like this one
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1009
Date: 2006-04-25
Time: 09:41:22
PM User: N/A
Computer: SUBSPACE1
Description:
A process serving application pool 'ASP.NET V2.0' terminated unexpectedly. The process id was ‘1732’. The process exit code was ‘0xe0434f4d’.
Or this one
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1011
Date: 2006-04-25
Time: 09:41:22
User: N/A
Computer: SUBSPACE1
Description:
A process serving application pool 'ASP.NET V2.0' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '6256'. The data field contains the error number.
And in the application event log we get a pretty cryptic error message like this one
Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 2006-04-25
Time: 09:41:20
User: N/A
Computer: SUBSPACE1
Description:
EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4 app_code.pn5mfdcr, P5 0.0.0.0, P6 444dcf44, P7 5, P8 5, P9 system.dividebyzeroexception, P10 NIL.
Initial thoughts:
Ok, so what do we know about the issue? We know that asp.net terminated unexpectedly, and that right before this we got a System.DivideByZeroException…. We also know that the process exit code was 0xe0434f4d whatever that means, hmm…
Usually when you get a stopped unexpectedly error message the exit code will be the type of exception that caused the crash. For example a 0xC0000005 means you got a second chance access violation, 0x800703e9 means you suffered a StackOverflowException but what about 0xe0434f4d?
0xe0434f4d is the exception code for CLR (.net) exceptions, so any managed exception like a NullReferenceException or InvalidOperationException or SQLException… basically all managed exception are natively referred to as 0xe0434f4d. In this case, if we look closer at the application event log entry we can see that it is in fact a System.DivideByZero exception.
Trivia: Justa piece of info of no particular value that you might want to pull out of pocket on your next dateJ 0xe0434f4d or at least 43 4f 4d are the ASCII values for the letters COM.
But hey now… should a .net exception cause the asp.net process to crash??? If you divide by zero in your page and don’t have a try catch block around it, surely you will get one of those “nice” white and yellow error pages saying that an exception occurred on your page, but the process doesn’t just exit.
The answer is yes, you will get one of those pages because the asp.net global error handler will eventually catch your exception, format it for you and print it out on the screen. But what happens if it is not on an asp.net request, so there is no-one to feedback the exception to? It’s the old paradox: If a tree falls in the forest and nobody is there, does it still make a sound?
In 1.0 and 1.1 it didn’t. For example if you throw an exception in a piece of code called on a timer, or use QueueUserWorkItem and throw an exception in code executing there, or otherwise throw exceptions in code that is not running inside the context of an asp.net request, the framework will swallow the exception and continue. Or rather it will stop that thread of execution but it won’t die.
Doesn’t sound all that bad right? Really???
That thread could have been doing anything, and we will never be the wiser that it died. It could have been holding a lock of some sort, or it could have been in the middle of cleaning up resources, or really a number of different things that will now never happen, but that may immediately or eventually have really bad side effects like hangs or crashes or memory issues, but the exception will be long gone so we cant figure out what it was.
The policy for unhandled exceptions was changed in ASP.NET 2.0 to the default for .net which is a process exit. This can be changed back by adding the following to the aspnet.config in the frameworks directory, but I wouldn’t recommend it without putting in some preventive measures to take care of potential unhandled exceptions on non ASP.NET threads.
<configuration>
<runtime>
<legacyUnhandledExceptionPolicy enabled="true" />
</runtime>
</configuration>
Troubleshooting the issue:
The main task here is to find out where this DivideByZero exception is coming from and why it occurred so there are two ways to figure this out (short of complete code inspection).
Strategy #1 – logging the exception
The first way, and this is the way I would probably recommend, is to create an UnhandledExceptionHandler to log the exception along with its stack trace in the event log as shown in this article https://support.microsoft.com/?id=911816
You add the handler like this to the web.config:
<system.web>
<httpModules>
<add type="WebMonitor.UnhandledExceptionModule, <strong name>" name="UnhandledExceptionModule"/>
</httpModules>
…
</system.web>
And it hooks an eventhandler up to the UnhandledException event of the current app domain.
You don’t actually need to strong name it and add it to the GAC, however if you plan it in multiple applications you should to avoid for the dll being loaded multiple times.
Now the next time you get one of these unhandled exceptions, the process will still exit (unless you change the unhandled exception policy), but you have a very good chance of fixing the issue.
The event for the exception in this particular sample looks like this…
Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 0
Date: 2006-04-25
Time: 09:41:20
User: N/A
Computer: SUBSPACE1
Description:
UnhandledException logged by UnhandledExceptionModule.dll:
appId=/LM/w3svc/1/ROOT/CrashMe
type=System.DivideByZeroException
message=Attempted to divide by zero.
stack=
at MyFinalizerClass.Finalize()
.
Bingo!!! So the exception occurs in MyFinalizerClass.Finalize() in the CrashMe application.
In fact the code for the finalizer for this class looks like this, so it is pretty obvious what caused it, and our work here is done…
~MyFinalizerClass()
{
int i = 0;
int j = 9;
i = j / i;
}
Setting up an UnhandledException handler like this is not limited to 2.0. You can absolutely do this in 1.1 as well to determine if you are throwing any unhandl
Comments
Anonymous
April 27, 2006
Thank you for taking the time to write these articles. Before reading your side, I'd never really comprehended windbg. Your articles helped me use windbg to diagnose and solve some managed memory leaks in my code. In previous positions, I'd used Rational Purify to find them, but windbg seems better to me for finding leaks.Anonymous
April 27, 2006
Your blog rocks! It's indeed much better than many debugging books out there. I really like the way you present the problem and how you approach it mostly with the help of windbg. Reading your blogs has given me very good perspectives on what's under the covers.
Please keep those coming.Anonymous
April 27, 2006
PingBack from http://www.epocalipse.com/blog/2006/04/27/aspnet-20-unhandled-exceptions-and-lucenenet/Anonymous
April 27, 2006
Have you ever experienced the 0xe0434f4d exit code and thought, what the heck is that!
Tess has a nice...Anonymous
April 28, 2006
Tess, your blog is great. It has helped me out a lot, especially this post. Keep it going!Anonymous
April 29, 2006
This is very cool. Thanks for your hard work putting this together!Anonymous
May 01, 2006
This is a basic article but never the less it seems that many ASP.NET programmer don't know issue like this.
Tess I really think that you are doing a great job in advancing the debugging operation made by ASP.NET developers.
ASP.NET developer have to understand that they must understand the concept of debugging because sooner or later they will come into the situation that they will face a problem that have to be debugged.
Thank you and keep the good job :)Anonymous
May 02, 2006
I came across this post about dealing with unhandled ASP .NET exceptions on the blog of one of the Microsoft...Anonymous
May 04, 2006
TCPView
TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints...Anonymous
May 04, 2006
Awsome!!!!!!!!!!!!
Your's indeed is the best blog on debugging I have ever come across. Please keep them coming :o)Anonymous
May 07, 2006
unintelligibleAnonymous
May 10, 2006
Рекомендую почитать блог &laquo;If broken it is, fix it you should&raquo;. Детально рассматриваются различные...Anonymous
May 10, 2006
There is a better UnhandledExceptionHandler here: http://dotnettricks.com/blogs/andrewcainblog/archive/2006/04/18/ELMAH_for_ASPNET2_0.aspxAnonymous
May 12, 2006
Tłumaczenie rewelacyjnego tekstu Tess Ferrandez o radzeniu sobie z wyjątkami, które nie sa tak do końca oczywiste i co najgorsze są przed nami ukryte.Anonymous
May 16, 2006
The following links to .NET resources have been collated over time with the assistance of
colleagues.&nbsp;...Anonymous
May 21, 2006
Tess really has the best blog I've seen that discusss how to investigate runtime issues with ASP.NET.&nbsp;...Anonymous
June 06, 2006
Trackback from dotnetkicks.comAnonymous
June 14, 2006
I came across a great article that discusses how to investigate runtime issues with ASP.NET.&nbsp; Tess&nbsp;is...Anonymous
July 06, 2006
TCPView
TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints...Anonymous
July 17, 2006
Hi Tess, I've got a dump from an ASP.NET app that is not crashing, but it becomes extremely slow for apparently no reason. The # of connections to IIS grows, and the users get no response from the server, although CPU and memory comsumption are low, and things only get back to normal with an app pool restart. I've got the dump with IIS Debug&Diag Tools, and the report shows for several (24) threads that "this thread is blocked by an unhandled exception". !threads shows that of the 36 threads listed, 24 have Lock Count = 1 and Exception = "(Threadpool Worker) System.ArgumentException". I've located the exception for one of those threads with !dso and !do to use what you've shown in the post, but _remoteStackTraceString is 0x00000000. What does that mean? And how can a thread be blocked by an unhandled exception? The app is .NET 1.1 SP1. Shouldn't the framework "swallow" the exception as you said? One more thing that could be related: the app is sending e-mail messages to warn some people about unhandled exceptions, via the global ASP.NET exception handler, and this handler has been quite busy with the ThreadAbortExceptions generated by Response.Redirect. Thanks for any help on this....Anonymous
July 17, 2006
Hi GB,
Perhaps you can show the stack of one of the blocked threads, that would help determining why it is blocked (both !clrstack and kb, but you can mark out any proprietary information if you want with some suitable marker like ##### or something).
Member variables of exceptions (such as remotestacktracestring) are not always filled in, particularly the remote stack trace is not relevant to an ArgumentException, it is just an inherited member. There should be a _StackTraceString, but if you are in the middle of the exception it might not be filled out yet. If that is the case you can get the stack directly by doing !clrstack or !dumpstackAnonymous
July 18, 2006
The comment has been removedAnonymous
July 21, 2006
The comment has been removedAnonymous
July 24, 2006
Ok Tess,
Thanks a lot. That's was my conclusion too, I'm writing it now on my report. Perhaps I could quote you on this?.....
;) just kidding
Thanks,
GBAnonymous
July 26, 2006
Feel free:)Anonymous
August 10, 2006
This helped us with part of our problem, but IIS keeps crashing over exception 0x00015dea. I have been trying to figure out what this exception refers to, but I can't find it.Anonymous
August 10, 2006
Hi TM,
To be honest that looks more like an address than an exit code or an exception code. In fact that address often shows up as the faulting address in kernel32 during a fatal exception.
I would run adplus straight up in crash mode (without any config files to begin with) and look at the dump that gets generated when the process exits, as well as the log files to look for strange exceptions before the exit.
HTHAnonymous
September 05, 2006
The comment has been removedAnonymous
September 06, 2006
Hi Mash,
The exception address is only available in sos.dll for 2.0, and just in case you are debugging for the unhandled exception, that only happens in 2.0.
But... if you are interested in that format exception you should be able to find it using !dumpheap -type FormatExceptionAnonymous
September 18, 2006
I'm getting the same error too. I'm also getting Thread aborts and a crashing IIS. I think the source is the .Redirect, because my application is logging this it's own log in a database.
Anyone found a solution for this?Anonymous
September 18, 2006
The comment has been removedAnonymous
September 19, 2006
Uhm, yes, your right. Saw that a couple of minutes ago. I've installed IIS diagnostics (max crash logging) and now it's waiting for the next crash.
Thanks for the quick reply!Anonymous
November 08, 2006
As part of my "not-my-real-job" time, I do a little website hosting - basically to keep myAnonymous
November 13, 2006
This is more a general question about HttpModules, all the documentation seems to suggest that when you add an HttpModule to your web.config file you only get one single instance of your HttpModule per HttpApplication, is this really true? I've been running some load tests generating 1000s of requests and when I've windbg'd the worker process and done a dumpheap -type on my HttpModule class there's loads of 'em. But if we're only supposed to get one instance per HttpApplication, how's this possible?Anonymous
November 14, 2006
Actually it appears that ASP.NET creates a pool of HttpModules to handle multiple requests and the number created increases with load. I wonder what algorithm is used to determine how many instances of the HttpModule to create? So this would mean that the HttpModule code from the kb article will only work for the first instance of that particular HttpModule. Well, you learn something everyday day.Anonymous
November 14, 2006
I am afraid I don't follow you at all... What is the problem? If you get an unhandled exception, this module will handle it whether there is a pool of such handlers or only one. Are you seeing something different? I would be a bit surprised if you were...Anonymous
November 15, 2006
What I mean't was that in the kb article the code uses a static bool to determine whether the module has already been initialized and hence to hook up the event handlers or not in the Init() method. So when any subsequent instances of the module class are created this bool flag is already set to true. Which means these instances will not have event handlers set up for them. Well, thats what it seems like anyway, as a % of my requests don't get processed. The first x number do, then it goes hit & miss. This only happens under heavy load, ie when I've got a pool of these handlers created. Everytime I've had a request that hasn't been processed I've checked with !dumpheap -type and there's always multiple instances of the module class. When I comment out the static bool flag all my requests get processed when it's under load. Hope that makes sense.Anonymous
November 30, 2006
Just in case anyone uses active reports, we ran across an issue where our application was terminating unexpectedly and it turned out to be related to a bug in their code. http://www.datadynamics.com/forums/3/96793/ShowPost.aspx#96793Anonymous
January 20, 2007
Hi Tess, I cannot use a debugger to troubleshoot the issue in this case. The HttpModule you referred to works for a ASP.NET app. Can you give me some idea on how to do this for a Windows Service (in 2.0) that is doing some async operations for TCP Sockets? Thanks, WarrierAnonymous
January 21, 2007
Hi Warrier, Unfortunately a windows service is not "hosted" the same way that an asp.net app is so as you mentioned you don't have the same harness of events, modules and handlers, so you would have to create a harness yourself which is not completely trivial (ok, understatement of the year:)) Where do you get the exceptions? Would it be possible to have exception handlers just around the code that makes the async operations?Anonymous
February 22, 2007
Hi Tess, I'm new to WinDbg and you blog was very helpful! I've got a question...When I run my application, the worker process crashes.. i started debugging using WinDbg.. when I open crash dumps, following exceptions is shown In w3wp__PID__1368__Date__02_22_2007__Time_11_07_03AM__329__Second_Chance_Exception_E0434F4D.dmp the assembly instruction at kernel32!RaiseException+53 in C:WINDOWSsystem32kernel32.dll from Microsoft Corporation has caused a CLR Exception of type (System.CannotUnloadAppDomainException) on thread 14 This exception originated from mscorwks!RaiseTheExceptionInternalOnly+226. Thread 14 - System ID 1568 Entry point mscorwks!ThreadpoolMgr::intermediateThreadProc Create time 2/22/2007 10:56:57 AM Time spent in user mode 0 Days 0:0:16.625 Time spent in kernel mode 0 Days 0:0:25.46 Function Arg 1 Arg 2 Arg 3 Source kernel32!RaiseException+53 e0434f4d 00000001 00000001 mscorwks!RaiseTheExceptionInternalOnly+226 1d00e1d0 00000000 00000000 mscorwks!RaiseTheException+4c 1d00e1d0 00000000 019dfb68 mscorwks!RaiseTheException+be 00000000 000e1f00 b59aaf96 mscorwks!RealCOMPlusThrow+37 1d00e1d0 00000000 7a0e0701 mscorwks!RealCOMPlusThrow+a 1d00e1d0 b40c20e3 7a36a7d0 mscorwks!Thread::RaiseCrossContextException+63 00000000 019dfc18 019dfc88 mscorwks!Thread::DoADCallBack+26c 00000007 79f3a0a1 019dfd88 mscorwks!Thread::UserResumeThread+e1 019dfd88 019dfd34 79f93fe6 mscorwks!Thread::DoADCallBack+355 019dfd88 b40c26eb 00000001 mscorwks!Thread::DoADCallBack+541 019dfd88 00000007 00000000 mscorwks!Thread::DoADCallBack+575 00000007 7a07bd61 019dfdf8 mscorwks!ManagedThreadBase::ThreadPool+13 00000007 7a07bd61 019dfdf8 mscorwks!QueueUserWorkItemCallback+9d 00110a90 77e6bb9d 7a38e228 mscorwks!ThreadpoolMgr::ExecuteWorkRequest+40 08e67868 b40c2503 00000000 mscorwks!ThreadpoolMgr::WorkerThreadStart+1f2 00000000 00000000 00000000 mscorwks!ThreadpoolMgr::intermediateThreadProc+49 000c89a0 00000000 00000000 kernel32!BaseThreadStart+34 79f710dd 000c89a0 00000000 Using this information i am not able to figure out where the error is occured. Also I am creating timer on thread in ASP.Net application and the timer is disposed in Application_End event. Can you give me some idea where should i start looking inorder to resolve the issue? Thanks mancheAnonymous
February 22, 2007
You can try to run !threads to see what the last exception was on that thread and run !pe on it, or run !dso to find the exception on the stack. It is definitely an unhandled .net exception but it is not possible from the stack you sent to see what the exception was.Anonymous
February 23, 2007
Thanks for your response... 0:014> !threads PDB symbol for mscorwks.dll not loaded ThreadCount: 10 UnstartedThread: 0 BackgroundThread: 10 PendingThread: 0 DeadThread: 0 Hosted Runtime: no PreEmptive GC Alloc Lock ID OSID ThreadOBJ State GC Context Domain Count APT Exception 14 1 620 000e1f00 1808220 Enabled 00000000:00000000 000dee68 0 STA (Threadpool Worker) System.CannotUnloadAppDomainException (1d00e1d0) 16 2 630 000ee228 b220 Enabled 00000000:00000000 000dee68 0 MTA (Finalizer) 17 3 880 00101f60 80a220 Enabled 00000000:00000000 000dee68 0 MTA (Threadpool Completion Port) 18 4 884 00105340 1220 Enabled 00000000:00000000 000dee68 0 Ukn 12 5 1ec 05983130 880a220 Enabled 00000000:00000000 000dee68 0 MTA (Threadpool Completion Port) 20 6 7c4 00176e68 180b220 Enabled 00000000:00000000 000dee68 0 MTA (Threadpool Worker) 21 7 9c0 059def98 880b220 Enabled 00000000:00000000 000dee68 0 MTA (Threadpool Completion Port) 25 a e6c 08cf8f58 180b220 Enabled 00000000:00000000 109aedd0 1 MTA (Threadpool Worker) 26 b 78c 08d80370 880b220 Enabled 00000000:00000000 000dee68 0 MTA (Threadpool Completion Port) 28 c f38 108e8770 7221 Enabled 00000000:00000000 1090fd38 0 STA 0:014> !dso OS Thread Id: 0x620 (14) ESP/REG Object Name 019df9f8 1d00e1d0 System.CannotUnloadAppDomainException 019df9fc 1d00e1d0 System.CannotUnloadAppDomainException 019dfa44 1d00e1d0 System.CannotUnloadAppDomainException 019dfa58 1d00e1d0 System.CannotUnloadAppDomainException 019dfaac 1d00e1d0 System.CannotUnloadAppDomainException 019dfab8 1d00e1d0 System.CannotUnloadAppDomainException 019dfb54 1cfe9cb4 System.CannotUnloadAppDomainException 019dfb58 1d00cc54 System.Byte[] 019dfb84 1d00e1d0 System.CannotUnloadAppDomainException 019dfb88 1d00cc54 System.Byte[] 019dfb98 1d00cc54 System.Byte[] 019dfc24 022e5f28 System.Threading.ExecutionContext 0:014> !pe Exception object: 1d00e1d0 Exception type: System.CannotUnloadAppDomainException Message: Error while unloading appdomain. (Exception from HRESULT: 0x80131015) InnerException: <none> StackTrace (generated): <none> StackTraceString: <none> HResult: 80131015 0:014> !do 1d00e1d0 Name: System.CannotUnloadAppDomainException MethodTable: 7915d434 EEClass: 791e7ea4 Size: 72(0x48) bytes (C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) Fields: MT Field Offset Type VT Attr Value Name 790fa3e0 40000b5 4 System.String 0 instance 1d00f048 _className 79109208 40000b6 8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod 790fa3e0 40000b7 c System.String 0 instance 1d00f7d8 _exceptionMethodString 790fa3e0 40000b8 10 System.String 0 instance 1d00f194 _message 79113dfc 40000b9 14 ...tions.IDictionary 0 instance 1d0104fc _data 790fa9e8 40000ba 18 System.Exception 0 instance 00000000 _innerException 790fa3e0 40000bb 1c System.String 0 instance 00000000 _helpURL 790f9c18 40000bc 20 System.Object 0 instance 00000000 _stackTrace 790fa3e0 40000bd 24 System.String 0 instance 00000000 _stackTraceString 790fa3e0 40000be 28 System.String 0 instance 1d011274 _remoteStackTraceString 790fed1c 40000bf 34 System.Int32 0 instance 0 _remoteStackIndex 790f9c18 40000c0 2c System.Object 0 instance 00000000 _dynamicMethods 790fed1c 40000c1 38 System.Int32 0 instance -2146234347 _HResult 790fa3e0 40000c2 30 System.String 0 instance 1d00fa2c _source 790fe160 40000c3 3c System.IntPtr 0 instance 0 _xptrs 790fed1c 40000c4 40 System.Int32 0 instance 0 _xcode 0:014> !do 1d00f048 Name: System.String MethodTable: 790fa3e0 EEClass: 790fa340 Size: 92(0x5c) bytes (C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) String: System.CannotUnloadAppDomainException Fields: MT Field Offset Type VT Attr Value Name 790fed1c 4000096 4 System.Int32 0 instance 38 m_arrayLength 790fed1c 4000097 8 System.Int32 0 instance 37 m_stringLength 790fbefc 4000098 c System.Char 0 instance 53 m_firstChar 790fa3e0 4000099 10 System.String 0 shared static Empty >> Domain:Value 000dee68:790d6584 109aedd0:790d6584 05a4bf60:790d6584 08da9588:790d6584 08e39ef0:790d6584 108cb728:790d6584 1090fd38:790d6584 << 79124670 400009a 14 System.Char[] 0 shared static WhitespaceChars >> Domain:Value 000dee68:022d13b8 109aedd0:02ae15b0 05a4bf60:023d4778 08da9588:024d163c 08e39ef0:025a5a2c 108cb728:0268db34 1090fd38:026ea248 <<Anonymous
February 23, 2007
Opps I accidently clicked on submit button.. I have verified the code and all the threads are disposed. Can you find any details with the give information? Once again thanks for all your help... Thanks mancheAnonymous
February 25, 2007
The comment has been removedAnonymous
February 26, 2007
The comment has been removedAnonymous
April 26, 2007
Unhandled exceptions cause ASP.NET-based applications to unexpectedly quit in the .NET Framework 2.0Anonymous
June 02, 2007
The comment has been removedAnonymous
June 24, 2007
These are the articles (in no particular order) that I felt best showed a thorough use of the windbgAnonymous
August 09, 2007
I cannot use a debugger to troubleshoot the issue in this case. The HttpModule you referred to works for a ASP.NET app.Anonymous
October 09, 2007
Hi Tess, Was hoping if you can give us some direction to look towards based on this output we got from windbg. This dump file has an exception of interest stored in it. The stored exception information can be accessed via .ecxr. (ec.117c): CLR exception - code e0434f4d (first/second chance not available) eax=1bd7f64c ebx=1b1352d8 ecx=00000000 edx=00000024 esi=1bd7f6d8 edi=e0434f4d eip=77e4bee7 esp=1bd7f648 ebp=1bd7f69c iopl=0 nv up ei pl nz na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202 kernel32!RaiseException+0x53: 77e4bee7 5e pop esi 0:033> !anlyze -v No export anlyze found 0:033> !analyze -v
- *
- Exception Analysis *
- *
*** WARNING: Unable to verify checksum for System.Web.ni.dll *** WARNING: Unable to verify checksum for mscorlib.ni.dll *** WARNING: Unable to verify checksum for System.ni.dll FAULTING_IP: kernel32!RaiseException+53 77e4bee7 5e pop esi EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 77e4bee7 (kernel32!RaiseException+0x00000053) ExceptionCode: e0434f4d (CLR exception) ExceptionFlags: 00000001 NumberParameters: 1 Parameter[0]: 80131509 DEFAULT_BUCKET_ID: CLR_EXCEPTION PROCESS_NAME: w3wp.exe ERROR_CODE: (NTSTATUS) 0xe0434f4d - <Unable to get error code text> NTGLOBALFLAG: 0 APPLICATION_VERIFIER_FLAGS: 0 MANAGED_STACK: ChildEBP RetAddr Caller,Callee EXCEPTION_OBJECT: !pe 28098d0 Exception object: 028098d0 Exception type: System.Net.WebException Message: The operation has timed out InnerException: <none> StackTrace (generated): <none> StackTraceString: <none> HResult: 80131509 MANAGED_OBJECT: !dumpobj 280c0d00280aba4 Name: System.String MethodTable: 790f9244 EEClass: 790f91a4 Size: 72(0x48) bytes (C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) String: The operation has timed out Fields: MT Field Offset Type VT Attr Value Name 790fdb60 4000096 4 System.Int32 0 instance 28 m_arrayLength 790fdb60 4000097 8 System.Int32 0 instance 27 m_stringLength 790fad38 4000098 c System.Char 0 instance 54 m_firstChar 790f9244 4000099 10 System.String 0 shared static Empty >> Domain:Value 000dfa00:790d57b4 00117138:790d57b4 << 79122994 400009a 14 System.Char[] 0 shared static WhitespaceChars >> Domain:Value 000dfa00:027203f0 00117138:027244a4 << EXCEPTION_MESSAGE: The operation has timed out LAST_CONTROL_TRANSFER: from 79f55b05 to 77e4bee7 STACK_TEXT: 1bd7f69c 79f55b05 e0434f4d 00000001 00000001 kernel32!RaiseException+0x53 1bd7f6fc 7a056a79 028098d0 00000000 00000000 mscorwks!RaiseTheExceptionInternalOnly+0x226 1bd7f710 7a056af2 028098d0 00000000 1bd7f828 mscorwks!RaiseTheException+0x4d 1bd7f738 7a056b30 00000000 1b1352d8 db9b9274 mscorwks!RaiseTheException+0xbf 1bd7f764 7a056b41 028098d0 00000000 7a0e38fa mscorwks!RealCOMPlusThrow+0x38 1bd7f770 7a0e38fa 028098d0 1e66c88c 7a36f194 mscorwks!RealCOMPlusThrow+0xb 1bd7f8a0 7a0e4b97 00000000 1bd7f8d8 1bd7f948 mscorwks!Thread::RaiseCrossContextException+0x3ac 1bd7f954 7a0e5a07 00000002 79f5e3aa 1bd7fa48 mscorwks!Thread::DoADCallBack+0x26c 1bd7f96c 79ed89ca 1bd7fa48 1bd7f9f4 79f55262 mscorwks!Thread::UserResumeThread+0xe1 1bd7fa00 79ed88f1 1bd7fa48 1e66ca84 00000001 mscorwks!Thread::DoADCallBack+0x355 1bd7fa3c 7a0e4d96 1bd7fa48 00000002 00000000 mscorwks!Thread::DoADCallBack+0x541 1bd7fa64 7a0e4dad 00000002 7a078575 1bd7fad0 mscorwks!Thread::DoADCallBack+0x575 1bd7fa78 7a07a99e 00000002 7a078575 1bd7fad0 mscorwks!ManagedThreadBase::KickOff+0x13 1bd7fb14 79ed8e36 1b174e60 1bd7fb50 00000000 mscorwks!ThreadNative::KickOffThread+0x230 1bd7ffb8 77e64829 1b16d2a0 00000000 00000000 mscorwks!Thread::intermediateThreadProc+0x49 1bd7ffec 00000000 79ed8df0 1b16d2a0 00000000 kernel32!BaseThreadStart+0x34 FOLLOWUP_IP: mscorwks!RaiseTheExceptionInternalOnly+226 79f55b05 c745fcfeffffff mov dword ptr [ebp-4],0FFFFFFFEh SYMBOL_STACK_INDEX: 1 FOLLOWUP_NAME: MachineOwner MODULE_NAME: mscorwks IMAGE_NAME: mscorwks.dll DEBUG_FLR_IMAGE_TIMESTAMP: 461f2e2a FAULTING_THREAD: 0000117c PRIMARY_PROBLEM_CLASS: CLR_EXCEPTION BUGCHECK_STR: APPLICATION_FAULT_CLR_EXCEPTION SYMBOL_NAME: mscorwks!RaiseTheExceptionInternalOnly+226 STACK_COMMAND: ~33s; .ecxr ; kb FAILURE_BUCKET_ID: APPLICATION_FAULT_CLR_EXCEPTION_System.Net.WebException_mscorwks!RaiseTheExceptionInternalOnly+226 BUCKET_ID: APPLICATION_FAULT_CLR_EXCEPTION_System.Net.WebException_mscorwks!RaiseTheExceptionInternalOnly+226 Followup: MachineOwner
Thanks, Neil
Anonymous
October 09, 2007
I would start of with !clrstack on the current thread (the one that throws the exception) and ~* e !clrstack to see what all threads are doing to get an idea of why its timing out.Anonymous
October 17, 2007
The comment has been removedAnonymous
October 17, 2007
Hi Ben, Sounds like it is not matching up the right version/key in the GAC. Is that the exact message you get (i.e. "codebase cannot be found")? You might want to read through this regarding how the probing is done as it might help you figure out why it fails. http://en.csharp-online.net/.NET_CLR_Components%E2%80%94Resolving_Names_to_Locations On a separate note, although it is best practice to store it in the GAC and i wouldn't recommend creating copies in the bin directory for all dlls, this dll is extremely small so removing the strong name and storing this one in the GAC wont really cause any noticeable memory changes, assuming that you dont have hundreds of different applications.Anonymous
October 17, 2007
Thanks Tess - you're right, the "codebase cannot be found" message is the one I see. How could I add this to the GAC (without a strong name) and reference it in my web.config file, inside the httpModules tag? This entry appears to require a strong name and this is where my error message originates from. Apologies for all the questions - although I've been coding in .NET for a while, I've had little experience in deploying these apps. Thanks again, BenAnonymous
October 17, 2007
The comment has been removedAnonymous
October 31, 2007
This has been a busy month for blogging for me, I'm up to a whopping 8 posts this month including thisAnonymous
November 13, 2007
Hi misters, is it possible use AppDomain.Currentdomain. UnhandledException event en ASP.NET 2.0 ?? I have this code: protected override void OnInit(EventArgs e) { base.OnInit(e); PantallaControlIULogging.TrazarDebug("Principal. OnInit."); PantallaControlIULogging.TrazarWarning("Principal. CurrentDomain_UnhandledException. "); AppDomain.CurrentDomain.UnhandledException -= new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); } and protected void Page_Load(object sender, EventArgs e) { PantallaControlIULogging.TrazarWarning("Principal. CurrentDomain_UnhandledException. "); AppDomain.CurrentDomain.UnhandledException -= new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); ... I don't get fire that event when throw an error protected void b2click(object sender, EventArgs e) { // Forzar error throw new Excepciones.BloqueoTareaExcepcion("ERROR BloqueoTareaExcepcion!!!"); I want to get the error and show it using javascript (alert). By other reasons, I cannot access to global.asax and I cannot use HttpApplication_Error event. Any help will be appreciated, and I'll be very grateful. Thanks in advance. Greetings, regards.Anonymous
November 14, 2007
Thank you, thank you, thank you, thank you. This helped me solve a major roadblock at work.Anonymous
April 02, 2008
wow. finally an easy to understand walkthrough on debugging! What I like is that it's not just the fix but the process of determining what caused the error in the first place and what all the little bits mean. Thank you very much!Anonymous
April 16, 2008
The comment has been removedAnonymous
April 16, 2008
It looks right assuming that the strong name is correct, except for that the name should probably be UnhandledExceptionModule rather than UnhandledExceptionMonitor unless you changed the name, in which case it should probably also be changed in the typeAnonymous
April 22, 2008
Hi Tess. hmm was getting tired! Changed that but still doesn't work. I will have another look at it. assuming once I've compiled the dll I can move it between machines, thats not the problem..? Thanks, MattAnonymous
May 02, 2008
Thank you, this article was very useful. I had the same issues carrying out the KB instructions on a production system as Ben Wagenaar mentioned in a previous comment. More about this on: http://andrasvass.blogspot.com/2008/05/aspnet-20-unhandled-exceptions-aka.html I ended up creating installers for the module - you can find them on Codeplex: https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=unhandledexception Perhaps it may help Matt solve his deployment problems (if he hasn't already...)Anonymous
May 30, 2008
Matt, I had the same problem as you. The issue (aside from what Tess mentioned), you're not forming the strong name correctly. You have: type="WebMonitor.UnhandledExceptionModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b30ebd417a518934, processorArchitecture=MSIL" What you want is this: type="WebMonitor.UnhandledExceptionModule, UnhandledExceptionModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b30ebd417a518934, processorArchitecture=MSIL" Notice the extra "UnhandledExceptionModule, " after the initial class name... Also, Tess, up above (http://blogs.msdn.com/tess/archive/2006/04/27/asp-net-2-0-crash-case-study-unhandled-exceptions.aspx#1081135) Howard brings up a potentially good point. Is he right?Anonymous
December 05, 2008
I received this error while coding a shared office Add-In. I had put some code in the Finalize-Method. Moving the code to the applications "close" event helped. Lesson learned: Don't mess around with finalize if you dont have to!Anonymous
December 11, 2008
Just one word to describe my thoughts on this article...Enlightened :)Anonymous
December 28, 2008
Hi Tess, it's really a good post for debuging crash. The two methods are both practical. Thanks very much for your great tech and expirence. Thanks for sharing! I'm your fan now :) Keep moving!Anonymous
January 15, 2009
The comment has been removedAnonymous
January 15, 2009
could be a lot of things, like running in a different user context etc. I would just get a dump and see what the exception is if you dont get that already from the eventlog entry, and from that try to figure out why it happens. Something is obviously different when you run it in task scheduler vs. manuallyAnonymous
February 08, 2009
I know there were already lots of discussions about this topic, but as a .NET developer and support engineer,Anonymous
February 13, 2009
Thanks! Your article helped me a lot!Anonymous
April 27, 2009
I know there were already lots of discussions about this topic, but as a .NET developer and support engineer,Anonymous
July 26, 2009
OK, got the error message on a laptop and I've read all of the above. My question(s) is... What does any of it mean? Can't I just re-install summink to get rid of the error?Anonymous
January 28, 2010
Hi Tess, Wow what a great article, one of the best I have read, and just what I needed. I have a W3wp web service that has recently started aborting for no apparent reason. Following you excellent tutorials I used WinDbg to try to ascertain the problem. Unfortunately I seem to have hit a brick wall in that when I try to trace back the exception I get stuck in the framework code and am unable to see how to trace back to the root cause. I was was wondering if you could give me any quick hints as to how next to progress in tracing back the real source of this exception. Many thanks for an excellent series. Acby 0:009> !threads ThreadCount: 15 UnstartedThread: 0 BackgroundThread: 13 PendingThread: 0 DeadThread: 1 Hosted Runtime: no PreEmptive GC Alloc Lock ID OSID ThreadOBJ State GC Context Domain Count APT Exception 7 1 30c 0169c3f0 8220 Enabled 00000000:00000000 01697520 0 Ukn 16 2 21bc 016aa9d8 b220 Enabled 00000000:00000000 01697520 0 MTA (Finalizer) 18 3 cc8 1a4203a0 80a220 Enabled 00000000:00000000 01697520 0 MTA (Threadpool Completion Port) 19 4 1f5c 1a420cb0 1220 Enabled 00000000:00000000 01697520 0 Ukn 20 5 1484 1a465fc8 180b220 Enabled 407862f8:4078763c 1a421200 0 MTA (Threadpool Worker) 21 6 d38 1a466398 180b220 Enabled 20409550:20409d58 1a421200 0 MTA (Threadpool Worker) 22 7 a54 1a466768 180b220 Enabled 387eaa20:387ec59c 1a421200 0 MTA (Threadpool Worker) 23 8 20fc 1a466b38 180b220 Enabled 20417da0:20417db8 1a421200 0 MTA (Threadpool Worker) 9 9 1270 1a466f08 880a220 Enabled 3cab03ac:3cab15a8 01697520 0 MTA (Threadpool Completion Port) System.InvalidOperationException (3caacbe4) XXXX a 0 1a4b5d98 9820 Enabled 00000000:00000000 01697520 0 MTA 3 c 1cb4 1a53fe80 220 Enabled 3c920744:3c922704 01697520 0 Ukn 25 b 1064 4a8faac0 200b020 Enabled 387a90fc:387aa520 1a421200 0 MTA 27 d 1f14 1b914a80 200b220 Enabled 20403f98:20405d58 1a421200 1 MTA 28 e 1a84 1b7e00a8 80a220 Enabled 00000000:00000000 01697520 0 MTA (Threadpool Completion Port) 30 f 2324 1a54c8e8 180b220 Enabled 40850890:40850a68 01697520 0 MTA (Threadpool Worker) 0:009> !do 1a466f08 <Note: this object has an invalid CLASS field> Invalid object 0:009> !do 3caacbe4 Name: System.InvalidOperationException MethodTable: 72068c50 EEClass: 71e34b64 Size: 72(0x48) bytes (C:WindowsassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) Fields: MT Field Offset Type VT Attr Value Name 72080b54 40000b5 4 System.String 0 instance 3caacc3c _className 7207ffc8 40000b6 8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod 72080b54 40000b7 c System.String 0 instance 3caadacc _exceptionMethodString 72080b54 40000b8 10 System.String 0 instance 3caacd80 _message 7207a4b0 40000b9 14 ...tions.IDictionary 0 instance 3caae330 _data 72080ce8 40000ba 18 System.Exception 0 instance 3caae848 _innerException 72080b54 40000bb 1c System.String 0 instance 00000000 _helpURL 72080770 40000bc 20 System.Object 0 instance 00000000 _stackTrace 72080b54 40000bd 24 System.String 0 instance 00000000 _stackTraceString 72080b54 40000be 28 System.String 0 instance 3caaf9b0 _remoteStackTraceString 72082da0 40000bf 34 System.Int32 1 instance 0 _remoteStackIndex 72080770 40000c0 2c System.Object 0 instance 00000000 _dynamicMethods 72082da0 40000c1 38 System.Int32 1 instance -2146233079 _HResult 72080b54 40000c2 30 System.String 0 instance 3caade38 _source 7208341c 40000c3 3c System.IntPtr 1 instance 0 _xptrs 72082da0 40000c4 40 System.Int32 1 instance 0 _xcode 0:009> !do 3caaf9b0 Name: System.String MethodTable: 72080b54 EEClass: 71e3d65c Size: 2554(0x9fa) bytes (C:WindowsassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) String: at System.Web.Services.Protocols.WebClientProtocol.ProcessAsyncException(WebClientAsyncResult client, Exception e, String method) at System.Web.Services.Protocols.WebClientProtocol.ReadResponseAsyncCallback(IAsyncResult asyncResult) at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Net.ContextAwareResult.CompleteCallback(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.ContextAwareResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) Fields: MT Field Offset Type VT Attr Value Name 72082da0 4000096 4 System.Int32 1 instance 1269 m_arrayLength 72082da0 4000097 8 System.Int32 1 instance 1268 m_stringLength 72081834 4000098 c System.Char 1 instance 20 m_firstChar 72080b54 4000099 10 System.String 0 shared static Empty >> Domain:Value 01697520:01d801d0 1a421200:01d801d0 << 72081784 400009a 14 System.Char[] 0 shared static WhitespaceChars >> Domain:Value 01697520:01d80728 1a421200:01d8548c << 0:009> !do 3caae848 Name: System.NullReferenceException MethodTable: 72070128 EEClass: 71e9e118 Size: 72(0x48) bytes (C:WindowsassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) Fields: MT Field Offset Type VT Attr Value Name 72080b54 40000b5 4 System.String 0 instance 3caae890 _className 7207ffc8 40000b6 8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod 72080b54 40000b7 c System.String 0 instance 3caaf630 _exceptionMethodString 72080b54 40000b8 10 System.String 0 instance 3caae91c _message 7207a4b0 40000b9 14 ...tions.IDictionary 0 instance 3caaf938 _data 72080ce8 40000ba 18 System.Exception 0 instance 00000000 _innerException 72080b54 40000bb 1c System.String 0 instance 00000000 _helpURL 72080770 40000bc 20 System.Object 0 instance 00000000 _stackTrace 72080b54 40000bd 24 System.String 0 instance 00000000 _stackTraceString 72080b54 40000be 28 System.String 0 instance 3caaeb30 _remoteStackTraceString 72082da0 40000bf 34 System.Int32 1 instance 0 _remoteStackIndex 72080770 40000c0 2c System.Object 0 instance 00000000 _dynamicMethods 72082da0 40000c1 38 System.Int32 1 instance -2147467261 _HResult 72080b54 40000c2 30 System.String 0 instance 3caaf8a4 _source 7208341c 40000c3 3c System.IntPtr 1 instance 0 _xptrs 72082da0 40000c4 40 System.Int32 1 instance 0 _xcode 0:009> !do 3caaeb30 Name: System.String MethodTable: 72080b54 EEClass: 71e3d65c Size: 2720(0xaa0) bytes (C:WindowsassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) String: at System.Web.HttpApplication.ThreadContext.Enter(Boolean setImpersonationContext) at System.Web.HttpApplication.OnThreadEnterPrivate(Boolean setImpersonationContext) at System.Web.AspNetSynchronizationContext.CallCallbackPossiblyUnderLock(SendOrPostCallback callback, Object state) at System.Web.AspNetSynchronizationContext.CallCallback(SendOrPostCallback callback, Object state) at System.Web.AspNetSynchronizationContext.Post(SendOrPostCallback callback, Object state) at System.ComponentModel.AsyncOperation.Post(SendOrPostCallback d, Object arg) at System.ComponentModel.AsyncOperation.PostOperationCompleted(SendOrPostCallback d, Object arg) at System.Web.Services.Protocols.HttpWebClientProtocol.OperationCompleted(Object userState, Object[] parameters, Exception e, Boolean canceled) at System.Web.Services.Protocols.SoapHttpClientProtocol.InvokeAsyncCallback(IAsyncResult result) at System.Web.Services.Protocols.WebClientAsyncResult.Complete() at System.Web.Services.Protocols.WebClientProtocol.ProcessAsyncResponseStreamResult(WebClientAsyncResult client, IAsyncResult asyncResult) at System.Web.Services.Protocols.WebClientProtocol.ReadAsyncResponseStream(WebClientAsyncResult client) at System.Web.Services.Protocols.WebClientProtocol.ReadResponseAsyncCallback(IAsyncResult asyncResult) Fields: MT Field Offset Type VT Attr Value Name 72082da0 4000096 4 System.Int32 1 instance 1352 m_arrayLength 72082da0 4000097 8 System.Int32 1 instance 1351 m_stringLength 72081834 4000098 c System.Char 1 instance 20 m_firstChar 72080b54 4000099 10 System.String 0 shared static Empty >> Domain:Value 01697520:01d801d0 1a421200:01d801d0 << 72081784 400009a 14 System.Char[] 0 shared static WhitespaceChars >> Domain:Value 01697520:01d80728 1a421200:01d8548c <<Anonymous
February 10, 2010
Wow. Even after 4 years this article is still helping folks like me. Thanks Tess! Another new fan. :-)Anonymous
March 03, 2010
Hello Tess trust me - i'm almost never writing any comments! So this here is an extraordinary exception: Thank you, thank you, thank you! For "0xe0434f4d is the exception code for CLR (.net) exceptions" for ADPlus for windbg ... This really made my day!Anonymous
March 28, 2010
I'm very thankful for ALL the above information, however, im VERY computer illiterate and have no clue how to get rid of the error message saying UNHANDLED EXCEPTION. It appears everytime Im on the internet and try to close a window or windows b4 shutting down system. HELP!Anonymous
March 16, 2011
Hope someone can help me out on this. I'm new to debugging and am desperately trying to make sense of all of this. Here's what I've got so far. Running adplus on my failing w3wp process, I received the following output files: FULLDUMP_FirstChance_epr_Process_Shut_Down_w3wp.exe__0878_2011-03-15_17-33-35-486_047c.dmp along with 30 or so MINIDUMP_FirstChance_av_AccessViolation_w3wp.exe__0878_2011-03-15_14-16-47-051_047c.dmp files. Using windg on theFullDump, i executed !threads and got PDB symbol for mscorwks.dll not loaded ThreadCount: 27 UnstartedThread: 0 BackgroundThread: 27 PendingThread: 0 DeadThread: 0 Hosted Runtime: no PreEmptive GC Alloc Lock ID OSID ThreadOBJ State GC Context Domain Count APT Exception XXXX 1 294 000e36a0 1808220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX 2 1b8 000f6010 b220 Enabled 00000000:00000000 000e8930 0 Ukn (Finalizer) XXXX 3 bb0 00113610 80a220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Completion Port) XXXX 4 214 00116d88 1220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX 5 a88 05d40ae0 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX 6 80c 05d75c38 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX 7 c28 05d709d8 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX 8 5c0 05e1b008 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX a 780 05e1ec70 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX d dd0 0bf59e78 180b220 Enabled 00000000:00000000 109b4460 1 Ukn (Threadpool Worker) XXXX e 3dc 0bf4d4b0 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX f 490 0bf5a248 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX 10 3c4 0bf92900 880a220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Completion Port) XXXX 12 454 0bf80408 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX 14 e74 0bf9b1d8 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX 16 124 0c00d270 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX 17 d38 0c022738 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX 18 d7c 0c080cb0 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX 13 460 0c0a31c0 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX c de4 10989598 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX 15 1700 0bf8b078 200b220 Enabled 00000000:00000000 109b4460 0 Ukn XXXX 9 cf4 109891c8 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX b 179c 0c0a3590 180b220 Enabled 00000000:00000000 000e8930 0 Ukn (Threadpool Worker) XXXX 19 1350 0bfdca88 180b220 Disabled 00000000:00000000 109b4460 1 Ukn (Threadpool Worker) System.StackOverflowException (026c106c) XXXX 11 1740 0c068d68 220 Enabled 00000000:00000000 000e8930 0 Ukn XXXX 1a 1144 05e1cdb0 200b220 Enabled 00000000:00000000 109b4460 1 Ukn XXXX 1b 1094 108ca1b0 220 Enabled 00000000:00000000 000e8930 0 Ukn then !do 026c106c which resulted in Name: System.StackOverflowException MethodTable: 04930dd8 EEClass: 0475262c Size: 72(0x48) bytes (C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) Fields: MT Field Offset Type VT Attr Value Name 04930b24 40000b5 4 System.String 0 instance 00000000 _className 0492ff98 40000b6 8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod 04930b24 40000b7 c System.String 0 instance 00000000 _exceptionMethodString 04930b24 40000b8 10 System.String 0 instance 00000000 _message 0492a480 40000b9 14 ...tions.IDictionary 0 instance 00000000 _data 04930cb8 40000ba 18 System.Exception 0 instance 00000000 _innerException 04930b24 40000bb 1c System.String 0 instance 00000000 _helpURL 04930740 40000bc 20 System.Object 0 instance 00000000 _stackTrace 04930b24 40000bd 24 System.String 0 instance 00000000 _stackTraceString 04930b24 40000be 28 System.String 0 instance 00000000 _remoteStackTraceString 04932d70 40000bf 34 System.Int32 1 instance 0 _remoteStackIndex 04930740 40000c0 2c System.Object 0 instance 00000000 _dynamicMethods 04932d70 40000c1 38 System.Int32 1 instance -2147023895 _HResult 04930b24 40000c2 30 System.String 0 instance 00000000 _source 049333ec 40000c3 3c System.IntPtr 1 instance 0 _xptrs 04932d70 40000c4 40 System.Int32 1 instance -532459699 _xcode But what do I do with a _remoteStackTraceString of 00000000? What does this mean? Any help would be GREATLY appreciated. Thanks, JPAnonymous
March 16, 2011
Hi JP, Stackoverflows are a bit special in the sense that they are only 1st chance exceptions even though they are "fatal" which means that you wont automatically get dumps on the stackoverflow. Try following the blogs.msdn.com/.../net-debugging-demos-lab5-crash-review.aspx walkthrough and get a dump with the unknonwn.cfg attached to that post to get a dump of the actual stackoverflow to see if you have some infinite recursion going on. TessAnonymous
April 13, 2011
Hey Tess My app server has frequent w3wp crashes and I got dumps from Debugdiag for the 2nd chance exception for the crashing w3wp process but dont know how to do drill down furhter. Can I have your thoughts about this? Report for w3wp__PID__6676__Date__04_14_2011__Time_04_19_20AM__724__Second_Chance_Exception_E0434F4D.dmp Type of Analysis Performed Crash Analysis Operating System Windows Server 2003 Service Pack 2 Number Of Processors 2 Process ID 6676 Process Image c:WINDOWSsystem32inetsrvw3wp.exe System Up-Time 13 day(s) 00:43:04 Process Up-Time 07:18:09 Thread 19 - System ID 3948 Entry point mscorwks!Thread::intermediateThreadProc Create time 4/13/2011 9:02:01 PM Time spent in user mode 0 Days 0:0:39.93 Time spent in kernel mode 0 Days 0:0:1.671 Function Arg 1 Arg 2 Arg 3 Source kernel32!RaiseException+3c e0434f4d 00000001 00000001 mscorwks!RaiseTheExceptionInternalOnly+2a8 26d6d490 00000000 00000000 mscorwks!RaiseTheException+4e 26d6d490 00000000 0725f954 mscorwks!RaiseTheException+c0 00000000 069519e0 ce105099 mscorwks!RealCOMPlusThrow+30 26d6d490 00000000 0725f960 mscorwks!RealCOMPlusThrow+d 26d6d490 88bd0db9 79f50648 mscorwks!Thread::RaiseCrossContextException+41f 00000000 0725f998 0725fa08 mscorwks!Thread::DoADCallBack+2a2 00000009 79ec434e 0725fb0c mscorwks!Thread::DoADCallBack+310 0725fb0c 0725fab8 79fa6abb mscorwks!Thread::ShouldChangeAbortToUnload+e3 0725fb0c 88bd0fd9 00000001 mscorwks!Thread::ShouldChangeAbortToUnload+30a 0725fb0c 00000009 00000000 mscorwks!Thread::ShouldChangeAbortToUnload+33e 00000009 79f47b65 00000000 mscorwks!ManagedThreadBase::ThreadPool+13 00000009 79f47b65 00000000 mscorwks!ManagedPerAppDomainTPCount::DispatchWorkItem+e9 00000000 00000000 77e619d1 mscorwks!ThreadpoolMgr::ExecuteWorkRequest+af 88bd08cd 00000000 79ec47b1 mscorwks!ThreadpoolMgr::WorkerThreadStart+20b 00000000 00000000 0725fcb8 mscorwks!Thread::intermediateThreadProc+49 06934538 00000000 00000000 kernel32!GetModuleHandleA+df 79f7571f 06934538 00000000 In w3wp__PID__6676__Date__04_14_2011__Time_04_19_20AM__724__Second_Chance_Exception_E0434F4D.dmp the assembly instruction at kernel32!RaiseException+3c in C:WINDOWSsystem32kernel32.dll from Microsoft Corporation has caused a CLR Exception of type (System.NullReferenceException) on thread 19 This exception originated from mscorwks!RaiseTheExceptionInternalOnly+2a8. Module Information Image Name: C:WINDOWSsystem32kernel32.dll Symbol Type: Export Base address: 0x77e40000 Time Stamp: Sat Mar 21 10:08:26 2009 Checksum: 0x00101b44 Comments: COM DLL: False Company Name: Microsoft Corporation ISAPIExtension: False File Description: Windows NT BASE API Client DLL ISAPIFilter: False File Version: 5.2.3790.4480 (srv03_sp2_gdr.090321-1244) Managed DLL: False Internal Name: kernel32 VB DLL: False Legal Copyright: © Microsoft Corporation. All rights reserved. Loaded Image Name: kernel32.dll Legal Trademarks: Mapped Image Name: Original filename: kernel32 Module name: kernel32 Private Build: Single Threaded: False Product Name: Microsoft® Windows® Operating System Module Size: 1.01 MBytes Product Version: 5.2.3790.4480 Symbol File Name: kernel32.dll Special Build: & Thnks SPAnonymous
April 13, 2011
Have you tried following the steps in the article, dumping out the exception etc.? that should give you the callstack of the place where you got the exceptionAnonymous
April 18, 2011
Hey Tess, Tried debugging with windbg and got the below info but its not suggesting anything wrong about ths app, What do you think? Thanks for ur help in advance. 0:018> !threads ThreadCount: 32 UnstartedThread: 0 BackgroundThread: 19 PendingThread: 0 DeadThread: 12 Hosted Runtime: no PreEmptive GC Alloc Lock ID OSID ThreadOBJ State GC Context Domain Count APT Exception 11 1 149c 000d8f68 1808220 Enabled 00000000:00000000 000d5a90 0 MTA (Threadpool Worker) 13 2 1988 000e4ef8 b220 Enabled 00000000:00000000 000d5a90 0 MTA (Finalizer) 14 3 1d24 000fd988 80a220 Enabled 00000000:00000000 000d5a90 0 MTA (Threadpool Completion Port) 15 4 1cd8 00100fd0 1220 Enabled 00000000:00000000 000d5a90 0 Ukn 9 5 18b0 0012dbe8 180a220 Enabled 00000000:00000000 000d5a90 0 MTA (Threadpool Worker) 17 7 15a8 05780b00 180b220 Enabled 00000000:00000000 000d5a90 0 MTA (Threadpool Worker) 18 8 7ac 0579f660 b020 Enabled 1cee7ba8:1cee937c 000d5a90 0 MTA System.Runtime.Serialization.SerializationException (1cee606c) 20 d 1774 058519a0 200b220 Enabled 00000000:00000000 057fc170 0 MTA 25 20 1ba8 0832dc38 200b220 Enabled 00000000:00000000 112b5688 0 MTA 3 12 18d4 113a15f0 220 Enabled 00000000:00000000 000d5a90 0 Ukn 2 1b 1818 000fec40 220 Enabled 00000000:00000000 000d5a90 0 Ukn 27 1c 1b8c 11560810 a80b220 Enabled 00000000:00000000 00101710 0 MTA (Threadpool Completion Port) 28 10 1ce0 115b4b78 200b220 Enabled 00000000:00000000 11547d50 0 MTA 29 e 1700 1687b9a8 200b220 Enabled 00000000:00000000 11547d50 0 MTA 30 b 17f0 1154a0a8 200b220 Enabled 00000000:00000000 11547d50 0 MTA 4 17 19ac 113fa338 220 Enabled 00000000:00000000 000d5a90 0 Ukn 31 29 e98 16a202d8 880b220 Enabled 00000000:00000000 000d5a90 0 MTA (Threadpool Completion Port) 33 2d 1c14 16a0f140 180b220 Enabled 00000000:00000000 000d5a90 0 MTA (Threadpool Worker) XXXX 30 0 1689eef0 9820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 2f 0 1696e880 8801820 Enabled 00000000:00000000 000d5a90 0 Ukn (Threadpool Completion Port) XXXX 27 0 1151caa8 10820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX a 0 113788e8 10820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 2c 0 114a4a78 10820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 34 0 168b2680 10820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 38 0 16910868 10820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 33 0 168e0588 10820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 16 0 16959748 10820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 13 0 1685d9d0 9820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 21 0 0583da00 9820 Enabled 00000000:00000000 000d5a90 0 Ukn XXXX 1d 0 057b9bc0 9820 Enabled 00000000:00000000 000d5a90 0 Ukn 43 2a 1f08 16a1f390 200b220 Enabled 00000000:00000000 00101710 0 MTA 44 2e fc 168191a0 200b220 Enabled 1ce26ce8:1ce28a18 00101710 0 MTA 0:018> !do 1cee606c Name: System.Runtime.Serialization.SerializationException MethodTable: 79313888 EEClass: 790e37d4 Size: 72(0x48) bytes (C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) Fields: MT Field Offset Type VT Attr Value Name 79330ac4 40000b5 4 System.String 0 instance 1cee60c4 _className 7932ff38 40000b6 8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod 79330ac4 40000b7 c System.String 0 instance 1cee6d68 _exceptionMethodString 79330ac4 40000b8 10 System.String 0 instance 1cee6240 _message 7932a420 40000b9 14 ...tions.IDictionary 0 instance 00000000 _data 79330c58 40000ba 18 System.Exception 0 instance 00000000 _innerException 79330ac4 40000bb 1c System.String 0 instance 00000000 _helpURL 793306e0 40000bc 20 System.Object 0 instance 00000000 _stackTrace 79330ac4 40000bd 24 System.String 0 instance 00000000 _stackTraceString 79330ac4 40000be 28 System.String 0 instance 1cee73a0 _remoteStackTraceString 79332d10 40000bf 34 System.Int32 1 instance 0 _remoteStackIndex 793306e0 40000c0 2c System.Object 0 instance 00000000 _dynamicMethods 79332d10 40000c1 38 System.Int32 1 instance -2146233076 _HResult 79330ac4 40000c2 30 System.String 0 instance 1cee7250 _source 7933338c 40000c3 3c System.IntPtr 1 instance 0 _xptrs 79332d10 40000c4 40 System.Int32 1 instance 0 _xcode 79330ac4 4000e4d 2a8 System.String 0 shared static _nullMessage >> Domain:Value 000d5a90:1ceb63c8 00101710:NotInit 057fc170:NotInit 058058a8:NotInit 05862878:NotInit 112b5688:NotInit 114ab458:NotInit 11547d50:NotInit 168b6648:NotInit << 0:018> !do 1cee73a0 Name: System.String MethodTable: 79330ac4 EEClass: 790ed65c Size: 2054(0x806) bytes (C:WINDOWSassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) String: at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(Object obj, MemoryStream stm) at System.AppDomain.Serialize(Object o) at System.AppDomain.MarshalObject(Object o) Fields: MT Field Offset Type VT Attr Value Name 79332d10 4000096 4 System.Int32 1 instance 1019 m_arrayLength 79332d10 4000097 8 System.Int32 1 instance 1018 m_stringLength 793317a4 4000098 c System.Char 1 instance 20 m_firstChar 79330ac4 4000099 10 System.String 0 shared static Empty >> Domain:Value 000d5a90:025f1198 00101710:025f1198 057fc170:025f1198 058058a8:025f1198 05862878:025f1198 112b5688:025f1198 114ab458:025f1198 11547d50:025f1198 168b6648:025f1198 << 793316f4 400009a 14 System.Char[] 0 shared static WhitespaceChars >> Domain:Value 000d5a90:025f16f0 00101710:025f63c8 057fc170:028c21c0 058058a8:02a72e6c 05862878:02b413d4 112b5688:027944cc 114ab458:0315b5f4 11547d50:0301534c 168b6648:14a3be14 <<