Windbg – analyze a framework 4.0 exception Dump

Open windbg, if the dump is from a 64 bits plataforma use windbg 64 bits.

Go to windbg menu File/Open Crash Dump, and choose your dump file.

Load the clr.dll, this should be in the same version that it is in the plataform, from where you took your dump.

!load C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll

Load the psscor4.dll, you can download this dll from (http://www.microsoft.com/en-us/download/details.aspx?id=21255), be sure of the version 64 vs x86:

!load G:\Psscor4\Psscor4\amd64\amd64\psscor4.dll

Now you can access the Stack of your exception, using (!ClrStack), this command can have other parameters, if you use (!ClrStack -a), you can see the parameters in each call.

To print the value of any of those parameters, you can use (!do <parameter adress>)

0:008> !ClrStack

OS Thread Id: 0x2a8 (8) Child SP         IP               Call Site 0000000001e9a978 000007fefda8a49d [HelperMethodFrame_PROTECTOBJ: 0000000001e9a978] System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, Boolean) 0000000001e9ab50 000007fef5bd0117 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, Boolean, Boolean)*** WARNING: Unable to verify checksum for mscorlib.ni.dll

0000000001e9abf0 000007fef5bb44f0 System.Reflection.RuntimeAssembly.InternalLoadFrom(System.String, System.Security.Policy.Evidence, Byte[], System.Configuration.Assemblies.AssemblyHashAlgorithm, Boolean, Boolean, System.Threading.StackCrawlMark ByRef) 0000000001e9ac50 000007fef5bb729d System.Reflection.Assembly.LoadFrom(System.String) 0000000001e9acb0 000007ff0020079a WebActivator.ActivationManager.get_Assemblies()*** WARNING: Unable to verify checksum for WebActivator.dll *** ERROR: Module load completed but symbols could not be loaded for WebActivator.dll

0000000001e9ad80 000007ff00200278 WebActivator.ActivationManager.RunActivationMethods[[System.__Canon, mscorlib]]() 0000000001e9ae90 000007ff00200206 WebActivator.ActivationManager.RunPreStartMethods() 0000000001e9aec0 000007ff00200158 WebActivator.ActivationManager.Run() 0000000001e9b598 000007fef6c210b4 [DebuggerU2MCatchHandlerFrame: 0000000001e9b598] 0000000001e9b680 000007fef6c210b4 [CustomGCFrame: 0000000001e9b680] 0000000001e9b648 000007fef6c210b4 [GCFrame: 0000000001e9b648] 0000000001e9b5d8 000007fef6c210b4 [GCFrame: 0000000001e9b5d8] 0000000001e9b9a8 000007fef6c210b4 [HelperMethodFrame_PROTECTOBJ: 0000000001e9b9a8] System.RuntimeMethodHandle._InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType) 0000000001e9baf0 000007fef5bc5cb8 System.RuntimeMethodHandle.InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.Signature, System.Reflection.MethodAttributes, System.RuntimeType) 0000000001e9bbe0 000007fef5bc5789 System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean) 0000000001e9bd20 000007fef5c10426 System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) 0000000001e9bd70 000007fee2c4fe77 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(System.Collections.Generic.ICollection`1<System.Reflection.MethodInfo>)*** WARNING: Unable to verify checksum for System.Web.ni.dll

0000000001e9be30 000007fee2c4f9e1 System.Web.Compilation.BuildManager.CallPreStartInitMethods() 0000000001e9bea0 000007fee2c4210f System.Web.Hosting.HostingEnvironment.Initialize(System.Web.Hosting.ApplicationManager, System.Web.Hosting.IApplicationHost, System.Web.Configuration.IConfigMapPathFactory, System.Web.Hosting.HostingEnvironmentParameters, System.Security.Policy.PolicyLevel, System.Exception) 0000000001e9bf20 000007fee2c41cc6 System.Web.Hosting.HostingEnvironment.Initialize(System.Web.Hosting.ApplicationManager, System.Web.Hosting.IApplicationHost, System.Web.Configuration.IConfigMapPathFactory, System.Web.Hosting.HostingEnvironmentParameters, System.Security.Policy.PolicyLevel) 0000000001e9c398 000007fef6c210b4 [GCFrame: 0000000001e9c398] 0000000001e9c3d0 000007fef6c210b4 [GCFrame: 0000000001e9c3d0] 0000000001e9c608 000007fef6c210b4 [ContextTransitionFrame: 0000000001e9c608] 0000000001e9c8a0 000007fef6c210b4 [GCFrame: 0000000001e9c8a0] 0000000001e9c8d8 000007fef6c210b4 [GCFrame: 0000000001e9c8d8] 0000000001e9e1f8 000007fef6c210b4 [CustomGCFrame: 0000000001e9e1f8] 0000000001e9e220 000007fef6c210b4 [CustomGCFrame: 0000000001e9e220] 0000000001e9e248 000007fef6c210b4 [CustomGCFrame: 0000000001e9e248] 0000000001e9e270 000007fef6c210b4 [CustomGCFrame: 0000000001e9e270] 0000000001e9e298 000007fef6c210b4 [CustomGCFrame: 0000000001e9e298] 0000000001e9e2c0 000007fef6c210b4 [CustomGCFrame: 0000000001e9e2c0] 0000000001e9e2e8 000007fef6c210b4 [CustomGCFrame: 0000000001e9e2e8] 0000000001e9e8e8 000007fef6c210b4 [TPMethodFrame: 0000000001e9e8e8] System.Web.Hosting.HostingEnvironment.Initialize(System.Web.Hosting.ApplicationManager, System.Web.Hosting.IApplicationHost, System.Web.Configuration.IConfigMapPathFactory, System.Web.Hosting.HostingEnvironmentParameters, System.Security.Policy.PolicyLevel) 0000000001e9e950 000007fee2c40b54 System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(System.String, System.Web.Hosting.IApplicationHost, System.Web.Hosting.HostingEnvironmentParameters) 0000000001e9eb60 000007fee2c3faa5 System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(System.String, System.Web.Hosting.IApplicationHost, System.Web.Hosting.HostingEnvironmentParameters) 0000000001e9ebc0 000007fee2c3fa22 System.Web.Hosting.ApplicationManager.GetAppDomainWithHostingEnvironment(System.String, System.Web.Hosting.IApplicationHost, System.Web.Hosting.HostingEnvironmentParameters) 0000000001e9ec30 000007fee2c3f938 System.Web.Hosting.ApplicationManager.CreateObjectInternal(System.String, System.Type, System.Web.Hosting.IApplicationHost, Boolean, System.Web.Hosting.HostingEnvironmentParameters) 0000000001e9ec90 000007fee33a592a System.Web.Hosting.ProcessHost.StartApplication(System.String, System.String, System.Object ByRef) 0000000001e9ed40 000007fee33f2972 DomainNeutralILStubClass.IL_STUB_COMtoCLR(IntPtr, IntPtr, IntPtr ByRef) 0000000001e9f138 000007fef6c8e93e [GCFrame: 0000000001e9f138] 0000000001e9f320 000007fef6c8e93e [ComMethodFrame: 0000000001e9f320]

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: