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

    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...
  • If broken it is, fix it you should

    Performance Testing Web Applications - New Patterns and Practices guide

    • 2 Comments
    One of my old colleagues J.D. Meier has written a performance testing guide with the Patterns and Practices team. Here is a link to the guide, it's well worth reading: http://blogs.msdn.com/jmeier/archive/2007/10/27/now-on-msdn-patterns-practices-performance-testing-guidance-for-web-applications.aspx Laters, Tess
  • If broken it is, fix it you should

    Why is my app performing worse on .NET 2.0 than on 1.1 (or why aren't the oranges at work as tasty as the apples at home?)

    • 3 Comments
    If you were to compare the taste of the oranges in the fruit basket at work to the taste of the apples you bought on your way home and realize that they taste differently, what would your conclusion about the difference in taste be? a) They taste differently because one is an apple and one is an orange b) The apple tastes better because you eat the apple at home relaxed in your sofa and the orange while you are coding at work c) The apple tastes better because it is fresh from the store (which...
  • If broken it is, fix it you should

    .NET Hang case study - High CPU because of poorly formatted regular expressions (Identifying tight loops)

    • 13 Comments
    Sometimes you hear and accept advice but you don't really know the details behind it. That has always been the case with me and high CPU situations caused by badly formatted regular expressions. The reason I haven't really bothered to find out why is because I've never had a case on it until today... It's actually not that I haven't been interested, in fact regular expressions fascinate me in a geeky way. My favourite class in college was a class on " automata theory and formal languages " a class...
  • If broken it is, fix it you should

    My Team is Hiring

    • 10 Comments
    Time for a commercial break, If you read this blog you probably know what I do. If it is something that you would like to do for a living, now is your chance! My team (the Microsoft EMEA Internet Support Team) is hiring. We are primarily looking for a new team member in France (Paris/Les Ulis), but the main criteria apart from good skills in troubleshooting and specifically in the Internet sphere (IIS, ASP.NET etc.) and good customer service skills, is that the applicant speaks fluent French...
  • If broken it is, fix it you should

    ASP.NET 2.0 OutputCaching - Download dialog box after browsing with SmartPhone

    • 6 Comments
    A few days ago I got an interesting case with a customer who intermittently kept getting a download box with Safari and a similar one telling him that he has choosen to open Default.aspx, do you want to open or save the file, when browsing the site with FireFox. In IE it sometimes came back with the following message The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. Invalid...
  • If broken it is, fix it you should

    .NET Finalizer Memory Leak: Debugging with sos.dll in Visual Studio

    • 10 Comments
    Normally I write about issues that only manifest themselves in production environment, issues that you can't really reproduce in a controlled dev environment every time you perform a certain action. In those cases you need to use tools like windbg to gather dumps and do post-mortem debugging. Windbg works really well for those types of issues, but it has its shortcommings since it is not really a managed debugger so it is much harder to set breakpoints in .NET code or step through code, or even...
  • If broken it is, fix it you should

    Creating dumps with Windbg and writing ADPlus Config files

    • 5 Comments
    My colleague Carlo just wrote a post on how to create dumps and how to configure ADPlus with config files, that I thought was really useful http://blogs.msdn.com/carloc/archive/2007/10/08/ok-now-how-do-i-capture-my-dump.aspx He also talks a little about DebugDiag, a tool for creating dumps and doing automated dump analysis for certain cases. Btw, the dumps you generate with debug diag can be read in windbd and vice versa since the dump format is exactly the same. Tess
  • If broken it is, fix it you should

    I'm presenting at Oredev in Malmo, Sweden Nov 13th-15th

    • 4 Comments
    Nov 13th-15th I will be presenting at Oredev in Malmö, Sweden. Oredev is a tech conference and this year it looks really promising considering all the big names they have brought in to present. I will be doing a presentation on Common issues in ASP.NET production environments. It will basically be a presentation on things to avoid in order to not run into some of the most common hangs/perf issues, memory issues, crashes and exceptions and for good measure I am planning to throw in some windbg/sos...
  • If broken it is, fix it you should

    Debugging Script: Dumping out ASP.NET Session Contents

    • 18 Comments
    In my last post I wrote a script to dump out all the ASP.NET requests on the heap. Since one of the most common memory issues I encounter is too much cache or session state I figured that showing you how to retreive session data would be good. A word of caution, since this script uses !dumpheap (to dump out the objects on the heap) and !objsize (to figure out the size of an object including the size of its membervariables) it may take a long time to execute if you have a very large dump, which...
  • If broken it is, fix it you should

    Debugging Script: Dumping out current and recent ASP.NET Requests

    • 22 Comments
    When you debug asp.net applications it is often useful to find out which requests are currently executing, how long they have been executing, what the querystring was etc. Since getting this information from a dump can be a long and tedious process even if you know what you are doing, it lends itself extremely well for a script. If you are only interested in the script itself, please skip to the last section, but if you're anything like me, and want to know the nitty gritty details and want to...
  • If broken it is, fix it you should

    ASP.NET Hang scenario: Kernel Debugging for Dummies

    • 8 Comments
    A local radio show has started giving out cookie points to their interviewees for personal development, and the other day my coworker decided to give me one for debugging a perf issue in kernel-mode... YAY!!! Having debugging as a profession, you might have thought that I would have done a lot of kernel debugging, but since I deal mostly with ASP.NET and .NET development most of our issues are in usermode so there is rarely a need to debug the kernel (drivers etc.). In fact, I have only debugged...
  • If broken it is, fix it you should

    An attempt to improve the blog quality

    • 3 Comments
    Courtesy of my pals on http://blogs.msdn.com/ntdebugging/ I have added a chance to give post feedback, by adding a survey at the bottom of my case studies. The survey is an anonymous "yes" or "no" click and I'll use it to figure out what type of posts and topics are most useful so if you read a post that resolves a problem for you or helps you in the right direction, please click away:) Thanks, Tess
  • If broken it is, fix it you should

    ASP.NET Memory Investigation

    • 14 Comments
    This is a bit of a continuation of ASP.NET Memory Issue: High memory usage in a 64bit w3wp.exe process so if you haven't checked it out you might want to just glance over it before reading this one to get the context of the problem and some notes on 64 bit debugging. Before I go into the details I just want to mention that what I will talk about does not only apply to 64 bit debugging even though I am using a 64 bit dump, you can just as easily see the problems I will talk, about and use the same...
  • If broken it is, fix it you should

    ASP.NET Hang Case Study: Application hangs on startup

    • 4 Comments
    Recently we have been getting quite a few similar hangs in ASP.NET. From the first look they really aren't all that similar but when we get down to the nitty-gritty we see that they all hang or rather have a very high latency, in the exact same location. Problem description: On startup, the first request for an aspx page, no matter how simple it is, will take around 2 minutes. In fact, all subsequent requests will also take 2 minutes to execute, so the server is essentially out of order. ...
  • If broken it is, fix it you should

    More reading material

    • 2 Comments
    I want to try to keep this blog free of link-listings and just publish my own case studies etc. but when I come across something like these articles by Rahul Soni, I can't help but share them The infamous debug=true attribute Post Production Debugging for ASP.NET Applications – Part 1 Enjoy, Tess
  • If broken it is, fix it you should

    ASP.NET Memory Issue: High memory usage in a 64bit w3wp.exe process

    • 11 Comments
    By default when you run IIS on a 64-bit machine you will still be running a 32-bit w3wp.exe, so apart from a few differences, like being able to use 4 GB virtual bytes instead of 2 GB virtual bytes the difference in debugging an issue on 32-bit vs. 64-bit is not that big. You will still be debugging with a 32-bit debugger and the memory will be aligned the same as in any 32-bit process on a 32-bit system. As a matter of fact, something that is very important to point out, is that if you happen...
Page 8 of 11 (261 items) «678910»