1、 异常查找、快速定位是经常要做的事情,在没有日志辅助的情况下,生产环境中的异常定位更是让伤脑筋。简单记述一下Windbg中的异常追踪。
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace WindbugDemo 7 { 8 public class Person 9 { 10 //认为BMI和21偏差最小的为最健康的 11 private const double BmiHelthConst = 21f; 12 13 public string Name { get; set; } 14 public int Age { get; set; } 15 public double Height { get; set; } 16 public double Weight { get; set; } 17 public double BmiVariance { get { return GetBmiVariance(); } } 18 //18岁至65岁可以Weight/(Height*Height)计算,否则抛出异常 19 public double GetBmiVariance() 20 { 21 if (Age > 65 || Age < 18) 22 throw new Exception("18岁以下65岁以上人群不适用此计算方法"); 23 double bmi = Math.Round(Weight / Math.Pow(Height, 2),2); 24 double variance = Math.Abs(bmi - BmiHelthConst); 25 return variance; 26 } 27 } 28 29 public class HelthCompare : IComparer<Person> 30 { 31 public int Compare(Person x, Person y) 32 { 33 34 double diffx = x.BmiVariance; 35 double diffy = y.BmiVariance; 36 if (diffx == diffy) 37 return 0; 38 if (diffx > diffy) 39 return 1; 40 return -1; 41 } 42 } 43 44 class Health 45 { 46 [STAThread] 47 static void Main(string[] args) 48 { 49 Person person1 = new Person { Name = "James", Age = 35, Height = 1.70, Weight = 70 }; 50 Person person2 = new Person { Name = "Tony", Age = 15, Height = 1.65, Weight = 60 }; 51 Person person3 = new Person { Name = "John", Age = 30, Height = 1.75, Weight = 90 }; 52 Person[] array = new Person[] { person1, person2, person3 }; 53 List<Person> list = new List<Person>(); 54 list.AddRange(array); 55 HelthCompare comparer = new HelthCompare(); 56 list.Sort(comparer); 57 foreach(var item in list) 58 { 59 string text = string.Format("Name:{0} Age:{1} Height:{2} Weight:{3} BMI Variance:{4}", 60 item.Name,item.Age, item.Height, item.Weight, item.BmiVariance); 61 System.Console.WriteLine(text); 62 } 63 Console.ReadKey(); 64 } 65 } 66 67 }
更改了上例中的部分代码,让程序抛出异常。
2、 跟上次一样,我们直接加载exe文件。然后加载CLR以及SOS,然后直接执行,让程序直接爆掉。Windbg输出见下面。
0:000> .restart Closing open log file d:\1.txt Opened log file 'd:\1.txt' CommandLine: D:\bin\Health.exe Symbol search path is: d:\bin;cache*d:\symbols;srv*http://msdl.microsoft.com/download/symbols Executable search path is: (dc4.774): Break instruction exception - code 80000003 (first chance) eax=00000000 ebx=00000000 ecx=0031f594 edx=775270b4 esi=fffffffe edi=00000000 eip=775804f6 esp=0031f5b0 ebp=0031f5dc iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 ntdll!LdrpDoDebuggerBreak+0x2c: 775804f6 cc int 3 0:000> .sympath+ d:\bin;.srcpath d:\source\02Health; Symbol search path is: d:\bin;cache*d:\symbols;srv*http://msdl.microsoft.com/download/symbols;.srcpath d:\source\02Health Expanded Symbol search path is: d:\bin;cache*d:\symbols;srv*http://msdl.microsoft.com/download/symbols;.srcpath d:\source\02health WARNING: Inaccessible path: '.srcpath d:\source\02Health' 0:000> .chain Extension DLL search Path: D:\WinDbg(x86)\WINXP;D:\WinDbg(x86)\winext;D:\WinDbg(x86)\winext\arcade;D:\WinDbg(x86)\pri;D:\WinDbg(x86);D:\WinDbg(x86)\winext\arcade;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\Microsoft.NET\Framework\v4.0.30319; Extension DLL chain: dbghelp: image 6.12.0002.633, API 6.1.6, built Tue Feb 02 04:08:26 2010 [path: D:\WinDbg(x86)\dbghelp.dll] ext: image 6.12.0002.633, API 1.0.0, built Tue Feb 02 04:08:31 2010 [path: D:\WinDbg(x86)\winext\ext.dll] exts: image 6.12.0002.633, API 1.0.0, built Tue Feb 02 04:08:24 2010 [path: D:\WinDbg(x86)\WINXP\exts.dll] uext: image 6.12.0002.633, API 1.0.0, built Tue Feb 02 04:08:23 2010 [path: D:\WinDbg(x86)\winext\uext.dll] ntsdexts: image 6.1.7650.0, API 1.0.0, built Tue Feb 02 04:08:08 2010 [path: D:\WinDbg(x86)\WINXP\ntsdexts.dll] 0:000> .reload Reloading current modules ..... 0:000> sxe ld:clrjit 0:000> g (dc4.774): Unknown exception - code 04242420 (first chance) ModLoad: 6d940000 6d9bd000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll eax=00000000 ebx=00000000 ecx=003637a4 edx=00000001 esi=7ffde000 edi=0031e5b0 eip=775270b4 esp=0031e4c8 ebp=0031e51c iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 ntdll!KiFastSystemCallRet: 775270b4 c3 ret 0:000> .loadby sos clr 0:000> g (dc4.774): CLR exception - code e0434352 (first chance) (dc4.774): CLR exception - code e0434352 (first chance) (dc4.774): CLR exception - code e0434352 (!!! second chance !!!) eax=0031eb5c ebx=00000005 ecx=00000005 edx=00000000 esi=0031ec18 edi=00000001 eip=7571b760 esp=0031eb5c ebp=0031ebac iopl=0 nv up ei pl nz na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000206 KERNELBASE!RaiseException+0x58: 7571b760 c9 leave 0:000> !pe Exception object: 01382bac Exception type: System.InvalidOperationException Message: Failed to compare two elements in the array. InnerException: System.Exception, Use !PrintException 0138296c to see more. StackTrace (generated): SP IP Function 0031ED28 66AC313C mscorlib_ni!System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].Sort(System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>)+0x12c 0031EE24 66AC2FDE mscorlib_ni!System.Array.Sort[[System.__Canon, mscorlib]](System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>)+0xce 0031EE50 66AC2E79 mscorlib_ni!System.Collections.Generic.List`1[[System.__Canon, mscorlib]].Sort(Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>)+0x59 0031EE6C 66AF05B7 mscorlib_ni!System.Collections.Generic.List`1[[System.__Canon, mscorlib]].Sort(System.Collections.Generic.IComparer`1<System.__Canon>)+0xb 0031EE70 011F038A Health!WindbugDemo.Health.Main(System.String[])+0x33a StackTraceString: <none> HResult: 80131509 There are nested exceptions on this thread. Run with -nested for details 0:000> !PrintException 0138296c Exception object: 0138296c Exception type: System.Exception Message: 18岁以下65岁以上人群不适用此计算方法 InnerException: <none> StackTrace (generated): SP IP Function 0031ECB0 011F09B3 Health!WindbugDemo.Person.GetBmiVariance()+0xb3 0031ED1C 011F08D6 Health!WindbugDemo.Person.get_BmiVariance()+0x2e 0031ED38 011F0816 Health!WindbugDemo.HelthCompare.Compare(WindbugDemo.Person, WindbugDemo.Person)+0x5e 0031ED74 66AC3375 mscorlib_ni!System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].SwapIfGreater(System.__Canon[], System.Collections.Generic.IComparer`1<System.__Canon>, Int32, Int32)+0x65 0031EDA0 66AC3192 mscorlib_ni!System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].DepthLimitedQuickSort(System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>, Int32)+0x42 0031EDF0 66AC3098 mscorlib_ni!System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].Sort(System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>)+0x88 StackTraceString: <none> HResult: 80131500 There are nested exceptions on this thread. Run with -nested for details
3 、程序执行后,遇到异常,直接中断执行。
我们可以直接使用 pe(PrintException)命令打印异常内容。
4、实际上Excption也是属于托管的,可以直接使用DumpObjet(do)命令来查看其内容。
0:000> !do 0138296c
Name: System.Exception
MethodTable: 66be3f60
EEClass: 667e392c
Size: 84(0x54) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
Fields:
MT Field Offset Type VT Attr Value Name
66be3e18 4000002 4 System.String 0 instance 0138b918 _className
66be2670 4000003 8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod
66be3e18 4000004 c System.String 0 instance 00000000 _exceptionMethodString
66be3e18 4000005 10 System.String 0 instance 013829c0 _message
66beb60c 4000006 14 ...tions.IDictionary 0 instance 00000000 _data
66be3f60 4000007 18 System.Exception 0 instance 00000000 _innerException
66be3e18 4000008 1c System.String 0 instance 00000000 _helpURL
66be41b8 4000009 20 System.Object 0 instance 01382ae0 _stackTrace
66be41b8 400000a 24 System.Object 0 instance 00000000 _watsonBuckets
66be3e18 400000b 28 System.String 0 instance 00000000 _stackTraceString
66be3e18 400000c 2c System.String 0 instance 00000000 _remoteStackTraceString
66be560c 400000d 3c System.Int32 1 instance 0 _remoteStackIndex
66be41b8 400000e 30 System.Object 0 instance 00000000 _dynamicMethods
66be560c 400000f 40 System.Int32 1 instance -2146233088 _HResult
66be3e18 4000010 34 System.String 0 instance 00000000 _source
66be2b8c 4000011 44 System.IntPtr 1 instance 0 _xptrs
66be560c 4000012 48 System.Int32 1 instance -532462766 _xcode
66bc7518 4000013 4c System.UIntPtr 1 instance 11f09b2 _ipForWatsonBuckets
66bdd6e0 4000014 38 ...ializationManager 0 instance 013829f8 _safeSerializationManager
66be41b8 4000001 0 System.Object 0 shared static s_EDILock
>> Domain:Value 000b4d50:NotInit <<
0:000> !do 013829c0
Name: System.String
MethodTable: 66be3e18
EEClass: 667e38f0
Size: 54(0x36) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
String: 18岁以下65岁以上人群不适用此计算方法
Fields:
MT Field Offset Type VT Attr Value Name
66be560c 40000ab 4 System.Int32 1 instance 20 m_stringLength
66be4810 40000ac 8 System.Char 1 instance 31 m_firstChar
66be3e18 40000ad c System.String 0 shared static Empty
>> Domain:Value 000b4d50:NotInit <<
5、有时候,我们需要程序发生异常的时候能够中断下来,这个时候,就需要使用sxe命令了(sxe 0xe0434f4d )。为什么要用这个常数呢?是因为所有的CLR异常代码都是这个定数。我们看到的Windbg输出只有First Chance了,没有Second Chance了。
0:000> .restart Closing open log file d:\1.txt Opened log file 'd:\1.txt' WARNING: Inaccessible path: '.srcpath d:\source\02Health' CommandLine: D:\bin\Health.exe WARNING: Inaccessible path: '.srcpath d:\source\02Health' Symbol search path is: d:\bin;cache*d:\symbols;srv*http://msdl.microsoft.com/download/symbols;.srcpath d:\source\02Health Executable search path is: (e70.c00): Break instruction exception - code 80000003 (first chance) eax=00000000 ebx=00000000 ecx=002ef890 edx=775270b4 esi=fffffffe edi=00000000 eip=775804f6 esp=002ef8ac ebp=002ef8d8 iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 ntdll!LdrpDoDebuggerBreak+0x2c: 775804f6 cc int 3 0:000> .sympath+ d:\bin;.srcpath d:\source\02Health; Symbol search path is: d:\bin;cache*d:\symbols;srv*http://msdl.microsoft.com/download/symbols;.srcpath d:\source\02Health Expanded Symbol search path is: d:\bin;cache*d:\symbols;srv*http://msdl.microsoft.com/download/symbols;.srcpath d:\source\02health WARNING: Inaccessible path: '.srcpath d:\source\02Health' 0:000> .reload Reloading current modules ..... 0:000> sxe ld:clrjit 0:000> g (e70.c00): Unknown exception - code 04242420 (first chance) ModLoad: 6d8c0000 6d93d000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll eax=00000000 ebx=00000000 ecx=001837a4 edx=00000001 esi=7ffdf000 edi=002ee8b0 eip=775270b4 esp=002ee7c8 ebp=002ee81c iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 ntdll!KiFastSystemCallRet: 775270b4 c3 ret 0:000> .loadby sos clr 0:000> sxe 0xe0434f4d 0:000> g (e70.c00): CLR exception - code e0434352 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. eax=002eede4 ebx=00000005 ecx=00000005 edx=00000000 esi=002eeea0 edi=00000001 eip=7571b760 esp=002eede4 ebp=002eee34 iopl=0 nv up ei pl nz ac pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000216 KERNELBASE!RaiseException+0x58: 7571b760 c9 leave
6、我们就可以使用相应的命令,来查看异常发生的原因了。
0:000> !clrstack -p OS Thread Id: 0xc00 (0) Child SP IP Call Site 002eeef4 7571b760 [HelperMethodFrame: 002eeef4] 002eefb0 005609b3 *** WARNING: Unable to verify checksum for Health.exe WindbugDemo.Person.GetBmiVariance() [d:\source\02Health\Health.cs @ 23] PARAMETERS: this (0x002eefb8) = 0x01a7227c 002ef01c 005608d6 WindbugDemo.Person.get_BmiVariance() [d:\source\02Health\Health.cs @ 17] PARAMETERS: this (0x002ef01c) = 0x01a7227c 002ef038 00560816 WindbugDemo.HelthCompare.Compare(WindbugDemo.Person, WindbugDemo.Person) [d:\source\02Health\Health.cs @ 35] PARAMETERS: this (0x002ef064) = 0x01a7233c x (0x002ef038) = 0x01a7225c y (0x002ef070) = 0x01a7227c 002ef074 67833375 *** WARNING: Unable to verify checksum for C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\d1265d6159ea876f9d63ea4c1361b587\mscorlib.ni.dll System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].SwapIfGreater(System.__Canon[], System.Collections.Generic.IComparer`1<System.__Canon>, Int32, Int32) PARAMETERS: keys (<CLR reg>) = 0x01a72300 comparer = <no data> a (0x002ef09c) = 0x00000000 b (0x002ef098) = 0x00000001 002ef0a0 67833192 System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].DepthLimitedQuickSort(System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>, Int32) PARAMETERS: keys (<CLR reg>) = 0x01a72300 left (<CLR reg>) = 0x00000000 right (0x002ef0ec) = 0x00000002 comparer (0x002ef0e8) = 0x01a7233c depthLimit (0x002ef0e4) = 0x00000020 002ef0f0 67833098 System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].Sort(System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>) PARAMETERS: this (0x002ef0f0) = 0x01a723c0 keys = <no data> index = <no data> length = <no data> comparer (0x002ef118) = 0x01a7233c 002ef124 67832fde System.Array.Sort[[System.__Canon, mscorlib]](System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>) PARAMETERS: array = <no data> index = <no data> length = <no data> comparer = <no data> 002ef150 67832e79 System.Collections.Generic.List`1[[System.__Canon, mscorlib]].Sort(Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>) PARAMETERS: this (<CLR reg>) = 0x01a722d8 index = <no data> count = <no data> comparer = <no data> 002ef16c 678605b7 System.Collections.Generic.List`1[[System.__Canon, mscorlib]].Sort(System.Collections.Generic.IComparer`1<System.__Canon>) PARAMETERS: this = <no data> comparer = <no data> 002ef170 0056038a WindbugDemo.Health.Main(System.String[]) [d:\source\02Health\Health.cs @ 56] PARAMETERS: args (0x002ef258) = 0x01a72180 002ef3f8 68b32552 [GCFrame: 002ef3f8] 0:000> !do 0x01a7227c Name: WindbugDemo.Person MethodTable: 001838c8 EEClass: 00181358 Size: 32(0x20) bytes File: D:\bin\Health.exe Fields: MT Field Offset Type VT Attr Value Name 67953e18 4000002 14 System.String 0 instance 01a721a8 <Name>k__BackingField 6795560c 4000003 18 System.Int32 1 instance 15 <Age>k__BackingField 6795fa00 4000004 4 System.Double 1 instance 1.650000 <Height>k__BackingField 6795fa00 4000005 c System.Double 1 instance 60.000000 <Weight>k__BackingField
结合程序,发现原来是输入的年龄小于18岁,导致程序抛出了异常。
7、可以输入~*kb;!clrstack命令查看调用堆栈信息。
~*kb;!clrstack . 0 Id: e70.c00 Suspend: 1 Teb: 7ffdf000 Unfrozen ChildEBP RetAddr Args to Child 002eee34 68c88fdb e0434352 00000001 00000005 KERNELBASE!RaiseException+0x58 002eeed4 68c89c19 00000000 19b6d585 002eeff0 clr!RaiseTheExceptionInternalOnly+0x27f 002eefa8 005609b3 01a729c0 01a7296c 01a7227c clr!IL_Throw+0x13e WARNING: Frame IP not in any known module. Following frames may be wrong. 002ef068 67833375 01a7227c 01a7227c 01a7233c 0x5609b3 002ef08c 67833192 00184030 00000001 00000000 mscorlib_ni+0x2e3375 002ef0d8 67833098 00184030 00000020 01a7233c mscorlib_ni+0x2e3192 002ef110 67832fde 01a7233c 00000003 00000000 mscorlib_ni+0x2e3098 002ef13c 67832e79 00183ee8 01a7233c 00000003 mscorlib_ni+0x2e2fde 002ef15c 678605b7 01a7233c 00000003 0056038a mscorlib_ni+0x2e2e79 002ef278 68b32552 003dd090 002ef2d8 68b3f237 mscorlib_ni+0x3105b7 002ef284 68b3f237 002ef31c 002ef2c8 68c88ad2 clr!CallDescrWorkerInternal+0x34 002ef2d8 68b3ff60 00000000 00000001 002ef338 clr!CallDescrWorkerWithHandler+0x6b 002ef350 68c5671c 002ef44c 19b6ce59 001837a4 clr!MethodDescCallSite::CallTargetWorker+0x152 002ef474 68c56840 01a72180 00000000 19b6cea5 clr!RunMain+0x1aa 002ef6e8 68c93dc5 00000000 19b6ccd5 00e60000 clr!Assembly::ExecuteMainMethod+0x124 002efbe8 68c93e68 19b6c66d 00000000 00000000 clr!SystemDomain::ExecuteMainMethod+0x63c 002efc40 68c93f7a 19b6c6ad 00000000 00000000 clr!ExecuteEXE+0x4c 002efc80 68c96b86 19b6c691 00000000 00000000 clr!_CorExeMainInternal+0xdc 002efcbc 6f57ffcc 19b7cf6a 00000000 773a33d3 clr!_CorExeMain+0x4d 002efcf8 6f5f7f16 00000000 6f570000 002efd1c mscoreei!_CorExeMain+0x10a 002efd08 6f5f4de3 00000000 773a3c45 7ffd9000 MSCOREE!ShellShim__CorExeMain+0x99 002efd10 773a3c45 7ffd9000 002efd5c 775437f5 MSCOREE!_CorExeMain_Exported+0x8 002efd1c 775437f5 7ffd9000 77570d4f 00000000 KERNEL32!BaseThreadInitThunk+0xe 002efd5c 775437c8 6f5f4ddb 7ffd9000 00000000 ntdll!__RtlUserThreadStart+0x70 002efd74 00000000 6f5f4ddb 7ffd9000 00000000 ntdll!_RtlUserThreadStart+0x1b 1 Id: e70.ac4 Suspend: 1 Teb: 7ffde000 Unfrozen ChildEBP RetAddr Args to Child 00bbf818 77526a04 757169dc 00000003 00bbf86c ntdll!KiFastSystemCallRet 00bbf81c 757169dc 00000003 00bbf86c 00000001 ntdll!ZwWaitForMultipleObjects+0xc 00bbf8b8 7739bc8e 00bbf86c 00bbf8e0 00000000 KERNELBASE!WaitForMultipleObjectsEx+0x100 00bbf900 68c4d143 00000003 7ffd9000 00000000 KERNEL32!WaitForMultipleObjectsExImplementation+0xe0 00bbf964 68c4d099 1923c3b9 00000000 00000000 clr!DebuggerRCThread::MainLoop+0x98 00bbf994 68c4cfc8 1923c38d 00000000 00000000 clr!DebuggerRCThread::ThreadProc+0xcb 00bbf9c0 773a3c45 00000000 00bbfa0c 775437f5 clr!DebuggerRCThread::ThreadProcStatic+0xb9 00bbf9cc 775437f5 00000000 77c20a1f 00000000 KERNEL32!BaseThreadInitThunk+0xe 00bbfa0c 775437c8 68c4cf5c 00000000 00000000 ntdll!__RtlUserThreadStart+0x70 00bbfa24 00000000 68c4cf5c 00000000 00000000 ntdll!_RtlUserThreadStart+0x1b 2 Id: e70.af8 Suspend: 1 Teb: 7ffdd000 Unfrozen ChildEBP RetAddr Args to Child 00daeab0 775269f4 7750830a 00000190 00daeaf4 ntdll!KiFastSystemCallRet 00daeab4 7750830a 00000190 00daeaf4 00000000 ntdll!NtWaitForKeyedEvent+0xc 00daeb18 77508c81 003fd080 00000194 00000000 ntdll!TppWaitpSet+0x206 00daeb8c 77508dfa 003fd080 00000194 00000000 ntdll!TpSetWait+0xf2 00daebd4 77508cf2 00000001 003fd020 77a31c37 ntdll!TppTimerpInitTimerQueueQueue+0xb0 00daec24 7754f56a 003fc1fc 77a31c4f 003fac30 ntdll!TppTimerpAllocTimerQueue+0x198 00daec5c 7754f457 003fcf50 003fc1b0 77a31cbf ntdll!TppTimerpAcquirePoolTimerQueue+0x31 00daecac 7754f36c 00daed4c 771edd23 00000000 ntdll!TppTimerAlloc+0x177 00daed24 75721919 00daed4c 771edd23 00000000 ntdll!TpAllocTimer+0x99 00daed3c 7720e49f 771edd23 00000000 00000000 KERNELBASE!CreateThreadpoolTimer+0x18 00daed54 77211f3b 771edd23 00000000 00daed74 RPCRT4!RPC_THREAD_POOL::CreateTimer+0x21 00daed80 7720b280 00000001 00007530 00000009 RPCRT4!GarbageCollectionNeeded+0x27 00daedb8 7720b768 003fc050 003fac78 003fac78 RPCRT4!LRPC_CASSOCIATION::RemoveReference+0xda 00daedd4 7720b6f5 00000001 7720e69c 003fbf28 RPCRT4!LRPC_FAST_BINDING_HANDLE::ResetBindState+0x99 00daede8 7720b0d2 00000001 003fab98 7720b025 RPCRT4!LRPC_FAST_BINDING_HANDLE::Unbind+0x30 00daedf4 7720b025 003faf24 00daee20 77210fa3 RPCRT4!LRPC_BASE_BINDING_HANDLE::FreeObject+0xf 00daee00 77210fa3 003fab98 00000000 00000100 RPCRT4!RpcBindingFree+0x50 00daee20 77210f55 003f7cc4 003fbf28 003faf10 RPCRT4!NDRCContextUnmarshallInternal+0x88 00daee44 7720fe0a 00daeee8 00daf2dc 76acba68 RPCRT4!NdrUnmarshallHandle+0x71 00daeea4 77265764 19437558 7753ede7 fffffffe RPCRT4!NdrpClientUnMarshal+0x158 00daf2bc 76ad1b9e 76acb9c8 76acedfa 00daf2dc RPCRT4!NdrClientCall2+0x27f 00daf2d4 76ad1b33 003f7cc4 19437486 7753ede7 ADVAPI32!LsarClose+0x19 00daf310 76ad17c7 003f7cc0 00000000 00000000 ADVAPI32!LsaClose+0x38 00daf34c 76ad0c3a 00000000 00000000 00000000 ADVAPI32!CacheDomainAndDnsDomainSids+0xdb 00daf38c 76ac2007 00000001 00000000 00000001 ADVAPI32!InitializeSidLookupTable+0xe1 00daf3e4 76ac1f87 00000000 00000000 00000000 ADVAPI32!LocalConvertStringSDToSD_Rev1+0x65 00daf40c 68c9597c 00daf468 00000001 00daf44c ADVAPI32!ConvertStringSecurityDescriptorToSecurityDescriptorW+0x31 00daf67c 68c95a89 00000000 00000000 00daf6ac clr!ProfilingAPIAttachDetach::GetSecurityDescriptor+0x18d 00daf694 68c528b4 1942cc8d 00000000 00000040 clr!ProfilingAPIAttachDetach::InitSecurityAttributes+0x15 00dafb1c 7739bbe4 00390000 00000000 003e6fc0 clr!ProfilingAPIAttachDetach::InitializeForOnDemandMode+0xc4 00dafb30 68b44da7 00390000 00000000 003e6fc0 KERNEL32!HeapFree+0x14 00dafb48 00dafaf0 003e6fc0 00dafc44 68cbf7e4 clr!EEHeapFree+0x31 WARNING: Frame IP not in any known module. Following frames may be wrong. 00dafb64 68cca909 00000000 00000000 00000000 0xdafaf0 00dafc44 774fe0ec 002ae26b 00000000 00dafc6c clr!Thread::intermediateThreadProc+0x4d 00dafc54 775437c8 68cca8c0 003e6fc0 00000000 ntdll!_load_config_used+0x6c 00dafc6c 00000000 68cca8c0 003e6fc0 00000000 ntdll!_RtlUserThreadStart+0x1b OS Thread Id: 0xc00 (0) Child SP IP Call Site 002eeef4 7571b760 [HelperMethodFrame: 002eeef4] 002eefb0 005609b3 WindbugDemo.Person.GetBmiVariance() [d:\source\02Health\Health.cs @ 23] 002ef01c 005608d6 WindbugDemo.Person.get_BmiVariance() [d:\source\02Health\Health.cs @ 17] 002ef038 00560816 WindbugDemo.HelthCompare.Compare(WindbugDemo.Person, WindbugDemo.Person) [d:\source\02Health\Health.cs @ 35] 002ef074 67833375 System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].SwapIfGreater(System.__Canon[], System.Collections.Generic.IComparer`1<System.__Canon>, Int32, Int32) 002ef0a0 67833192 System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].DepthLimitedQuickSort(System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>, Int32) 002ef0f0 67833098 System.Collections.Generic.ArraySortHelper`1[[System.__Canon, mscorlib]].Sort(System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>) 002ef124 67832fde System.Array.Sort[[System.__Canon, mscorlib]](System.__Canon[], Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>) 002ef150 67832e79 System.Collections.Generic.List`1[[System.__Canon, mscorlib]].Sort(Int32, Int32, System.Collections.Generic.IComparer`1<System.__Canon>) 002ef16c 678605b7 System.Collections.Generic.List`1[[System.__Canon, mscorlib]].Sort(System.Collections.Generic.IComparer`1<System.__Canon>) 002ef170 0056038a WindbugDemo.Health.Main(System.String[]) [d:\source\02Health\Health.cs @ 56] 002ef3f8 68b32552 [GCFrame: 002ef3f8]