views:

1343

answers:

5

Hello all. So I have a nasty stack overflow I have been trying to track down / solve for the past 8 hours or so, and I'm at the point where i think i need advice.

The details: Interestingly enough this code runs fine when called in the context of our regular winforms application -- but I am tasked with writing a web-based version of our software, and this same exact code causes the stack overflow when called out of an ASPX page running on IIS. The first thing I did was attach and attempt normal .NET debugging through visual studio. At the point of the exception the call stack seemed relatively shallow (about 11 frames deep, of our code), and I could find none of the usual suspects on a stack overflow (bad recursion, self-calling constructors, exception loops).

So I resigned myself to breaking out windbg and S.O.S. -- which i know can be useful for this sort of thing, although I had limited experience with it myself. After hours of monkeying around I think I have some useful data, but I need some help analyzing it.

First up is a !dumpstack I took while broken just before the stack overflow was about to come down.

0:015> !dumpstack
PDB symbol for mscorwks.dll not loaded
OS Thread Id: 0x1110 (15)
Current frame: ntdll!KiFastSystemCallRet
ChildEBP RetAddr  Caller,Callee
01d265a8 7c827d0b ntdll!NtWaitForSingleObject+0xc
01d265ac 77e61d1e kernel32!WaitForSingleObjectEx+0x88, calling ntdll!NtWaitForSingleObject
01d2661c 79e789c6 mscorwks!LogHelp_NoGuiOnAssert+0x58ca
01d26660 79e7898f mscorwks!LogHelp_NoGuiOnAssert+0x5893, calling mscorwks!LogHelp_NoGuiOnAssert+0x589b
01d26680 79e734c4 mscorwks!LogHelp_NoGuiOnAssert+0x3c8, calling mscorwks+0x17c0
01d26694 79fc1d6b mscorwks!CorExeMain+0x8724, calling kernel32!InterlockedDecrement
01d26698 79ef3892 mscorwks!GetCLRFunction+0x107de, calling mscorwks+0x17c0
01d266b0 79e78944 mscorwks!LogHelp_NoGuiOnAssert+0x5848, calling mscorwks!LogHelp_NoGuiOnAssert+0x584c
01d266c4 7a14de5d mscorwks!CorLaunchApplication+0x2f243, calling mscorwks!LogHelp_NoGuiOnAssert+0x5831
01d266ec 77e61d1e kernel32!WaitForSingleObjectEx+0x88, calling ntdll!NtWaitForSingleObject
01d266f8 77e61d43 kernel32!WaitForSingleObjectEx+0xad, calling kernel32!GetTickCount+0x73
01d26714 7c8279bb ntdll!NtSetEvent+0xc
01d26718 77e62321 kernel32!SetEvent+0x10, calling ntdll!NtSetEvent
01d26748 7a14df79 mscorwks!CorLaunchApplication+0x2f35f, calling mscorwks!CorLaunchApplication+0x2f17c
01d2675c 7a022dde mscorwks!NGenCreateNGenWorker+0x4516b, calling mscorwks!CorLaunchApplication+0x2f347
01d26770 79fbc685 mscorwks!CorExeMain+0x303e, calling mscorwks+0x1bbe
01d26788 79e734c4 mscorwks!LogHelp_NoGuiOnAssert+0x3c8, calling mscorwks+0x17c0
01d2678c 79e734f2 mscorwks!LogHelp_NoGuiOnAssert+0x3f6, calling mscorwks!LogHelp_NoGuiOnAssert+0x380
01d267a8 7a2d259e mscorwks!CreateHistoryReader+0xafd3
01d267b4 7a2e6292 mscorwks!CreateHistoryReader+0x1ecc7, calling mscorwks!CreateHistoryReader+0xaf9d
01d26814 7a064d52 mscorwks!NGenCreateNGenWorker+0x870df, calling mscorwks!CreateHistoryReader+0x1eb43
01d26854 79f91643 mscorwks!ClrCreateManagedInstance+0x46ff, calling mscorwks!ClrCreateManagedInstance+0x4720
01d2688c 79f915c4 mscorwks!ClrCreateManagedInstance+0x4680
01d268b4 79e734c4 mscorwks!LogHelp_NoGuiOnAssert+0x3c8, calling mscorwks+0x17c0
01d268cc 79f04e98 mscorwks!GetCLRFunction+0x21de4, calling mscorwks!GetCLRFunction+0x21e4b
01d26900 79f0815e mscorwks!GetCLRFunction+0x250aa, calling mscorwks!GetCLRFunction+0x21d35
01d2691c 7c858135 ntdll!RtlIpv4StringToAddressExW+0x167b7, calling ntdll!RtlReleaseResource
01d2692c 79f080a7 mscorwks!GetCLRFunction+0x24ff3, calling mscorwks!GetCLRFunction+0x25052
01d26950 7c828752 ntdll!RtlRaiseStatus+0xe0
01d26974 7c828723 ntdll!RtlRaiseStatus+0xb1, calling ntdll!RtlRaiseStatus+0xba
01d26998 7c8315c2 ntdll!RtlSubtreePredecessor+0x208, calling ntdll!RtlRaiseStatus+0x7e
01d26a1c 7c82855e ntdll!KiUserExceptionDispatcher+0xe, calling ntdll!RtlSubtreePredecessor+0x17c
01d26d20 13380333 (MethodDesc 0x10936710 +0x243 ASI.ParadigmPlus.LoadedWindows.WID904.QuestionChangeLogic(ASI.ParadigmPlus.Question, ASI.ParadigmPlus.Question)) ====> Exception Code 0 cxr@1d26a54 exr@1d26000
01d26bd8 77e64590 kernel32!VirtualAllocEx+0x4b, calling kernel32!GetTickCount+0x73
01d26bec 7c829f59 ntdll!RtlFreeHeap+0x142, calling ntdll!CIpow+0x464
01d26bf0 79e78d11 mscorwks!LogHelp_NoGuiOnAssert+0x5c15, calling ntdll!RtlFreeHeap
01d3e86c 103b4064 (MethodDesc 0xf304c90 +0x174 ASI.ParadigmPlus.Window.TrackQuestionChange(ASI.ParadigmPlus.Question, ASI.ParadigmPlus.Answer))
01d3e88c 103b4064 (MethodDesc 0xf304c90 +0x174 ASI.ParadigmPlus.Window.TrackQuestionChange(ASI.ParadigmPlus.Question, ASI.ParadigmPlus.Answer))
01d3e8b0 103b3e6b (MethodDesc 0xebb4b38 +0x23 ASI.CommonLibrary.ASIArrayList3.get_Item(Int32))
01d3e8d4 103b3d70 (MethodDesc 0xf304e98 +0x1b0 ASI.ParadigmPlus.Window.TrackQuestionChange())
01d3e910 0f90febf (MethodDesc 0xf30d250 +0x190f ASI.ParadigmPlus.Data.RemoteDataAccess.GetWindow(Int32))
01d3ec0c 10a2a572 (MethodDesc 0x10935aa0 +0x1f2 ASI.ParadigmPlus.LoadedWindowSets.WSID904.ApplyLayoutChanges()), calling 02259472
01d3ecec 0f90c880 (MethodDesc 0xebb91f8 +0xe8 ASI.ParadigmPlus.Windowset.ApplyLayoutChangesWrap())
01d3ed0c 0f90c880 (MethodDesc 0xebb91f8 +0xe8 ASI.ParadigmPlus.Windowset.ApplyLayoutChangesWrap())
01d3ed54 0f4d2388 (MethodDesc 0x22261a0 +0x5e8 WebConfigurator.NewDefault.ProductSelectedIndexChange(Int32, Int32))
01d3f264 0f4d1d7f (MethodDesc 0x2226180 +0x47 WebConfigurator.NewDefault.btnGo_Click1(System.Object, System.EventArgs)), calling (MethodDesc 0x22261a0 +0 WebConfigurator.NewDefault.ProductSelectedIndexChange(Int32, Int32))
01d3f284 0e810a05 (MethodDesc 0x22260f8 +0x145 WebConfigurator.NewDefault.Page_Load(System.Object, System.EventArgs)), calling (MethodDesc 0x2226180 +0 WebConfigurator.NewDefault.btnGo_Click1(System.Object, System.EventArgs))
01d3f2a8 793ae896 (MethodDesc 0x79256848 +0x52 System.MulticastDelegate.RemoveImpl(System.Delegate))
01d3f2ac 79e7bee8 mscorwks!LogHelp_TerminateOnAssert+0x2bd0, calling mscorwks!LogHelp_TerminateOnAssert+0x2b60
01d3f2c4 66f12980 (MethodDesc 0x66f1bcd0 +0x10 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr, System.Object, System.Object, System.EventArgs))
01d3f2d0 6628efd2 (MethodDesc 0x66474328 +0x22 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(System.Object, System.EventArgs)), calling (MethodDesc 0x66f1bcd0 +0 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr, System.Object, System.Object, System.EventArgs))
01d3f2e4 6613cb04 (MethodDesc 0x66468a58 +0x64 System.Web.UI.Control.OnLoad(System.EventArgs))
01d3f2f8 6613cb50 (MethodDesc 0x66468a60 +0x30 System.Web.UI.Control.LoadRecursive())
01d3f30c 6614e12d (MethodDesc 0x66467688 +0x59d System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean))
01d3f4e0 6614c717 (MethodDesc 0x66467430 +0x63 System.Web.UI.Page.AddWrappedFileDependencies(System.Object)), calling (MethodDesc 0x66478de8 +0 System.Web.ResponseDependencyList.AddDependencies(System.String[], System.String, Boolean, System.String))
01d3f504 6614d8c3 (MethodDesc 0x66467650 +0x67 System.Web.UI.Page.ProcessRequest(Boolean, Boolean)), calling (MethodDesc 0x66467688 +0 System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean))
01d3f528 79371311 (MethodDesc 0x7925ac80 +0x25 System.Globalization.CultureInfo.get_UserDefaultUICulture()), calling  (JitHelp: CORINFO_HELP_GETSHARED_GCSTATIC_BASE)
01d3f53c 6614d80f (MethodDesc 0x66467648 +0x57 System.Web.UI.Page.ProcessRequest()), calling (MethodDesc 0x66467650 +0 System.Web.UI.Page.ProcessRequest(Boolean, Boolean))
01d3f560 6615055c (MethodDesc 0x664676f0 +0x184 System.Web.UI.Page.SetIntrinsics(System.Web.HttpContext, Boolean)), calling (MethodDesc 0x664726b0 +0 System.Web.UI.TemplateControl.HookUpAutomaticHandlers())
01d3f578 6614d72f (MethodDesc 0x66467630 +0x13 System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext)), calling (MethodDesc 0x66467648 +0 System.Web.UI.Page.ProcessRequest())
01d3f580 6614d6c2 (MethodDesc 0x66467620 +0x32 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)), calling (MethodDesc 0x66467630 +0 System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext))
01d3f594 0e810206 (MethodDesc 0x22265a0 +0x1e ASP.newdefault_aspx.ProcessRequest(System.Web.HttpContext)), calling (MethodDesc 0x66467620 +0 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext))
01d3f5a0 65fe6bfb (MethodDesc 0x66470fc0 +0x167 System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()), calling 01dee5da
01d3f5d4 65fe3f51 (MethodDesc 0x6642f090 +0x41 System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)), calling 01de7d0a
01d3f610 65fe7733 (MethodDesc 0x66470cd0 +0x1b3 System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)), calling (MethodDesc 0x6642f090 +0 System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef))
01d3f64c 7939eef2 (MethodDesc 0x7925eda8 +0x26 System.Runtime.InteropServices.GCHandle.Alloc(System.Object)), calling mscorwks!InstallCustomModule+0x1e8d
01d3f664 65fccbfe (MethodDesc 0x6642ebb0 +0x8e System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object))
01d3f678 65fd19c5 (MethodDesc 0x6642cde8 +0x1b5 System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)), calling 01de7cba
01d3f69c 7938111c (MethodDesc 0x79262df0 +0xc System.DateTime.get_UtcNow()), calling mscorwks!GetCLRFunction+0x109f9
01d3f6a4 01c32cbc 01c32cbc, calling 01daa248
01d3f6b4 65fd16b2 (MethodDesc 0x664619e0 +0x62 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)), calling (MethodDesc 0x6642cde8 +0 System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest))
01d3f6c0 65fcfa6d (MethodDesc 0x6642d4a0 +0xfd System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)), calling (MethodDesc 0x664619e0 +0 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest))
01d3f6d8 65fcf9f4 (MethodDesc 0x6642d4a0 +0x84 System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)), calling *** ERROR: Symbol file could not be found.  Defaulted to export symbols for \\?\C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\webengine.dll - 
webengine!GetEcb
01d3f710 79f047fd mscorwks!GetCLRFunction+0x21749
01d3f720 01c32cbc 01c32cbc, calling 01daa248
01d3f730 79f047fd mscorwks!GetCLRFunction+0x21749
01d3f75c 79f01621 mscorwks!GetCLRFunction+0x1e56d, calling mscorwks+0x1b86
01d3f770 79ef98cf mscorwks!GetCLRFunction+0x1681b, calling mscorwks!GetCLRFunction+0x1682f
01d3f7d0 79e74f98 mscorwks!LogHelp_NoGuiOnAssert+0x1e9c, calling mscorwks!LogHelp_NoGuiOnAssert+0x1ec1
01d3f7e8 79f0462c mscorwks!GetCLRFunction+0x21578, calling mscorwks!GetCLRFunction+0x215b0
01d3f7f8 01c32cbc 01c32cbc, calling 01daa248
01d3f844 79f044fa mscorwks!GetCLRFunction+0x21446, calling mscorwks!GetCLRFunction+0x21541
01d3f854 01c32cbc 01c32cbc, calling 01daa248
01d3f898 660167e9 (MethodDesc 0x6646f6b0 +0x5 System.Web.RequestQueue.TimerCompletionCallback(System.Object)), calling (MethodDesc 0x6646f698 +0 System.Web.RequestQueue.ScheduleMoreWorkIfNeeded())
01d3f89c 793af6c6 (MethodDesc 0x792672b0 +0x1a System.Threading._TimerCallback.TimerCallback_Context(System.Object))
01d3f8b4 793af647 (MethodDesc 0x7914fc18 +0x5b System.Threading._TimerCallback.PerformTimerCallback(System.Object)), calling (MethodDesc 0x7914e0d8 +0 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object))
01d3f8b8 793af654 (MethodDesc 0x7914fc18 +0x68 System.Threading._TimerCallback.PerformTimerCallback(System.Object)), calling mscorwks!LogHelp_TerminateOnAssert
01d3f8f8 79e74466 mscorwks!LogHelp_NoGuiOnAssert+0x136a, calling mscorwks+0x1813
01d3f8fc 79e7c709 mscorwks!LogHelp_TerminateOnAssert+0x33f1, calling mscorwks!LogHelp_NoGuiOnAssert+0x1360
01d3f964 7c829f3d ntdll!RtlFreeHeap+0x126, calling ntdll!RtlGetNtGlobalFlags+0x12
01d3f96c 7c829f59 ntdll!RtlFreeHeap+0x142, calling ntdll!CIpow+0x464
01d3f9ac 6a2a9998 webengine!CSharelock::ChangeExclusiveLockToSharedLock+0x2d, calling kernel32!InterlockedCompareExchange
01d3f9b4 6a2ab03b webengine!EcbGetUnicodeServerVariables+0x3d5, calling kernel32!InterlockedIncrement
01d3f9f4 01c32cbc 01c32cbc, calling 01daa248
01d3fa28 01daa295 01daa295, calling mscorwks!GetCLRFunction+0x2119e
01d3fa50 6a2aa63f webengine!CookieAuthConstructTicket+0x232
01d3fa6c 01c32cbc 01c32cbc, calling 01daa248
01d3fa70 6a2aa63f webengine!CookieAuthConstructTicket+0x232
01d3fac8 79e734c4 mscorwks!LogHelp_NoGuiOnAssert+0x3c8, calling mscorwks+0x17c0
01d3facc 79e734f2 mscorwks!LogHelp_NoGuiOnAssert+0x3f6, calling mscorwks!LogHelp_NoGuiOnAssert+0x380
01d3fad8 79f00c03 mscorwks!GetCLRFunction+0x1db4f, calling mscorwks!LogHelp_NoGuiOnAssert+0xf0
01d3fadc 79e71b90 mscorwks+0x1b90, calling mscorwks+0x1813
01d3fae0 79f00c0b mscorwks!GetCLRFunction+0x1db57, calling mscorwks+0x1b86
01d3fb1c 79ef30c3 mscorwks!GetCLRFunction+0x1000f, calling mscorwks!GetCLRFunction+0x10040
01d3fb64 79f00c0b mscorwks!GetCLRFunction+0x1db57, calling mscorwks+0x1b86
01d3fb68 79f02a93 mscorwks!GetCLRFunction+0x1f9df, calling mscorwks!GetCLRFunction+0x1d8e5
01d3fb70 79e71b90 mscorwks+0x1b90, calling mscorwks+0x1813
01d3fb74 79f02aa7 mscorwks!GetCLRFunction+0x1f9f3, calling mscorwks+0x1b86
01d3fb88 79f00e8d mscorwks!GetCLRFunction+0x1ddd9, calling mscorwks+0x18bb
01d3fb8c 79f00f03 mscorwks!GetCLRFunction+0x1de4f, calling mscorwks!GetCLRFunction+0x1dd84
01d3fbc0 79f02978 mscorwks!GetCLRFunction+0x1f8c4, calling mscorwks!GetCLRFunction+0x1de1a
01d3fbfc 79e73220 mscorwks!LogHelp_NoGuiOnAssert+0x124, calling  (JitHelp: CORINFO_HELP_GET_THREAD)
01d3fc08 79ef2884 mscorwks!GetCLRFunction+0xf7d0, calling mscorwks!LogHelp_NoGuiOnAssert+0x118
01d3fc0c 79ef28ab mscorwks!GetCLRFunction+0xf7f7, calling mscorwks+0x17c0
01d3fc24 79e7904f mscorwks!LogHelp_NoGuiOnAssert+0x5f53, calling mscorwks+0x1b95
01d3fc38 79ef31ca mscorwks!GetCLRFunction+0x10116, calling mscorwks!LogHelp_NoGuiOnAssert+0x5f3d
01d3fc3c 79e71b90 mscorwks+0x1b90, calling mscorwks+0x1813
01d3fc40 79ef31d9 mscorwks!GetCLRFunction+0x10125, calling mscorwks+0x1b86
01d3fc90 7c829fb5 ntdll!RtlGetNtGlobalFlags+0x38, calling ntdll!ExpInterlockedPopEntrySListEnd+0x11
01d3fc94 7c827d0b ntdll!NtWaitForSingleObject+0xc
01d3fc98 77e61d1e kernel32!WaitForSingleObjectEx+0x88, calling ntdll!NtWaitForSingleObject
01d3fca4 77e61d43 kernel32!WaitForSingleObjectEx+0xad, calling kernel32!GetTickCount+0x73
01d3fdb4 6a2aa748 webengine!CookieAuthConstructTicket+0x33b, calling webengine!CookieAuthConstructTicket+0x11d
01d3fdc4 6a2aa715 webengine!CookieAuthConstructTicket+0x308
01d3fddc 79f024cf mscorwks!GetCLRFunction+0x1f41b
01d3fdf4 79ef3a3f mscorwks!GetCLRFunction+0x1098b, calling mscorwks+0x17c0
01d3fe28 79f0202a mscorwks!GetCLRFunction+0x1ef76
01d3fe3c 79f021a0 mscorwks!GetCLRFunction+0x1f0ec, calling mscorwks!GetCLRFunction+0x1eef9
01d3fe94 79fc9840 mscorwks!CorExeMain+0x101f9
01d3ffa4 79fc982e mscorwks!CorExeMain+0x101e7, calling mscorwks!LogHelp_NoGuiOnAssert+0x61c0
01d3ffb8 77e64829 kernel32!GetModuleHandleA+0xdf

