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)

Posts
  • If broken it is, fix it you should

    Silverlight 2 Beta 1 and Expression Blend

    • 3 Comments
    ScottGu has outdone himself again with a demo series First Look at Silverlight 2 and First Look at using Expression Blend with Silverlight 2 . I'm pretty excited about Silverlight 2, and our group will support at least parts of it, so I feel that now is definitely high time for me to dig in to it and debug the core to get a solid grip on how things work in there. Democratizing the cloud When I presented at Oredev last year I got a chance to look at some silverlight presentations (1.0 at the time...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 5: Debugging Challenge! (time to test your knowledge)

    • 18 Comments
    We're about halfway through with the labs so to change it up a little bit I'm going to give you a debugging challenge. I will post the step-by-step instructions and review in about a week, but for now I will only post a problem description. Your mission, should you choose to accept it, is to troubleshoot the problem with only that problem description. Post intermediate findings, questions, potential solutions etc. in the comments, and don't worry if you go down the wrong path a couple of times...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 4: High CPU Hang - Review

    • 14 Comments
    Hope you have had a chance to go through the high CPU lab... Some people already commented with the solution in the lab instructions for this lab but here are my answers and commentary on the lab. Reproducing the issue: 1. Recycle IIS (IISReset) 2. Browse to http://localhost/BuggyBits/AllProducts.aspx this should take about 5 seconds or more depending on what machine you're on 3. Watch the CPU usage in taskmanager while browsing to this page Q: What is the CPU usage like for w3wp.exe during the processing...
  • If broken it is, fix it you should

    Generational GC (Garbage Collector) - A post-it analogy

    • 7 Comments
    I was working through the High CPU Lab Review which is basically caused by high CPU in GC. To understand what happens you need to know what a generational GC is and why it's useful. Last year sometime I used a restaurant as an analogy for how memory allocations in general and managed allocations in particular work and it turned out to be a pretty popular post. I guess analogies just make things stick in a way that pure technical descriptions don't:) Well, I had a discussion a long time ago...
  • If broken it is, fix it you should

    Reader Email: Private Bytes remain higher than expected

    • 2 Comments
    I got this question today (through the blog) and normally I don't really answer questions sent to me directly through the blog for a couple of reasons already mentioned in the Contacting Tess... post, mostly because I don't have the time to answer all the emails that drop in, but also because I feel that the blog should benefit everyone so I am much more apt to answer questions posted in comments so everyone can benefit from the answer. Having said this, I felt that this was a question that lent...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 4: High CPU hang

    • 13 Comments
    So we finished the first round of performance issues, crashes and memory leaks. This time we are going to dive in to a high CPU situation and I know that this is giving it away a little but before you go through the lab you might want to have a look at my GC Pop Quiz to familiarize yourself with how the GC works if you feel a bit shaky about it. Previous demos and setup instructions If you are new to the debugging labs, here you can find information on how to set up the labs as well as links to the...
  • If broken it is, fix it you should

    I'm presenting at ExpertZone Developer Summit 2008 (in Sweden)

    • 0 Comments
    It's that time of year again... on the 9th of April I will be presenting at ExpertZone Developer Summit 2008 in Sweden. My topic is of course troubelshooting ASP.NET applications using windbg, surprise surprise:) See ya there, Tess
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 3: Memory - Review

    • 40 Comments
    I was reading this post about spam ping-bots from OldNewThing and it makes me a bit mad because they just steal your content to make money, and create a lot of spam in my mailbox making it harder for me to find the real comments/track-backs. What is even more messed up is that some of these sites ask you to sign in and some even have you pay for content that someone else (like me) wrote:) amazing... so anyways, if you read this from some place other than http://blogs.msdn.com/Tess , an RSS reader...
  • If broken it is, fix it you should

    High memory usage with usercontrols in IE (using Debug Diag)

    • 5 Comments
    I was helping a colleague with an interesting case yesterday concerning a memory leak in IE when using winforms usercontrols. We got a nice little repro with a very basic user control that displayed a picture and each time the page was refreshed it appeared to leak quite a bit of memory, and inducing a garbage collection had no effect on the memory. I started off with setting it up on my machine, and then I used Debug Diag 1.1 to track down the leak... Debug diag is not all that great for managed...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 3: Memory

    • 30 Comments
    TGIF, almost time for the weekend... but before you leave, here is lab 3. Todays debugging puzzle will be a Memory investigation. This time we are going to stress the BuggyBits site to create a high memory usage situation and figure out what caused it. This lab is a bit lengthier because I wanted to show various aspects of a memory investigation. Once you know the relationship between the numbers in the dump and perfmon etc. you can often skip some parts, but if it is possible to gather I would...
  • If broken it is, fix it you should

    When a mommy and a daddy love each other...

    • 0 Comments
    It's been a long time since I posted anything in the bag of chips category but man, this book really made me laugh:) Why read stories to your kids about Cinderella and Spiderman when you can read about stay-at-home servers A quote from the book "When a mommy and a daddy love each other very much, the daddy wants to give the mommy a special gift" :) http://www.stayathomeserver.com/book.aspx The book is even available at amazon http://www.amazon.com/Mommy-Why-There-Server-House... And if that's not...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 2: Crash - Review

    • 43 Comments
    Hi all, I realize that you probably haven't all had a chance to look at the Crash lab yet, considering I just published it on Friday but here is the review for it. I have to say that considering the amount of downloads for the buggy bits site I am a bit surprised with the lack of questions about the labs. Perhaps they were too easy, or perhaps people just haven't had the time to go through them yet... either case, feel free to ask questions or comment on the labs, even questions that aren't directly...
  • If broken it is, fix it you should

    Hang caused by GC - XML Deadlock

    • 14 Comments
    In December I blogged about a little tool that i wrote to analyze hangs in dumps , and i showed the following output, but didnt really get into the details of why the process was stuck in here... ____________________________________________________________________________________________________________________ GC RELATED INFORMATION ____________________________________________________________________________________________________________________ The following threads are GC threads: ...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 2: Crash

    • 31 Comments
    It was nice to see that so many people downloaded the demo site already and checked out the lab instructions for the first lab, and thanks to Pedro for pointing out that the original demo site required .NET Framework 3.5... I've changed it now so the one that you can download from the setup instructions page should not require .Net Framework 3.5. (Even though I would encourage you to download 3.5 and play around with it anyways:)) Here comes lab 2, a crash scenario on the BuggyBits site. Previous...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 1: Hang - Review

    • 54 Comments
    Earlier this week I published the first .NET Debugging Demos Lab. If you haven't downloaded and tried it out you can get it here . This is a review of this lab with answers to the questions and comments inline in red. Note: results and thread IDs will vary depending on how fast you click and what machine you have and what threads the request happen to run on, so I will answer with the results from my dual-proc W2k3 machine. Reproduce the problem: 1. Browse to http://localhost/BuggyBits/FeaturedProducts...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 1: Hang

    • 51 Comments
    This is the first in a series of about 10 labs on .NET debugging. The lab will use a site called BuggyBits, and as the name suggests the bits are extremely buggy. To get started, follow the setup instructions posted here . I have a feeling that these hands-on-labs may generate a lot of questions and although I will try to answer any questions posted in the comments I can’t promise to answer them all so please feel free to answer other readers comments if you know the answer, and make sure that...
  • If broken it is, fix it you should

    Learning .NET debugging

    • 38 Comments
    I often get questions like How do I learn .net debugging? What books should I read? Where can I find more information? I know everyones learning style is different so this might not be the best way for you, but the way I try to learn things is by "teaching". For example the way I started out with .net debugging was by putting together a really silly .net debugging web cast series with one of my colleagues. Looking back at them now they make me laugh, both because seeing yourself on video is just...
  • If broken it is, fix it you should

    ASP.NET Hang and OutOfMemory exceptions caused by STA components

    • 6 Comments
    I have talked about blocked finalizers before and this issue is a special case of blocked finalizers where we are not really finalizing a .NET object but rather cleaning up all Com Callable Wrappers (CCWs) and getting stuck doing that. Problem description: The situation we are facing is that the ASP.NET process starts to go hey wire both in response times and in memory usage. All of a sudden memory just starts growing and growing and we need to figure out why. Troubleshooting: We took...
  • If broken it is, fix it you should

    ASP.NET hang/slowness on startup

    • 7 Comments
    After making some changes to their domains one of my customers noticed that their ASP.NET 2.0 applications didn't respond anymore. HTML pages and images were serving just fine as well as their ASP.NET 1.1. sites, but all their 2.0 sites on all servers seemed to hang when browsing to them in IE. Looking at the IIS logs they noticed that they had two 401 requests to their pages but never got the 200 OK request for them which is usually the case when a page is served ok. When they ran aspnet_regiis...
  • If broken it is, fix it you should

    More ASP.NET debugging with SOS

    • 3 Comments
    One of my colleagues has started a blog that is worth reading if you like this blog. His name is Tom and he is also an Escalation Engineer in the ASP.NET team but not only that, he is also one of the developers of sos.dll. Read his blog here: http://blogs.msdn.com/tom/ Tess
  • If broken it is, fix it you should

    Using Reflector to search through code and resolve .NET issues

    • 11 Comments
    As you already know, i spend my days analyzing dumps for customers, and more often than not I don't have access to the customers code. I could probably ask for it but it usually takes a long time and even then I often just get partial code, and sometimes, if the customer has multiple environments or if there has been recent changes, the code I would get may not correspond exactly to what was running in production when the dump was taken. I'm sure many of you are familiar with Lutz Roeder's Reflector...
  • If broken it is, fix it you should

    Case Study: ASP.NET Deadlock calling WebServices

    • 15 Comments
    Lately, no matter where you turn there are LINQ presentations and Silverlight demos. A couple of years back the hot new stuff was webservices and XML. All these technologies are really cool and serve their purpose very well for the right applications, but as with anything you always have to weigh the pros against the cons of using a technology for a specific purpose, otherwise you will end up with an app like " The Beast " featured on one of the best geek humor sites around " The Daily WTF " ...
  • If broken it is, fix it you should

    Automated .NET Hang Analysis

    • 19 Comments
    In my constant effort to make my job obsolete, I have created an "add-in" for windbg that automatically checks for hang conditions in a .NET memory dump. Disclaimer: It is very crude and doesn't have a lot in terms of exception handling so basically I don't follow my own examples here:) but on the other hand, this is supposed to be used by one person at a time and if it crashes it won't really hurt anyone so that is really why I omitted exception handling and code optimization. This is...
  • If broken it is, fix it you should

    Getting Started with Windbg

    • 0 Comments
    I'm back from Oredev which turned out to be a really cool conference. Meanwhile my colleague Johan wrote a very nice introduction to debugging with Windbg and sos, outlining some of the most commonly used commands etc. that is well worth reading if you are just starting up with post-mortem debugging. Here you go, http://blogs.msdn.com/johan/archive/2007/11/13/getting-started-with-windbg-part-i.aspx Laters, Tess
  • If broken it is, fix it you should

    ASP.NET Crash: System.Security.Cryptography.CryptographicException

    • 14 Comments
    This has been a busy month for blogging for me, I'm up to a whopping 8 posts this month including this one which is the most I have written in any given month (since Feb 2006)... We have seen a few cases lately where ASP.NET apps die due to an unhandled CryptographicException when finalizing a SafeHandle. Here is the explanation of why this happens and what you can do to avoid it. Problem description Intermittently ASP.NET will crash with the following entries in the appication eventlog...
Page 7 of 11 (252 items) «56789»