Things to ignore when debugging an ASP.NET hang

When looking at a dump, a lot of the art of debugging (I like to call it an art because it makes me feel more important:)) is knowing what you can ignore so you can get to the goodies. Especially if you are looking at a hang, it’s nice to know what the most common…

14

Why do I get weird function names on my stack? (a discussion on symbols)

Symbols can contain information about global variables, local variables, function names, parameters, structures and source line numbers. There are 3 types of symbols, export symbols, pdb symbols (public symbols) and private pdb symbols (private symbols). The export symbols are part of the dll itself. For example ntdll.dll and kernel32.dll expose a big part of their…

20

Associate windbg with .dmp files

If you get tired of starting the debugger, loading your dump, setting up your sympath, loading your extensions, etc. etc. here is a nifty way of getting “Debug this dump” on the context menu for .dmp files and get all your favourite commands automatically loaded. First create a .reg file with the following contents (as…

17

Are you aware that you have thrown over 40,000 exceptions in the last 3 hours?

This may seem like a preposterous statement, but unfortunately it’s all too common. In my work I go through a lot of dumps, somewhere in the neighborhood of 5-20 in a day:) Since the information is readily available to me, I usually do a quick check for the number of exceptions that the application has thrown and…

51

What on earth caused my process to crash?

So you got a 1000 w3wp.exe stopped unexpectedly in the eventviewer or your process just exited in some weird undefined way and you don’t know why. When a process crashes or exits a special event will be fired called EPR (Exit PRocess) so with a debugger like windbg.exe we can attach to the process, wait…

10

!dumpheap –stat explained… (debugging .net leaks)

The most powerful command when debugging a managed memory leak is by far !dumpheap. It will show you all the objects on the managed heaps and using the different switches of !dumpheap you can display the output in virtually any way you want.   !dumpheap is a function of the sos.dll extension that comes with…

16

I have a memory leak!!! What do i do? (defining the "where")

Not that it matters a tremendous lot but just because it is a big pet-peeve of mine I want to differentiate between a real memory-leak and high memory usage. A memory leak is when you used some memory and lost the pointer to the allocation so you can no longer de-allocate that memory.  If you…

17

Why I love the debugger...

10 years ago, still in college, I started working for a company developing real-time systems for trains in Motorola HC11 assembly. Although very interesting and challenging it was a relief to later move on to some more high-level languages, but in the end, no matter how high-level the programming language you work in, everything comes…

31