Lot of stuff there, but nothing that in my (admittedly limited) stack analyzing knowledge indicates looping. I think this next section might have some value however. This is a !dumpstackobjects I got at the same breakpoint:

0:000> ~16e !dumpstackobjects
OS Thread Id: 0x172c (16)
ESP/REG  Object   Name
01d0ee30 0295ef60 ASI.ParadigmPlus.LoadedWindows.WID904
01d0ef68 0295ef60 ASI.ParadigmPlus.LoadedWindows.WID904
01d0ef6c 0295ef60 ASI.ParadigmPlus.LoadedWindows.WID904
01d0ef74 0295ef60 ASI.ParadigmPlus.LoadedWindows.WID904
01d0f280 0295f810 ASI.ParadigmPlus.Question
01d0f284 0295ef60 ASI.ParadigmPlus.LoadedWindows.WID904
01d26cec 02fdb36c ASI.ParadigmPlus.GrilleApp.GA1000
01d26cf0 0295f674 ASI.ParadigmPlus.QuestionList
01d26cf4 0295ef60 ASI.ParadigmPlus.LoadedWindows.WID904
01d26cf8 02fdb36c ASI.ParadigmPlus.GrilleApp.GA1000
01d26cfc 0295f810 ASI.ParadigmPlus.Question
01d26d00 0295f810 ASI.ParadigmPlus.Question
01d26d08 0295f810 ASI.ParadigmPlus.Question
01d26d30 06c3a958 System.String    SP1:SP1
01d26d40 029c232c System.String    TNE:TNE
01d26d50 06c3a958 System.String    SP1:SP1
01d26d54 029c232c System.String    TNE:TNE
01d26d60 029c232c System.String    TNE:TNE
01d26d78 06c3a958 System.String    SP1:SP1
01d26d7c 06c3a958 System.String    SP1:SP1
01d26d84 06c3a958 System.String    SP1:SP1
01d26da4 06c357a0 System.String    SB1:SB1
01d26da8 06c357a0 System.String    SB1:SB1
01d26db0 06c3a958 System.String    SP1:SP1
01d26db4 06ba3d08 System.String    WHT:WHT
01d26db8 06b987c8 System.String    WHT:WHT
01d26dbc 06b8aa10 System.String    WF:WF
01d26dc0 029fab00 System.String    L:L
01d26dc4 06c3a958 System.String    SP1:SP1
01d26dc8 06c4a518 System.String    S000:S000
01d26dd4 06c4a518 System.String    S000:S000
01d26dd8 0296b404 ASI.ParadigmPlus.Question
01d26ddc 0296a00c ASI.ParadigmPlus.Question
01d26de0 02968a90 ASI.ParadigmPlus.Question
01d26de4 02966af8 ASI.ParadigmPlus.Question
01d26de8 06be6e1c ASI.ParadigmPlus.Answer
01d26dec 06c357a0 System.String    SB1:SB1
01d26df0 029fab00 System.String    L:L
01d26df4 0295fa54 ASI.ParadigmPlus.QuestionGroup
01d26df8 02963f80 ASI.ParadigmPlus.QuestionGroup
01d26dfc 029662fc ASI.ParadigmPlus.QuestionGroup
01d26e00 02961cb4 ASI.ParadigmPlus.QuestionGroup
01d26e0c 0295f810 ASI.ParadigmPlus.Question
01d26e10 0295ef60 ASI.ParadigmPlus.LoadedWindows.WID904
01d270d4 06c38ddc ASI.ParadigmPlus.Answer
01d270dc 06c4bc0c ASI.ParadigmPlus.Dimension
01d270e0 06c4b99c ASI.ParadigmPlus.DimensionList
01d27104 029607f8 ASI.ParadigmPlus.Question
01d27108 0295fa80 ASI.ParadigmPlus.QuestionList
01d27118 06c38e74 System.String    5:5
01d2711c 02960564 ASI.ParadigmPlus.Question
01d27120 0295fa80 ASI.ParadigmPlus.QuestionList
01d2781c 029fac84 ASI.ParadigmPlus.Answer
01d27820 02960464 ASI.ParadigmPlus.AnswerList
01d27824 029fcbd8 ASI.ParadigmPlus.Answer
01d27828 02960464 ASI.ParadigmPlus.AnswerList
01d2782c 029fca28 ASI.ParadigmPlus.Answer
01d27830 02960464 ASI.ParadigmPlus.AnswerList
01d27844 029faa84 ASI.ParadigmPlus.Answer
01d2784c 06c38e74 System.String    5:5
01d27850 02960564 ASI.ParadigmPlus.Question
01d27854 0295fa80 ASI.ParadigmPlus.QuestionList
01d27860 06c38e74 System.String    5:5
01d27864 02960564 ASI.ParadigmPlus.Question
01d27868 0295fa80 ASI.ParadigmPlus.QuestionList
01d27870 06c38e74 System.String    5:5
01d27874 02960564 ASI.ParadigmPlus.Question
01d27878 0295fa80 ASI.ParadigmPlus.QuestionList
01d2787c 029faa84 ASI.ParadigmPlus.Answer
01d27880 02960464 ASI.ParadigmPlus.AnswerList
01d27884 029fab84 ASI.ParadigmPlus.Answer
01d27888 02960464 ASI.ParadigmPlus.AnswerList
01d27974 02960e80 ASI.ParadigmPlus.Question
01d27978 0295fa80 ASI.ParadigmPlus.QuestionList
01d27bd0 06c3a8dc ASI.ParadigmPlus.Answer
01d27c08 06c3b924 ASI.ParadigmPlus.Answer
01d27c0c 02960f44 ASI.ParadigmPlus.AnswerList
01d27c10 06c3b860 ASI.ParadigmPlus.Answer
01d27c14 02960f44 ASI.ParadigmPlus.AnswerList
01d27c18 06c3ac90 ASI.ParadigmPlus.Answer
01d27c1c 02960f44 ASI.ParadigmPlus.AnswerList
01d27c20 06c3abcc ASI.ParadigmPlus.Answer
01d27c24 02960f44 ASI.ParadigmPlus.AnswerList
01d27c28 06c3ab08 ASI.ParadigmPlus.Answer
01d27c2c 02960f44 ASI.ParadigmPlus.AnswerList
01d27c30 06c3aa44 ASI.ParadigmPlus.Answer
01d27c34 02960f44 ASI.ParadigmPlus.AnswerList
01d27c38 06c3b4dc ASI.ParadigmPlus.Answer
01d27c3c 02960f44 ASI.ParadigmPlus.AnswerList
01d27c40 06c3a990 ASI.ParadigmPlus.Answer
01d27c44 02960f44 ASI.ParadigmPlus.AnswerList
01d27c48 06c3a8dc ASI.ParadigmPlus.Answer
01d27c4c 02960f44 ASI.ParadigmPlus.AnswerList
01d27c6c 02960e80 ASI.ParadigmPlus.Question
01d27c70 0295fa80 ASI.ParadigmPlus.QuestionList
01d27e04 029628d0 ASI.ParadigmPlus.Question
01d27e08 02961ce0 ASI.ParadigmPlus.QuestionList
01d27e28 029628d0 ASI.ParadigmPlus.Question
01d27e2c 02961ce0 ASI.ParadigmPlus.QuestionList
01d27f14 06b89804 ASI.ParadigmPlus.Answer
01d27f18 02962994 ASI.ParadigmPlus.AnswerList
01d27f1c 029628d0 ASI.ParadigmPlus.Question
01d27f20 02961ce0 ASI.ParadigmPlus.QuestionList
01d27f38 06c38e74 System.String    5:5
01d27f3c 02960564 ASI.ParadigmPlus.Question
01d27f40 0295fa80 ASI.ParadigmPlus.QuestionList
01d27f4c 06c38e74 System.String    5:5
01d27f50 02960564 ASI.ParadigmPlus.Question
01d27f54 0295fa80 ASI.ParadigmPlus.QuestionList
01d27f60 06c38e74 System.String    5:5
01d27f64 02960564 ASI.ParadigmPlus.Question
01d27f68 0295fa80 ASI.ParadigmPlus.QuestionList
01d27f88 06b89964 ASI.ParadigmPlus.Answer
01d27f8c 029628d0 ASI.ParadigmPlus.Question
01d27f90 02961ce0 ASI.ParadigmPlus.QuestionList
01d27fa8 06c4b34c System.String    FDIA:FDIA
01d27fac 0295fd84 ASI.ParadigmPlus.Question
01d27fb0 0295fa80 ASI.ParadigmPlus.QuestionList
01d27fb4 06b896dc ASI.ParadigmPlus.Answer
01d27fb8 02962994 ASI.ParadigmPlus.AnswerList
01d27fbc 029628d0 ASI.ParadigmPlus.Question
01d27fc0 02961ce0 ASI.ParadigmPlus.QuestionList
01d27fc8 029fab00 System.String    L:L
01d27fcc 029603a0 ASI.ParadigmPlus.Question
01d27fd0 0295fa80 ASI.ParadigmPlus.QuestionList
01d27fd4 06b89964 ASI.ParadigmPlus.Answer
01d27fd8 02962994 ASI.ParadigmPlus.AnswerList
01d27fdc 029628d0 ASI.ParadigmPlus.Question
01d27fe0 02961ce0 ASI.ParadigmPlus.QuestionList
01d27fe4 029628d0 ASI.ParadigmPlus.Question
01d27fe8 02961ce0 ASI.ParadigmPlus.QuestionList
01d28610 06b987c8 System.String    WHT:WHT
01d28614 02961dd8 ASI.ParadigmPlus.Question
01d28618 02961ce0 ASI.ParadigmPlus.QuestionList
01d2872c 06ba3d08 System.String    WHT:WHT
01d28730 029621f0 ASI.ParadigmPlus.Question
01d28734 02961ce0 ASI.ParadigmPlus.QuestionList
01d28778 029f1d94 ASI.ParadigmPlus.Answer
01d2877c 02963c14 ASI.ParadigmPlus.AnswerList
01d28780 06c37884 ASI.ParadigmPlus.Answer
01d28784 02963c14 ASI.ParadigmPlus.AnswerList
01d28788 06c379cc ASI.ParadigmPlus.Answer
01d2878c 02963c14 ASI.ParadigmPlus.AnswerList
01d28790 06c36798 ASI.ParadigmPlus.Answer
01d28794 02963c14 ASI.ParadigmPlus.AnswerList
01d28798 06c36510 ASI.ParadigmPlus.Answer
01d2879c 02963c14 ASI.ParadigmPlus.AnswerList
01d287a0 06c36648 ASI.ParadigmPlus.Answer
01d287a4 02963c14 ASI.ParadigmPlus.AnswerList
01d287ac 06c37a78 System.String    Custom Paint
01d287b0 06c379cc ASI.ParadigmPlus.Answer
01d287b8 072eb468 System.Collections.ArrayList+ArrayListEnumeratorSimple
01d287bc 02963c14 ASI.ParadigmPlus.AnswerList
01d289dc 029640b8 ASI.ParadigmPlus.Question
01d289e0 02963fac ASI.ParadigmPlus.QuestionList
01d28a38 029f13f4 System.String    Venting Sidelite Locking System
01d28a3c 029f1390 ASI.ParadigmPlus.Answer
01d28a44 072f0568 System.Collections.ArrayList+ArrayListEnumeratorSimple
01d28a48 0296417c ASI.ParadigmPlus.AnswerList
01d28a60 06c356f4 ASI.ParadigmPlus.Answer
01d28a68 06c4a518 System.String    S000:S000
01d28a6c 0295ffec ASI.ParadigmPlus.Question
01d28a70 0295fa80 ASI.ParadigmPlus.QuestionList
01d28a7c 06c4a518 System.String    S000:S000
01d28a80 0295ffec ASI.ParadigmPlus.Question
01d28a84 0295fa80 ASI.ParadigmPlus.QuestionList
01d28a90 0295f768 System.String    CustItemNumber
01d28a98 06c4b34c System.String    FDIA:FDIA
01d28a9c 0295fd84 ASI.ParadigmPlus.Question
01d28aa0 0295fa80 ASI.ParadigmPlus.QuestionList
01d28aa4 029ecd64 ASI.ParadigmPlus.Answer
01d28aa8 0296417c ASI.ParadigmPlus.AnswerList
01d28aac 029e95ac ASI.ParadigmPlus.Answer
01d28ab0 0296417c ASI.ParadigmPlus.AnswerList
01d28ab8 029f13f4 System.String    Venting Sidelite Locking System
01d28abc 029f1390 ASI.ParadigmPlus.Answer
01d28ac4 072ef574 System.Collections.ArrayList+ArrayListEnumeratorSimple
01d28ac8 0296417c ASI.ParadigmPlus.AnswerList
01d28acc 029f1230 ASI.ParadigmPlus.Answer
01d28ad0 0296417c ASI.ParadigmPlus.AnswerList
01d28f4c 02961798 ASI.ParadigmPlus.Question
01d28f50 0295fa80 ASI.ParadigmPlus.QuestionList
01d2903c 0296466c ASI.ParadigmPlus.Question
01d29040 02963fac ASI.ParadigmPlus.QuestionList
01d290cc 06c07914 System.String    C:C
01d290d0 02964268 ASI.ParadigmPlus.Question
01d290d4 02963fac ASI.ParadigmPlus.QuestionList
01d29144 06c30604 ASI.ParadigmPlus.Answer
01d29148 02964730 ASI.ParadigmPlus.AnswerList
01d2914c 0296466c ASI.ParadigmPlus.Question
01d29150 02963fac ASI.ParadigmPlus.QuestionList
01d29154 06c0f9d8 ASI.ParadigmPlus.Answer
01d29158 0296450c ASI.ParadigmPlus.AnswerList
01d2915c 02964448 ASI.ParadigmPlus.Question
01d29160 02963fac ASI.ParadigmPlus.QuestionList
01d29164 02964268 ASI.ParadigmPlus.Question
01d29168 02963fac ASI.ParadigmPlus.QuestionList
01d2991c 029d6c7c System.String    021022
01d29928 029d6c7c System.String    021022
01d29934 029d6c7c System.String    021022
01d29938 029d5700 ASI.ParadigmPlus.Answer
01d2993c 0296450c ASI.ParadigmPlus.AnswerList
01d29940 029d6bdc ASI.ParadigmPlus.Answer
01d29944 0296450c ASI.ParadigmPlus.AnswerList
01d29948 02964448 ASI.ParadigmPlus.Question
01d2994c 02963fac ASI.ParadigmPlus.QuestionList
01d2f908 06c4b34c System.String    FDIA:FDIA
01d2f90c 0295fd84 ASI.ParadigmPlus.Question
01d2f910 0295fa80 ASI.ParadigmPlus.QuestionList
01d2ffd0 02964c28 ASI.ParadigmPlus.Question
01d2ffd4 02963fac ASI.ParadigmPlus.QuestionList
01d2ffe4 06c32030 System.String    SB:SB
01d2ffe8 02964a54 ASI.ParadigmPlus.Question
01d2ffec 02963fac ASI.ParadigmPlus.QuestionList
01d2fffc 06c3368c ASI.ParadigmPlus.Answer
01d30000 02964b18 ASI.ParadigmPlus.AnswerList
01d30004 02964a54 ASI.ParadigmPlus.Question
01d30008 02963fac ASI.ParadigmPlus.QuestionList
01d3000c 02964a54 ASI.ParadigmPlus.Question
01d30010 02963fac ASI.ParadigmPlus.QuestionList
01d30144 06c32030 System.String    SB:SB
01d30148 02964a54 ASI.ParadigmPlus.Question
01d3014c 02963fac ASI.ParadigmPlus.QuestionList
01d30154 06c31f90 ASI.ParadigmPlus.Answer
01d3015c 06c344d8 System.String    (COM) Lifetime Brass
01d30160 06c34418 ASI.ParadigmPlus.Answer
01d30168 072f16a0 System.Collections.ArrayList+ArrayListEnumeratorSimple
01d3016c 02964b18 ASI.ParadigmPlus.AnswerList
01d30174 06c31f90 ASI.ParadigmPlus.Answer
01d30178 06c34294 ASI.ParadigmPlus.Answer
01d3017c 02964b18 ASI.ParadigmPlus.AnswerList
01d30180 06c33e48 ASI.ParadigmPlus.Answer
01d30184 02964b18 ASI.ParadigmPlus.AnswerList
01d30188 06c32e6c ASI.ParadigmPlus.Answer
01d3018c 02964b18 ASI.ParadigmPlus.AnswerList
01d30190 06c32b78 ASI.ParadigmPlus.Answer
01d30194 02964b18 ASI.ParadigmPlus.AnswerList

^^ I had to cut off some of the above to make this post fit, but imagine it keeps going like that ^^

Please ignore the details of our custom code. All this seems excessive to me, but I am no expert at the stack. Most of those stack objects listed above (there are 1500+) are not function paramteters, so I would think they do not belong there. Here is an example of the kind of code that is generating all those items on the stack (tons of code like this is run):

gUnitType.Questions("French Door Style").CommonLogicValue = CommonLogicValues.AlwaysDisplay
gUnitType.Questions("French Door Style").ShowAllAnswers()
If Me.NumberOfUnits > 1 Then
 Me.Dimensions("Call Size Height").Answers("6-8 Handicap sill").Visible = False
 Me.Dimensions("Call Size Height").Answers("6-10 Handicap Sill").Visible = False
 Me.Dimensions("Call Size Height").Answers("7-0 Handicap Sill").Visible = False
 Me.Dimensions("Call Size Height").Answers("8-0 Handicap Sill").Visible = False
End If

I am also no expert on VB (this code is from a different part of our application I do not normally work with), but is it normal for code like this to be filling up the stack with stuff? If anyone has any insight, or could even just point me in the direction of some resources with info about this kind of stuff, it would be greatly appreciated. Thanks for looking!

+1  A: 

You need some decent symbols for the CLR. Set _NT_SYMBOL_PATH (in WinDBG, use File/Symbol File Path) so that it includes:

