Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sunshine Lewis 31 posts 140 karma points c-trib
    Apr 23, 2015 @ 17:43
    Sunshine Lewis
    0

    How to catch System.MissingMethodException errors

    We are having severe performance issues (front and back end) running an Umbraco 7.2 installation as an Azure website. Microsoft suggests that it's because the site is generating thousands of exceptions (most of which are System.MissingMethodExceptions trying to access a missing member or method) and causing CPU time to max out trying to Garbage Collect all of them.

    We are able to take crash dumps using Debug Diagnostics and see these exceptions in memory but they don't appear anywhere else.

    • Trace Log doesn't show them
    • umbracoLog table in the database doesn't have them
    • Debugging locally with visual studio set to stop when exceptions are thrown doesn't show them.

    In fact everything seems great except for exceptions in memory dumps and the response times for website requests.

    I've been using WinDBG to parse the stack trace from these dumps but it's slow and painful. It's revealed that the issues seem to be primarily caused by my navigation partial views (all razor) but I can't get a clear line number or error message using my current methods.

    I'm have limited experience with .Net and debugging and I'm at a loss.

    My questions for the community:

    1. Is it possible to see catch these exceptions as they happen (so I can maybe get a line number and actual error)?
    2. Do you have methods or recommendations for tracking errors with only a stack trace from a .dmp file (example below)
    3. Do you have tips for running Umbraco on Azure websites?

    Thanks!

    Sample Call Stack

    KERNELBASE!RaiseException+58    
    clr!RaiseTheExceptionInternalOnly+276    
    clr!IL_Throw+13e    
    [[HelperMethodFrame]]    
    mscorlib_ni!System.RuntimeType.InvokeMember(System.String, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object, System.Object[], System.Reflection.ParameterModifier[], System.Globalization.CultureInfo, System.String[])+a3da46    
    Umbraco.Core.TypeExtensions+<>c__DisplayClass1.<GetMemberIgnoreCase>b__0(System.String)+3e    
    Umbraco.Core.TypeExtensions+<>c__DisplayClass1.<GetMemberIgnoreCase>b__0(System.String)+3e    
    Umbraco.Core.TypeExtensions.GetMemberIgnoreCase(System.Type, System.Object, System.String)+a6    
    Umbraco.Core.TypeExtensions.GetMemberIgnoreCase(System.Type, System.Object, System.String)+a6    
    Umbraco.Web.Models.DynamicPublishedContent.GetPropertyInternal(System.String, Umbraco.Core.Models.IPublishedContent, Boolean)+88    
    Umbraco.Web.Models.DynamicPublishedContent.GetPropertyInternal(System.String, Umbraco.Core.Models.IPublishedContent, Boolean)+88    
    Umbraco.Web.Models.DynamicPublishedContent.TryGetDocumentProperty(System.Dynamic.GetMemberBinder)+26    
    Umbraco.Web.Models.DynamicPublishedContent.TryGetDocumentProperty(System.Dynamic.GetMemberBinder)+26    
    Umbraco.Web.Models.DynamicPublishedContent+<>c__DisplayClass9.<TryGetMember>b__6(System.Func`2<System.Dynamic.GetMemberBinder,Umbraco.Core.Attempt`1<System.Object>>)+f    
    Umbraco.Web.Models.DynamicPublishedContent+<>c__DisplayClass9.<TryGetMember>b__6(System.Func`2<System.Dynamic.GetMemberBinder,Umbraco.Core.Attempt`1<System.Object>>)+f    
    System.Linq.Enumerable+WhereSelectListIterator`2[[System.__Canon, mscorlib],[Umbraco.Core.Attempt`1[[System.__Canon, mscorlib]], Umbraco.Core]].MoveNext()+66    
    System.Linq.Enumerable+WhereEnumerableIterator`1[[Umbraco.Core.Attempt`1[[System.__Canon, mscorlib]], Umbraco.Core]].MoveNext()+d0    
    Umbraco.Web.Models.DynamicPublishedContent.TryGetMember(System.Dynamic.GetMemberBinder, System.Object ByRef)+fc    
    DynamicClass.CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object)+8d    
    DynamicClass.CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object)+8d    
    ASP.DosFunctions.IsHidingSubPages(System.Object, System.String)+ec8    
    ASP.DosFunctions.IsHidingSubPages(System.Object, System.String)+ec8    
    DynamicClass.CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Type, System.Object, System.String)+cb    
    ASP._Page_Views_MacroPartials_PageNavigation_cshtml.Execute()+357    
    ASP._Page_Views_MacroPartials_PageNavigation_cshtml.Execute()+357    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.ExecutePageHierarchy()+c6    
    System_Web_Mvc_ni!System.Web.Mvc.WebViewPage.ExecutePageHierarchy()+62    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.ExecutePageHierarchy(System.Web.WebPages.WebPageContext, System.IO.TextWriter, System.Web.WebPages.WebPageRenderingBase)+59    
    System_Web_Mvc_ni!System.Web.Mvc.RazorView.RenderView(System.Web.Mvc.ViewContext, System.IO.TextWriter, System.Object)+103    
    System_Web_Mvc_ni!System.Web.Mvc.RazorView.RenderView(System.Web.Mvc.ViewContext, System.IO.TextWriter, System.Object)+103    
    System_Web_Mvc_ni!System.Web.Mvc.BuildManagerCompiledView.Render(System.Web.Mvc.ViewContext, System.IO.TextWriter)+74    
    System_Web_Mvc_ni!System.Web.Mvc.BuildManagerCompiledView.Render(System.Web.Mvc.ViewContext, System.IO.TextWriter)+74    
    Umbraco.Core.Profiling.ProfilingView.Render(System.Web.Mvc.ViewContext, System.IO.TextWriter)+5e    
    Umbraco.Core.Profiling.ProfilingView.Render(System.Web.Mvc.ViewContext, System.IO.TextWriter)+5e    
    Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(System.Web.Mvc.ControllerBase, System.Web.Mvc.ViewResultBase)+c9    
    Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(System.Web.Mvc.ControllerBase, System.Web.Mvc.ViewResultBase)+c9    
    Umbraco.Web.Macros.PartialViewMacroEngine.Execute(umbraco.cms.businesslogic.macro.MacroModel, Umbraco.Core.Models.IPublishedContent)+2ae    
    Umbraco.Web.Macros.PartialViewMacroEngine.Execute(umbraco.cms.businesslogic.macro.MacroModel, umbraco.interfaces.INode)+51    
    Umbraco.Web.Macros.PartialViewMacroEngine.Execute(umbraco.cms.businesslogic.macro.MacroModel, umbraco.interfaces.INode)+51    
    umbraco.macro.LoadPartialViewMacro(umbraco.cms.businesslogic.macro.MacroModel)+33    
    umbraco.macro.LoadPartialViewMacro(umbraco.cms.businesslogic.macro.MacroModel)+33    
    umbraco.macro.renderMacro(System.Collections.Hashtable, Int32)+35e    
    Umbraco.Web.UmbracoHelper.RenderMacro(umbraco.macro, System.Collections.Generic.IDictionary`2<System.String,System.Object>, umbraco.page)+171    
    Umbraco.Web.UmbracoHelper.RenderMacro(System.String, System.Collections.Generic.IDictionary`2<System.String,System.Object>, umbraco.page)+49    
    Umbraco.Web.UmbracoHelper.RenderMacro(System.String, System.Collections.Generic.IDictionary`2<System.String,System.Object>)+39    
    Umbraco.Web.UmbracoHelper.RenderMacro(System.String, System.Object)+30    
    Umbraco.Web.UmbracoHelper.RenderMacro(System.String)+1b    
    ASP._Page_Views_LayoutPage_cshtml.Execute()+385    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.ExecutePageHierarchy()+c6    
    System_Web_Mvc_ni!System.Web.Mvc.WebViewPage.ExecutePageHierarchy()+62    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.ExecutePageHierarchy(System.Web.WebPages.WebPageContext, System.IO.TextWriter, System.Web.WebPages.WebPageRenderingBase)+59    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase+<>c__DisplayClass7.<RenderPageCore>b__6(System.IO.TextWriter)+ea    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase+<>c__DisplayClass7.<RenderPageCore>b__6(System.IO.TextWriter)+ea    
    System_Web_WebPages_ni!System.Web.WebPages.HelperResult.WriteTo(System.IO.TextWriter)+b    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.Write(System.Web.WebPages.HelperResult)+48    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.RenderSurrounding(System.String, System.Action`1<System.IO.TextWriter>)+41    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.PopContext()+f7    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.PopContext()+f7    
    System_Web_WebPages_ni!System.Web.WebPages.WebPageBase.ExecutePageHierarchy(System.Web.WebPages.WebPageContext, System.IO.TextWriter, System.Web.WebPages.WebPageRenderingBase)+60    
    System_Web_Mvc_ni!System.Web.Mvc.RazorView.RenderView(System.Web.Mvc.ViewContext, System.IO.TextWriter, System.Object)+103    
    System_Web_Mvc_ni!System.Web.Mvc.RazorView.RenderView(System.Web.Mvc.ViewContext, System.IO.TextWriter, System.Object)+103    
    System_Web_Mvc_ni!System.Web.Mvc.BuildManagerCompiledView.Render(System.Web.Mvc.ViewContext, System.IO.TextWriter)+74    
    System_Web_Mvc_ni!System.Web.Mvc.BuildManagerCompiledView.Render(System.Web.Mvc.ViewContext, System.IO.TextWriter)+74    
    Umbraco.Core.Profiling.ProfilingView.Render(System.Web.Mvc.ViewContext, System.IO.TextWriter)+5e    
    System_Web_Mvc_ni!System.Web.Mvc.ViewResultBase.ExecuteResult(System.Web.Mvc.ControllerContext)+128    
    System_Web_Mvc_ni!System.Web.Mvc.ViewResultBase.ExecuteResult(System.Web.Mvc.ControllerContext)+128    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(System.Web.Mvc.ControllerContext, System.Web.Mvc.ActionResult)+e    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()+18    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()+18    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(System.Web.Mvc.IResultFilter, System.Web.Mvc.ResultExecutingContext, System.Func`1<System.Web.Mvc.ResultExecutedContext>)+6c    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a+<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()+16    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a+<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()+16    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(System.Web.Mvc.IResultFilter, System.Web.Mvc.ResultExecutingContext, System.Func`1<System.Web.Mvc.ResultExecutedContext>)+6c    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a+<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()+16    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1a+<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()+16    
    System_Web_Mvc_ni!System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(System.Web.Mvc.ControllerContext, System.Collections.Generic.IList`1<System.Web.Mvc.IResultFilter>, System.Web.Mvc.ActionResult)+b2    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass25+<>c__DisplayClass2a.<BeginInvokeAction>b__20()+5a    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass25+<>c__DisplayClass2a.<BeginInvokeAction>b__20()+5a    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass25.<BeginInvokeAction>b__22(System.IAsyncResult)+25    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1[[System.Boolean, mscorlib]].End()+3a    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(System.IAsyncResult)+2c    
    System_Web_Mvc_ni!System.Web.Mvc.Controller+<>c__DisplayClass1d.<BeginExecuteCore>b__18(System.IAsyncResult)+f    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncResultWrapper+<>c__DisplayClass4.<MakeVoidDelegate>b__3(System.IAsyncResult)+18    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1[[System.Web.Mvc.Async.AsyncVoid, System.Web.Mvc]].End()+3f    
    System_Web_Mvc_ni!System.Web.Mvc.Controller.EndExecuteCore(System.IAsyncResult)+3a    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncResultWrapper+<>c__DisplayClass4.<MakeVoidDelegate>b__3(System.IAsyncResult)+18    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1[[System.Web.Mvc.Async.AsyncVoid, System.Web.Mvc]].End()+3f    
    System_Web_Mvc_ni!System.Web.Mvc.Controller.EndExecute(System.IAsyncResult)+30    
    System_Web_Mvc_ni!System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(System.IAsyncResult)+b    
    System_Web_Mvc_ni!System.Web.Mvc.MvcHandler+<>c__DisplayClass8.<BeginProcessRequest>b__3(System.IAsyncResult)+1a    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncResultWrapper+<>c__DisplayClass4.<MakeVoidDelegate>b__3(System.IAsyncResult)+18    
    System_Web_Mvc_ni!System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1[[System.Web.Mvc.Async.AsyncVoid, System.Web.Mvc]].End()+3f    
    System_Web_Mvc_ni!System.Web.Mvc.MvcHandler.EndProcessRequest(System.IAsyncResult)+30    
    System_Web_Mvc_ni!System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(System.IAsyncResult)+a    
    System_Web_ni!System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+935e29    
    System_Web_ni!System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)+9c    
    System_Web_ni!System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)+427    
    System_Web_ni!System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)+427    
    System_Web_ni!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)+60    
    System_Web_ni!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)+bb    
    System_Web_ni!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)+bb    
    System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)+2d7    
    System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)+2d7    
    [[InlinedCallFrame]]    
    System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+1f    
    System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+1f    
    webengine4!W3_MGD_HANDLER::ProcessNotification+5a    
    webengine4!W3_MGD_HANDLER::DoWork+2cb    
    webengine4!RequestDoWork+2ea    
    webengine4!CMgdEngHttpModule::OnExecuteRequestHandler+18    
    iiscore!NOTIFICATION_CONTEXT::RequestDoWork+153    
    iiscore!NOTIFICATION_CONTEXT::CallModulesInternal+3bf    
    iiscore!NOTIFICATION_CONTEXT::CallModules+28    
    iiscore!NOTIFICATION_MAIN::DoStateRequestExecuteHandler+3f    
    iiscore!NOTIFICATION_MAIN::DoWork+11a    
    iiscore!W3_CONTEXT_BASE::ContinueNotificationLoop+1d    
    iiscore!W3_CONTEXT_BASE::IndicateCompletion+9a    
    webengine4!W3_MGD_HANDLER::IndicateCompletion+38    
    webengine4!MgdIndicateCompletion+22    
    clr!PInvokeStackImbalanceHelper+22    
    System_Web_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.Web.RequestNotificationStatus ByRef)+3d    
    System_Web_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.Web.RequestNotificationStatus ByRef)+3d    
    [[InlinedCallFrame]]    
    System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)+456    
    [[InlinedCallFrame]]    
    System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+1f    
    System_Web_ni!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)+1f    
    clr!UM2MThunk_WrapperHelper+10    
    clr!UM2MThunk_Wrapper+76    
    clr!Thread::DoADCallBack+b4    
    [[ContextTransitionFrame]]    
    clr!UM2MDoADCallBack+92    
    0x08ae1a07    
    webengine4!W3_MGD_HANDLER::ProcessNotification+5a    
    webengine4!ProcessNotificationCallback+32    
    clr!UnManagedPerAppDomainTPCount::DispatchWorkItem+1c6    
    clr!ThreadpoolMgr::ExecuteWorkRequest+42    
    clr!Thread::intermediateThreadProc+4d    
    kernel32!BaseThreadInitThunk+e    
    ntdll!__RtlUserThreadStart+70    
    ntdll!_RtlUserThreadStart+1b 
    
  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 23, 2015 @ 18:54
    Nicholas Westby
    0

    Isn't this the line number in your partial?:

    enter image description here

    Not sure... maybe it's a character number? Also, there is a setting in your umbracoSettings.config to have partials throw an error rather than silently swallowing exceptions (change it to "throw"):

    enter image description here

  • Sunshine Lewis 31 posts 140 karma points c-trib
    Apr 23, 2015 @ 20:14
    Sunshine Lewis
    0

    Thank you Nicholas but no luck.

    That definitely isn't the line number (that particular script only has 146 lines) and setting the MacroErrors to "throw" instead of "inline" doesn't seem to make a difference. I'm still generating 10 or 15 crash dumps per page load.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 23, 2015 @ 22:09
    Nicholas Westby
    0

    Reading this, it seems those numbers in your stack trace after the "+" signs are offsets into the compiled code (so, not too useful for your purposes): http://odetocode.com/blogs/scott/archive/2005/01/25/funny-numbers-in-my-stack-trace.aspx

    However, if you would like line numbers, you can apparently get them by including the PDB (debug symbols) alongside the DLL's when you deploy your website, as the above link indicates.

    Given your situation, however, I'd try a process of elimination. That is, delete all of the code in the partial, and see if the error stops happening. If so, restore half the code. Then delete or restore more code until you narrow down the problem code. A bit time consuming, but may help you solve the problem.

Please Sign in or register to post replies

Write your reply to:

Draft