Skip to content

Instantly share code, notes, and snippets.

@osdezwart
Created December 23, 2010 22:28
Show Gist options
  • Save osdezwart/753631 to your computer and use it in GitHub Desktop.
Save osdezwart/753631 to your computer and use it in GitHub Desktop.
WinDbg debug session of infinite loop in Dictionary`2.FindEntry
private int FindEntry(TKey key)
{
if (key == null)
{
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);
}
if (this.buckets != null)
{
int num = this.comparer.GetHashCode(key) & 0x7fffffff;
for (int i = this.buckets[num % this.buckets.Length]; i >= 0; i = this.entries[i].next)
{
if ((this.entries[i].hashCode == num) && this.comparer.Equals(this.entries[i].key, key))
{
return i;
}
}
}
return -1;
}
0:000> .time
Debug session time: Tue Dec 7 12:01:19.000 2010 (UTC + 1:00)
System Uptime: 64 days 0:45:54.107
Process Uptime: 0 days 3:16:15.000
Kernel time: 0 days 0:00:30.000
User time: 0 days 2:41:36.000
0:000> !runaway
User Mode Time
Thread Time
24:32b0 0 days 1:22:24.328
25:2c78 0 days 0:42:45.546
28:4508 0 days 0:15:31.468
29:dfc 0 days 0:12:56.328
12:5c8 0 days 0:00:29.609
13:2bc8 0 days 0:00:12.218
30:35d4 0 days 0:00:03.125
4:2230 0 days 0:00:00.453
9:46a4 0 days 0:00:00.390
19:335c 0 days 0:00:00.375
5:2fcc 0 days 0:00:00.281
6:284c 0 days 0:00:00.265
3:3f6c 0 days 0:00:00.234
14:3b00 0 days 0:00:00.171
26:35ac 0 days 0:00:00.046
20:2f74 0 days 0:00:00.015
15:3c60 0 days 0:00:00.015
0:2fb0 0 days 0:00:00.015
32:4aa8 0 days 0:00:00.000
31:2818 0 days 0:00:00.000
27:1df4 0 days 0:00:00.000
23:27b8 0 days 0:00:00.000
22:934 0 days 0:00:00.000
21:4bf4 0 days 0:00:00.000
18:2404 0 days 0:00:00.000
17:37b8 0 days 0:00:00.000
16:2ad4 0 days 0:00:00.000
11:4b88 0 days 0:00:00.000
10:3c70 0 days 0:00:00.000
8:412c 0 days 0:00:00.000
7:38a4 0 days 0:00:00.000
2:3038 0 days 0:00:00.000
1:3ff0 0 days 0:00:00.000
Wow those are some long running threads for a asp.net application. I wonder what those threads are doing
0:000> ~24s
*** WARNING: Unable to verify checksum for mscorlib.ni.dll
eax=0000bcde ebx=000001af ecx=19c3e0c8 edx=00001570 esi=02d157dc edi=00000157
eip=725aad4b esp=1398db90 ebp=1398dba4 iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212
mscorlib_ni+0x6ead4b:
725aad4b 3b45ec cmp eax,dword ptr [ebp-14h] ss:002b:1398db90=0000bb2f
0:024> kb 2000
ChildEBP RetAddr Args to Child
1398dba4 725aaf65 14156526 00000000 0176e340 mscorlib_ni+0x6ead4b
1398dcdc 73eac70d 73eac7bc 13ae58f0 1398dd94 mscorlib_ni+0x6eaf65
1398dec8 73e7cc54 00000020 00000000 00080000 mscorwks!InvokeConstructorHelper+0x6d3
1398df08 73ec77dd 73ec77f5 0807a7da 1cb6619c mscorwks!AllocateObject+0x59
1398dfac 00000000 00000000 00000000 05f8d9a0 mscorwks!COMDelegate::InternalAllocLike+0xe2
0:024> !clrstack
OS Thread Id: 0x32b0 (24)
ESP EIP
1398db90 725aad4b System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].FindEntry(Int32)
1398dbac 725aaf65 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].ContainsKey(Int32)
1398dbb0 14156526 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableData(Int32, InheritableDataType, System.String ByRef, YYY.SpecializedProperties.LinkItemCollection ByRef)
1398dc7c 14156479 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableJavascriptLinks(Int32)
1398dc9c 1415617c XXX.YYY.Library.PageTypes.JavascriptAndCssExtensiblePageData.GetInheritedJavascriptLinks()
1398dcbc 141555c4 XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].BindJavascriptAndCss()
1398debc 1410d0cc XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].OnLoad(System.EventArgs)
1398decc 00caa7ec XXX.YYY.Templates.Pages.MultimediaDetailPage.OnLoad(System.EventArgs)
1398e08c 714fd993 System.Web.UI.Control.LoadRecursive()
1398e0a4 714f9a54 System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
1398e1fc 714f9674 System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
1398e234 714f95a1 System.Web.UI.Page.ProcessRequest()
1398e26c 714f9536 System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext)
1398e278 714f9512 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
1398e28c 00ca93d5 ASP.templates_xxx_pages_multimediadetailpage_aspx.ProcessRequest(System.Web.HttpContext)
1398e290 714ff9e6 System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
1398e2c4 714d2a5c System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
1398e304 714de1f3 System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
1398e354 714d1fdc System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
1398e370 714d554c System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
1398e3a4 714d51f3 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
1398e3b4 714d438c System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
1398e5c8 73f90256 [ContextTransitionFrame: 1398e5c8]
1398e5fc 73f90256 [GCFrame: 1398e5fc]
1398e758 73f90256 [ComMethodFrame: 1398e758]
0:024> ~25s
eax=07f74eb4 ebx=000001af ecx=19ac8d7c edx=00001570 esi=02d157dc edi=00001570
eip=725aad8d esp=0fcfec20 ebp=0fcfec34 iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212
mscorlib_ni+0x6ead8d:
725aad8d 8b7804 mov edi,dword ptr [eax+4] ds:002b:07f74eb8=00000157
0:025> !clrstack
OS Thread Id: 0x2c78 (25)
ESP EIP
0fcfec20 725aad8d System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].FindEntry(Int32)
0fcfec3c 725aaf65 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].ContainsKey(Int32)
0fcfec40 14156526 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableData(Int32, InheritableDataType, System.String ByRef, YYY.SpecializedProperties.LinkItemCollection ByRef)
0fcfed0c 14156479 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableJavascriptLinks(Int32)
0fcfed2c 1415617c XXX.YYY.Library.PageTypes.JavascriptAndCssExtensiblePageData.GetInheritedJavascriptLinks()
0fcfed4c 141555c4 XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].BindJavascriptAndCss()
0fcfef4c 1410d0cc XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].OnLoad(System.EventArgs)
0fcfef5c 00caa7ec XXX.YYY.Templates.Pages.MultimediaDetailPage.OnLoad(System.EventArgs)
0fcff11c 714fd993 System.Web.UI.Control.LoadRecursive()
0fcff134 714f9a54 System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
0fcff28c 714f9674 System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
0fcff2c4 714f95a1 System.Web.UI.Page.ProcessRequest()
0fcff2fc 714f9536 System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext)
0fcff308 714f9512 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
0fcff31c 00ca93d5 ASP.templates_XXX_pages_multimediadetailpage_aspx.ProcessRequest(System.Web.HttpContext)
0fcff320 714ff9e6 System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
0fcff354 714d2a5c System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
0fcff394 714de1f3 System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
0fcff3e4 714d1fdc System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
0fcff400 714d554c System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
0fcff434 714d51f3 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
0fcff444 714d438c System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
0fcff658 73f90256 [ContextTransitionFrame: 0fcff658]
0fcff68c 73f90256 [GCFrame: 0fcff68c]
0fcff7e8 73f90256 [ComMethodFrame: 0fcff7e8]
0:025> ~28s
eax=0000bcde ebx=000001af ecx=088366a0 edx=00001570 esi=02d157dc edi=00000157
eip=725aad4b esp=11f7e400 ebp=11f7e414 iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212
mscorlib_ni+0x6ead4b:
725aad4b 3b45ec cmp eax,dword ptr [ebp-14h] ss:002b:11f7e400=00018da2
0:028> !clrstack
OS Thread Id: 0x4508 (28)
ESP EIP
11f7e400 725aad4b System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].FindEntry(Int32)
11f7e41c 725aaf65 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].ContainsKey(Int32)
11f7e420 14156526 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableData(Int32, InheritableDataType, System.String ByRef, YYY.SpecializedProperties.LinkItemCollection ByRef)
11f7e4ec 14156479 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableJavascriptLinks(Int32)
11f7e50c 1415617c XXX.YYY.Library.PageTypes.JavascriptAndCssExtensiblePageData.GetInheritedJavascriptLinks()
11f7e52c 141555c4 XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].BindJavascriptAndCss()
11f7e72c 1410d0cc XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].OnLoad(System.EventArgs)
11f7e73c 00caa7ec XXX.YYY.Templates.Pages.MultimediaDetailPage.OnLoad(System.EventArgs)
11f7e8fc 714fd993 System.Web.UI.Control.LoadRecursive()
11f7e914 714f9a54 System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
11f7ea6c 714f9674 System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
11f7eaa4 714f95a1 System.Web.UI.Page.ProcessRequest()
11f7eadc 714f9536 System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext)
11f7eae8 714f9512 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
11f7eafc 00ca93d5 ASP.templates_XXX_pages_multimediadetailpage_aspx.ProcessRequest(System.Web.HttpContext)
11f7eb00 714ff9e6 System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
11f7eb34 714d2a5c System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
11f7eb74 714de1f3 System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
11f7ebc4 714d1fdc System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
11f7ebe0 714d554c System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
11f7ec14 714d51f3 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
11f7ec24 714d438c System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
11f7ee38 73f90256 [ContextTransitionFrame: 11f7ee38]
11f7ee6c 73f90256 [GCFrame: 11f7ee6c]
11f7efc8 73f90256 [ComMethodFrame: 11f7efc8]
0:028> ~29s
eax=0000bcde ebx=000001af ecx=088366a0 edx=00001570 esi=02d157dc edi=00000157
eip=725aad4b esp=11b6dfb0 ebp=11b6dfc4 iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212
mscorlib_ni+0x6ead4b:
725aad4b 3b45ec cmp eax,dword ptr [ebp-14h] ss:002b:11b6dfb0=00018da2
0:029> !clrstack
OS Thread Id: 0xdfc (29)
ESP EIP
11b6dfb0 725aad4b System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].FindEntry(Int32)
11b6dfcc 725aaf65 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Int32, mscorlib]].ContainsKey(Int32)
11b6dfd0 14156526 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableData(Int32, InheritableDataType, System.String ByRef, YYY.SpecializedProperties.LinkItemCollection ByRef)
11b6e09c 14156479 XXX.YYY.Library.Pages.PageInheritableData.GetPageInheritableJavascriptLinks(Int32)
11b6e0bc 1415617c XXX.YYY.Library.PageTypes.JavascriptAndCssExtensiblePageData.GetInheritedJavascriptLinks()
11b6e0dc 141555c4 XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].BindJavascriptAndCss()
11b6e2dc 1410d0cc XXX.YYY.Library.Pages.XXXBasePage`1[[System.__Canon, mscorlib]].OnLoad(System.EventArgs)
11b6e2ec 00caa7ec XXX.YYY.Templates.Pages.MultimediaDetailPage.OnLoad(System.EventArgs)
11b6e4ac 714fd993 System.Web.UI.Control.LoadRecursive()
11b6e4c4 714f9a54 System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
11b6e61c 714f9674 System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
11b6e654 714f95a1 System.Web.UI.Page.ProcessRequest()
11b6e68c 714f9536 System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext)
11b6e698 714f9512 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
11b6e6ac 00ca93d5 ASP.templates_XXX_pages_multimediadetailpage_aspx.ProcessRequest(System.Web.HttpContext)
11b6e6b0 714ff9e6 System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
11b6e6e4 714d2a5c System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
11b6e724 714de1f3 System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
11b6e774 714d1fdc System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
11b6e790 714d554c System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
11b6e7c4 714d51f3 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
11b6e7d4 714d438c System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
11b6e9e8 73f90256 [ContextTransitionFrame: 11b6e9e8]
11b6ea1c 73f90256 [GCFrame: 11b6ea1c]
11b6eb78 73f90256 [ComMethodFrame: 11b6eb78]
Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [D:\Olle\Projects\Dumps\w3wp (2)\w3wp (2).DMP]
User Mini Dump File with Full Memory: Only application data is available
Symbol search path is: srv*
Executable search path is:
Windows 7 Version 7600 MP (2 procs) Free x86 compatible
Product: Server, suite: TerminalServer SingleUserTS
Machine Name:
Debug session time: Tue Dec 7 12:01:19.000 2010 (UTC + 1:00)
System Uptime: 64 days 0:45:54.107
Process Uptime: 0 days 3:16:15.000
................................................................
................................................................
................................................................
................................................................
................................................................
..
Loading unloaded module list
............................
eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=00000154 edi=00000000
eip=77cef871 esp=0028fb2c ebp=0028fb98 iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202
ntdll!NtWaitForSingleObject+0x15:
77cef871 83c404 add esp,4
0:000> .loadby sos mscorwks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment