Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Debugging   (RSS)

Managed Watson Dump

From .Net Framework 2.0, Dr. Watson is able to generate dump compatible with .Net framework. This means, dumps with heap data generated by Dr. Watson contains information about managed heap so they can be analyzed with sos.dll. Some update to Dr.Watson
Posted by junfeng | 1 Comments
Filed under:

Inspect a 32 bit Process Dump Generated by a 64 bit Debugger

64 bit Windows can run both 32 bit process and 64 bit process. For debugging though, you want to use 32 bit debugger to debug 32 bit process, and 64 bit debugger for 64 bit process. Otherwise it won’t be pretty. Occasionally, I receive a 32 bit process
Posted by junfeng | 2 Comments
Filed under:

Event Handles “leak”

On our stress run, we saw our process’ handle count steadily increases until certain point, then it stabilizes. However the number of handles is high. Most of those handles are Event handles. We are concerned about it. So we went off and did some investigation.
Posted by junfeng | 3 Comments
Filed under: ,

Use !htrace to debug handle leak

Windbg Debugger’s !htrace extension is very handy to debug handle leak. The process essentially boils down to the following simple steps: 1. Enable trace 2. Take a snapshot 3. Run scenario 4. Show the diff On step 4, !htrace will show all the extra opened
Posted by junfeng | 3 Comments
Filed under:

A case study of a NullReferenceException

We are seeing a NullReferenceException in our stress program. The investigation process may be helpful to some folks. Thread 22 is showing a Watson dialog. This is a register corruption. 0:022> kp ChildEBP RetAddr 091bc9a0 76961220 ntdll!ZwWaitForSingleObject(void)+0x15
Posted by junfeng | 3 Comments
Filed under: ,

Getting the right exception context from a memory dump

When debug a memory dump, the dump may not in the right exception context when it is first loaded in the debugger. However, we can figure out the right context from the dump. Let's load the dump. c:\debuggers>cdb -z c:\temp\foo.dmp Symbol search path
Posted by junfeng | 1 Comments
Filed under:

Calculating the size of each GC generation

Sos.dll does not have a command to tell the size of each GC generation. However, you can calculate the size based on the output of !eeheap -gc. For example, 0:000> !eeheap -gc Number of GC Heaps: 1 generation 0 starts at 0x1da6c430 generation 1 starts
Posted by junfeng | 2 Comments
Filed under: ,

Figuring out object allocation graph from a managed memory dump

when debugging a managed memory dump, we can use Sos.dll to inspect managed objects inside the dump. for example, we can do !dumpheap to list the managed objects in GC Heap, we can also use !gcroot to figure out the reference path to a particular object.
Posted by junfeng | 2 Comments
Filed under: ,

From Unhandled Exception to Debugger Attach

I was always wondering what is happening between an application throws an unhandled exception, and a debugger attached to the process. Apparently the information is right under my nose, but I was blind. Windows Debugger's documentation about post-mortem
Posted by junfeng | 1 Comments
Filed under: ,

Mismatched PDBs --- Why?

If you are developing software, most likely you have encountered the "mismatched pdbs" debugger error. It usually happens when you point the debugger to the wrong symbol path. But there are times you are confident that the symbols you point to are the
Posted by junfeng | 5 Comments
Filed under:

MiniDumpAuxiliaryDlls and KnownManagedDebuggingDlls

I accidentally stumble on these two registry keys. And the expert in Windows Debugger team answers my question. -----Original Message----- From: Subject: RE: managed minidump Auxiliary DLLs are loaded inside of MiniDumpWriteDump when it finds a registered
Posted by junfeng | 1 Comments
Filed under:

Loading CLR DAC dll from a different path

From .Net framework 2.0, CLR creates a debugger helper dll mscordacwks.dll. The dll is used by Windows Debugger to enumerate CLR data structures. Mscordacwks.dll is part of .Net framework redist. C:\Windows\Microsoft.NET\Framework\v2.0.50727>dir mscordacwks.dll
Posted by junfeng | 1 Comments
Filed under: ,

Finding Memory leaks

MSDN and Microsoft support web site have some great information on how to find memory leaks, both for managed application and native applications. Unmanaged: How to use Umdh.exe to find memory leaks http://support.microsoft.com/kb/268343 Managed: Debugging
Posted by junfeng | 1 Comments
Filed under:

Unknown exception 0xe0434f4e

If you attach windows debugger to a .Net framework application, occasionally you may see debug spew of unknown exception 0xe0434f4e. (cfc.1244): Unknown exception - code e0434f4e (first chance) 0xe0434f4e is defined as EXCEPTION_HIJACK. (Copied from Rotor
Posted by junfeng | 1 Comments
Filed under: ,

Break on exception in Windows Debugger

In Windows Debugger, we can break on C++ exception by doing " sxe eh ". We can also break on CLR exception by doing " sxe clr ". But sometimes you may see the following debug spew: (94c.960): C++ EH exception - code e06d7363 (first chance) (94c.960):
Posted by junfeng | 0 Comments
Filed under:
More Posts Next page »
 
Page view tracker