If broken it is, fix it you should

Using the powers of the debugger to solve the problems of the world - and a bag of chips    by Tess Ferrandez, ASP.NET Escalation Engineer (Microsoft)

January, 2006

Posts
  • If broken it is, fix it you should

    .NET Memory Leak Case Study: The Event Handlers That Made The Memory Baloon

    • 45 Comments
    It always feels like issues come in clusters. One week we get tones of cache related cases, next week everyone is stuck in some lock and so on. Lately I have had a number of issues where there were memory leaks related to event handlers. Problem description We have a pretty easy to repro memory leak, even with very few users memory grows at a high rate and the memory is never released. The usual suspects are eliminated, i.e. we know that the app doesn’t cache much or store much or anything...
  • If broken it is, fix it you should

    Back to Basics - How do I get the memory dumps in the first place? And what is SOS.dll?

    • 20 Comments
    Windbg.exe and its friends can be installed from http://www.microsoft.com/whdc/devtools/debugging/default.mspx Once you have them installed on a machine, you can simply copy the directory where they are installed (usually c:\program files\debugging tools for windows) to any machine that you need them on. No other installation is really necessary. Before we even start with how you get the dumps, you might be interested in what a memory dump actually is... A memory dump is a snapshot of a...
  • If broken it is, fix it you should

    A Hang Scenario, Locks and Critical Sections

    • 19 Comments
    The situation here is that the server at times slows down considerably, or even hangs completely. Requests start timing out and no new requests seem to be getting through. The scenario below is a bit simplified but it shows the technique to find owners, waiters and locations for locks. A quick look with ~* kb (listing the native stack for all threads) shows us that most threads are sitting in this type of stack… 30 Id: d78.c68 Suspend: 1 Teb: 7ff5a000 Unfrozen ChildEBP RetAddr Args to Child ...
  • If broken it is, fix it you should

    ASP.NET Memory - How much are you caching? + an example of .foreach

    • 19 Comments
    I was writing a post on debugging a high memory usage problem caused by storing too much in session scope, but I realized I got in to tangent discussions all the time so I decided to create a separate post on caching first. Caching is by far the most common cause of high memory problems. It’s an understatement to say that the cache is often overused. As with everything else nothing comes for free, so the performance you gain by storing items in cache has to be compared to the performance you...
  • If broken it is, fix it you should

    Request for feedback

    • 34 Comments
    Not sure if anyone is reading this blog, but if you are and there is something specific you want me to blog about please let me know. On my TODO list right now i have Debugging managed memory leaks Automating debugging with .shell and .foreach etc. Debugging .net 2.0 applications but I want this blog to be a useful resource, so rather than just blogging about what interests me, let me know what interests you:). And I'm also interested in getting feedback on if my blog posts are...
  • If broken it is, fix it you should

    Debugging Tips: Use windbg as a calculator, a chat client and more…

    • 4 Comments
    Yes, you read it right… it’s not only a debugger, for only $19.95 extra, we’ll throw in a free calculator and chat client:) and you can even run applications from windbg’s command prompt. Calculator Jokes aside, not even I would open up windbg only for the purposes of doing calculations, but when you are debugging and need to do some simple conversions from hex to decimal, and some integer calculations you don’t have to switch to calc.exe, you can just use windbg’s expression evaluator. ...
  • If broken it is, fix it you should

    A bag of chips – Math stuff… and books…

    • 3 Comments
    This is a completely off topic post but I added the “–and a bag of chips” to the blog description to allow myself to write these:) I just came across an article about teaching binary to 3rd graders , through something called the Socratic method, and it’s just an amazing read. Hmm… wonder if I can apply this on my 3 year old daughter:) As you probably could have guessed I have a special place in my heart for pure mathematics (proofs, deduction etc.). It sorta goes hand in hand with debugging...
Page 1 of 1 (7 items)