SRV*C:\WebSymbols*http://msdl.microsoft.com/download/symbols

That tells the debugger symbol engine that it can download symbols from Microsoft's online symbol server to C:\WebSymbols. Pick another folder if you prefer them to be cached elsewhere.

It looks like Question, QuestionList, Answer, etc are structs - that is, value types - so they're allocated on the stack rather than on the heap. You may need to create your own class that wraps these types so they're on the heap instead.

Mike Dimmick
A: 

According to stack object dump "ASI.ParadigmPlus.GrilleApp.GA1000" is 96872 bytes. You might want to figure out what that object is all about. That's a pretty big chunk of your stack space right there.

Jeffrey L Whitledge
A: 

Thanks for the replies. I have loaded the symbols as instructed by Mike, and I am getting more info now, but nothing that has led me to an explanation yet.

I looked into the code for the GA1000 class, but I have no idea what could be causing it to take up 97k on the stack. As I understand things, shouldn't it just take 4 bytes? I thought reference types (all classes should be) just got a pointer to the heap put on the stack. If I do a !clrstack -l on the thread that's about to crash, I see that there are quite a few (315) locals on the stack inside the function QuestionChangeLogic, but as I understand it these should only take 4 bytes each for reference types, and a fixed (small) number for value types (4 for int, 8 for double, etc.) which certainly doesn't compute to the lareg ammount of stack that seems to be missing.

Is there a way for me to examine a managed stack frame to see it's size and where the memory is going ?

David Hay
A: 

Analyzing the callstack I clearly see that the method that is causing this exception is:

ASI.ParadigmPlus.LoadedWindows.WID904.QuestionChangeLogic

How come you have 315 variables in this method? Isn't that too much?

"!clrstack -a" (after running "!dso") should give you much more information of each managed frame.

Sacha
+5  A: 

Hi all, I thought I'd post back here with the resolution to this in case someone else runs into it. The replies above were all helpful, and pointed out why i might be overflowing the stack -- but the thing that I still couldn't come to grips with was why the exact same code ran fine in our winforms app.

What I eventually discovered was that at some point microsoft changed the stack size of IIS threads from 1MB (like in the general .NET context) to 256k. This explained everything, including the especially frustrating fact that even the ASPX version ran fine under the visual studio dev server. I resolved the problem by working with this particular customer to drastically cut the ammount of code in the QuestionChangeLogic function mentioned above (when I looked up the source, the function had > 15,000 lines!).

Thanks for the help guys.

David Hay