使用-crash模式抓的dump文件,打开2nd chance exception的dump
0:037> .loadby sos mscorwks
0:037> .reload
................................................................
................................................................
.............................
Missing image name, possible paged-out or corrupt data.
Loading unloaded module list
...
0:037> kb 2000
RetAddr : Args to Child : Call Site
00000642`7f53c8e5 : 00000000`04553010 00000000`00000055 00000000`e0434f4d 00000000`04553010 : kernel32!RaiseException+0x5c
00000642`7f8b55e7 : 00000000`8252c780 00000000`00000000 00000642`00000000 00000642`00000001 : mscorwks!RaiseTheExceptionInternalOnly+0x295
00000642`7f8b62c6 : 00002026`00000001 00000642`00000000 00008653`fba98e98 00000000`00000000 : mscorwks!RaiseTheException+0x57
00000642`7f938b55 : 00000000`00000055 00000000`04553001 00000000`00000015 00000000`00000000 : mscorwks!BStrFromString+0x66
00000642`7f938b6b : 00000000`8252c780 00000000`00000000 00000000`00000000 00000000`00000000 : mscorwks!RealCOMPlusThrow+0x35
00000642`7f956b56 : 00000000`07d9f7c0 ffffffff`ffffffff 00000000`00000003 00000000`00000000 : mscorwks!RealCOMPlusThrow+0xb
00000642`7f7fc3b8 : 00000000`00000000 00000000`07d9f9c8 ffffffff`00000001 00000000`044ad2e0 : mscorwks!Thread::RaiseCrossContextException+0x2d6
00000642`7f447f0d : 00000000`00000000 00000000`00000001 00000000`00000000 00000642`7f50946a : mscorwks!`string'+0x62638
00000642`7f556aa9 : 00000000`0d4654cd 00000642`7f496500 00000000`00000000 00000000`07d9fba8 : mscorwks!Thread::DoADCallBack+0x4ad
00000642`7f43afdd : 00000000`044ad2e0 00000000`04553010 00000000`07d9fab0 00000000`0010a0a0 : mscorwks!CNgenEntryBind::Create+0x15d
00000642`7f435296 : 00000000`07d9fba8 ffffffff`ffffffff 00000000`04553010 00000000`07d9e710 : mscorwks!MethodTable::IsAbstract+0x49
00000642`7f4162bb : ffffffff`fffffffe 00000000`00000001 ffffffff`fffffffe 00000000`0a51cd50 : mscorwks!AddTimerCallbackEx+0xba
00000642`7f495fa7 : ffffffff`fffffffe 00000000`00000001 00000000`00000000 00000000`00000001 : mscorwks!ThreadpoolMgr::AsyncTimerCallbackCompletion+0x53
00000642`7f4aad0a : 00000000`00000001 00000000`00000000 00000000`00000002 00000000`04553010 : mscorwks!UnManagedPerAppDomainTPCount::DispatchWorkItem+0x157
00000642`7f41f9a0 : 00000000`00000000 00000000`00000000 00000000`07d9ff50 00000000`00000000 : mscorwks!ThreadpoolMgr::WorkerThreadStart+0x1ba
00000000`77d6b6da : 00000000`77d6b6a0 00000000`00000000 00000000`00000000 00000000`07d9ffa8 : mscorwks!Thread::intermediateThreadProc+0x78
00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadStart+0x3a
0:037> !clrstack
OS Thread Id: 0x17e0 (37)
Child-SP RetAddr Call Site
0:037> kL 2000
Child-SP RetAddr Call Site
00000000`07d9f3d0 00000642`7f53c8e5 kernel32!RaiseException+0x5c
00000000`07d9f4a0 00000642`7f8b55e7 mscorwks!RaiseTheExceptionInternalOnly+0x295
00000000`07d9f570 00000642`7f8b62c6 mscorwks!RaiseTheException+0x57
00000000`07d9f5a0 00000642`7f938b55 mscorwks!BStrFromString+0x66
00000000`07d9f5d0 00000642`7f938b6b mscorwks!RealCOMPlusThrow+0x35
00000000`07d9f640 00000642`7f956b56 mscorwks!RealCOMPlusThrow+0xb
00000000`07d9f670 00000642`7f7fc3b8 mscorwks!Thread::RaiseCrossContextException+0x2d6
00000000`07d9f880 00000642`7f447f0d mscorwks!`string'+0x62638
00000000`07d9f9f0 00000642`7f556aa9 mscorwks!Thread::DoADCallBack+0x4ad
00000000`07d9fa40 00000642`7f43afdd mscorwks!CNgenEntryBind::Create+0x15d
00000000`07d9fb10 00000642`7f435296 mscorwks!MethodTable::IsAbstract+0x49
00000000`07d9fb50 00000642`7f4162bb mscorwks!AddTimerCallbackEx+0xba
00000000`07d9fc10 00000642`7f495fa7 mscorwks!ThreadpoolMgr::AsyncTimerCallbackCompletion+0x53
00000000`07d9fc70 00000642`7f4aad0a mscorwks!UnManagedPerAppDomainTPCount::DispatchWorkItem+0x157
00000000`07d9fd10 00000642`7f41f9a0 mscorwks!ThreadpoolMgr::WorkerThreadStart+0x1ba
00000000`07d9fdb0 00000000`77d6b6da mscorwks!Thread::intermediateThreadProc+0x78
00000000`07d9ff80 00000000`00000000 kernel32!BaseThreadStart+0x3a
0:037> !pe (打印出这个exception)
Exception object: 000000008252c780
Exception type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
InnerException: <none>
StackTrace (generated):
<none>
StackTraceString: <none>
HResult: 80004003
0:037> !dso(dump stack object)
OS Thread Id: 0x17e0 (37)
RSP/REG Object Name
0000000007d9f468 000000008252c780 System.NullReferenceException
0000000007d9f570 000000008252c780 System.NullReferenceException
0000000007d9f640 000000008252c780 System.NullReferenceException
0000000007d9f6b0 000000008252c780 System.NullReferenceException
0000000007d9f6e8 000000008232a548 System.NullReferenceException<---(把最原始的异常找出来)
0000000007d9f740 00000001600aa398 System.Threading.Thread
0:037> !pe 000000008232a548(看最原始的异常)
Exception object: 000000008232a548
Exception type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
InnerException: <none>
StackTrace (generated):
SP IP Function
0000000007D9C600 00000642BD3E863C System_Web_ni!System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(System.Object)+0x2d9a2c
0000000007D9EB40 000006427830C878 mscorlib_ni!System.Threading.ExecutionContext.runTryCode(System.Object)+0x178
0000000007D9F3F0 0000000000000001 mscorlib_ni!System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)+0x2
0000000007D9F3F0 00000642782F1702 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback, System.Object)+0x62
0000000007D9F440 000006427834D696 mscorlib_ni!System.Threading._TimerCallback.PerformTimerCallback(System.Object)+0x86
StackTraceString: <none>
HResult: 80004003