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

    Using VSTS Test and Profilers to troubleshoot a High CPU in GC issue

    • 5 Comments
    Following my post about how to troubleshoot a low CPU performance issue with VSTS Test, I will now do the same for lab 4 where we have high CPU in GC. The scenario is pretty similar in that we have a page ( http://localhost/BuggyBits/AllProducts.aspx ) that seems to be taking a lot of time to execute. We also see that the w3wp.exe process sits at very high CPU ~100% during the time this page executes. Using Windbg in the lab, we saw that the issue here was that we were concatenating a very...
  • If broken it is, fix it you should

    Using VSTS Test and Profilers to troubleshoot performance issues (low cpu hang)

    • 18 Comments
    I’ve been wanting to dig into the Test features in Visual Studio Team System for a while to “debug” issues during the test phase. In my previous post I linked to a Swedish screen cast by Mikael Deurell, but for those of you who don’t know Swedish I thought I’d walk through troubleshooting a couple of my labs using the Visual Studio Team System Profiler and Load Tests. Problem description The issue we will troubleshoot comes from lab 1 in my BuggyBits lab set, and the scenario here is that we...
  • If broken it is, fix it you should

    Swedish Screen casts of debugging labs and visual studio test

    • 3 Comments
    I know that perhaps not that many of you know Swedish, but for those of you who do, you might want to check out Michael Deurell’s nice screen casts about how to use visual studio test system to troubleshoot the issues in the buggybits labs along with some windbg fun…  His screen casts are called “Fräschast i Bandhagen”, just love that name (unfortunately doesn’t translate that well to English:)) http://blogs.msdn.com/deurell/archive/2008/09/30/debugga-i-produktion-eller-testa-bort-i-utveckligsfas...
  • If broken it is, fix it you should

    Making it easier to debug .net dumps in windbg using .cmdtree

    • 9 Comments
    John Robbins beat me to the punch and wrote an excellent post about using .cmdtree in windbg to ease some .net debugging pain in windbg. The windbg .cmdtree command allows you to create a popup window in windbg with commands that execute when you click on the respective link...  so you no longer have to remember all the sos commands to get around in your managed dump. Read his post here and with the command tree text file he provides you will be up and running in no time...  You can also...
  • If broken it is, fix it you should

    Q&A Reader emails about .NET memory leaks and random questions

    • 9 Comments
    Here are of some of the reader emails I got this week and my answers to them... How do I troubleshoot this memory leak Debugging techniques for capturing stacks of OOMS Do you have a list of Debugging 101 links? Debugging managed code in IE Getting to dependency properties with sos let me know if this is something you find useful so I should keep doing it from time to time, or if it's only useful for the selected few who's email I happened to pick this week:) Note: some of the emails have been edited...
  • If broken it is, fix it you should

    ASP.NET Memory Issues - High Memory Usage with AjaxPro (fixed in current version)

    • 5 Comments
    I was helping a colleague out with an OOM (OutOfMemory) situation he was dealing with. Problem description: Their applications memory usage would grow over time until they finally ended up with an out of memory exception. First debug: They had gotten a memory dump when memory usage was really high 1.4 GB using debug diag and I opened it up in windbg.exe , loaded up sos (.loadby sos mscorwks) and ran !dumpheap -stat to get the content of the GC heaps. 0:028> !dumpheap -stat Statistics...
  • If broken it is, fix it you should

    Quick Debugging Tip: Disable apppool recyling while getting crash dumps

    • 3 Comments
    I have probably mentioned this before, but I think it is worth mentioning again because of the frequency of this issue. When debugging a crash, we usually get customers to use a crash rule in debug diag or to use adplus -crash to get memory dumps at the point of the crash. Both of these attach to the process and gathers dumps when the process is shutting down, which is exactly what we want... The problem is that very often we will get what I call "false-positive" dumps. I.e. dumps when the...
  • If broken it is, fix it you should

    ASP.NET Memory - Identifying pages with high Viewstate

    • 12 Comments
    From time to time we get issues with high memory and performance issues due to massive viewstate. I have talked about it before here , but I thought I'd show some techniques for finding out which pages have high viewstate. If you look at a memroy dump of your process in windbg and notice that your large object heap is riddled with viewstate strings, that doesn't really tell you much, except for that you have some pages that have high viewstate, so the goose chase begings trying to find the source...
  • If broken it is, fix it you should

    OutOfMemoryExceptions while remoting very large datasets

    • 21 Comments
    When you have to pass an object back and forth between processes or application domains you have to serialize it into some type of stream that can be understood by both the client and the server.   The more complex and big the object gets the more expensive it is to serialize, both CPU wise and memory wise, and if the object is big and complex enough you can easily run into out of memory exceptions during the actual serialization process... and that is exactly what happened to one of my...
  • If broken it is, fix it you should

    Creating a UI Module For IIS7 to watch Current Requests

    • 14 Comments
    A while back I posted about Failed Request Tracing in IIS 7 and I mentioned the command appcmd list requests which lists the requests that are currently executing in the process... I was playing around a bit with UI Modules in IIS7, you know the ones that show up in the Features view when you open up a site in IIS 7... ... and I decided to create one that displays the requests that are currently executing... This is a step-by-step of how I created it, along with a few notes about...
  • If broken it is, fix it you should

    Debugging Puzzler - WinForms crash - Can you figure out what caused it?

    • 17 Comments
    Earlier this week I was doing a presentation and since the company I presented for had mostly winforms developers I wanted to convert all my ASP.NET debugging demos to winforms equivalents for the presentation. As I was converting my first demo (a performance issue) I ran into a bit of a snag because the first time I ran the demo (which populates 4 datagridviews with product information) things worked fine. I clicked the Featured Products button, my datagrids were nicely filled, I could reproduce...
  • If broken it is, fix it you should

    Debugging Silverlight applications with windbg and sos.dll

    • 33 Comments
    If you have hangs, performance, memory issues, exceptions or crashes in Silverlight applications you can debug them using windbg and sos just like you would if the issues occurred in other .net applications. The difference is that Silverlight in IE runs a subset of the framework where the main dll is coreclr.dll rather than mscorwks.dll so you can't use the regular 2.0 version of sos.dll that you can find in the framework directory. Instead you can install the Silverlight Developer Runtime from...
  • If broken it is, fix it you should

    Questions on application domains, application pools and unhandled exceptions

    • 33 Comments
    I got an email with some questions around application domains, application pools and unhandled exceptions from a developer that was frequently seeing his website crash, and also had some related issues with session loss in his application. I have written before about unhandled exceptions and session loss due to appdomain restarts but I thought his questions would serve as a nice refresher. From what i read, my understanding is that a website has an app pool associated with it. This app pool...
  • If broken it is, fix it you should

    Troubleshooting a performance issue with Failed Request Tracing and appcmd in IIS7

    • 8 Comments
    I know I'm a little late in the game, but I decided that after vacation it was finally time for me to install Windows 2008 on my Vista box and play around with some of the IIS 7 features like Failed Request Tracing (known as FRT or FREB) and the appcmd tool. I wanted to show you an alternative way of troubleshooting Lab 1 (hang scenario) from my Debugging Lab series using Failed Request Tracing and appcmd so here are some things I will go through in this post Setting up failed request tracing...
  • If broken it is, fix it you should

    Vacation

    • 4 Comments
    Just wanted to post a quick note to apologize for not responding to any comments over the last 4 weeks as I have been on an extended vacation with very limited internet access. Next week I will be attending an event so the updating will probably be slow then too, but I'll go through all the comments and emails and answer the ones I can the week after and I shoud have some new posts comming out then too. Hope y'alls summer has been great so far Tess
  • If broken it is, fix it you should

    ASP.NET Memory Leak: Byte arrays rooted in System.Security.Policy.Evidence

    • 6 Comments
    Today I got a question from a reader (Chris) about a memory leak they are seeing in their application When we do a '!dumpheap -min 85000 -type Byte[]' we can see 100s of byte array objects using up ~545MB of memory. A majority of the objects are the same size (either 4.5 or 9MB in size). Looking at the memory addresses, they all appear to be different copies of our assemblies. And when we do !GcRoot on those addresses they all either have no results returned, or show a rooted System.Security.Policy...
  • If broken it is, fix it you should

    Bag of Chips: Installing XNA Games on your Zune

    • 5 Comments
    It is not often that I stray too far from debugging and ASP.NET on my blog, but this time I am going to make an exception because I am just really excited about this:) so I'll put this post in the "bag of chips" category... I finally installed the first games on my Zune, and in reality it wasn't even a game, but a clock, a feature that I had really been missing. I am sure that it will get a lot easier as everything goes public but for now, here is what I did to install the games with the...
  • If broken it is, fix it you should

    100% CPU in vbc.exe when compiling large vb.net web applications in Microsoft Visual Studio 2008

    • 15 Comments
    We just released a hotfix for an issue where you get 100% CPU in vbc.exe when compiling large applications in Microsoft Visual Studio 2008. Apart from the 100% CPU situation you may also notice symptoms like visual studio taking a very long time to return or error messages like Error 246 Timed out waiting for a program to execute. The command being executed was "C:\Windows\Microsoft.NET\Framework\v3.5\vbc.exe" /noconfig @"C:\TempFiles\MyApp\8ec39ce7\e41b4e32\gpznqwbu.cmdline". or ...
  • If broken it is, fix it you should

    Presenting at TechEd Developers Europe 2008, Barcelona

    • 0 Comments
    Save the date!  TechEd Developers North America 2008 just finished but there is plenty more to come... I know it's a bit early still, but November 10th through 14th TechEd Developer 2008 is coming to Barcelona, Spain and the session list is already starting to build. This will be my first time at TechEd so I am really excited, especially with it being in Spain (since I'm half Spanish).   If you want to check out the sessions that are already posted you can do so here and give feedback...
  • If broken it is, fix it you should

    ASP.NET Case Study: Deadlock waiting in GetToSTA

    • 8 Comments
    This is an issue I come across once in a while and since I am not a COM expert by any means I actually had to check in with our COM guys to see what was going on in this case, and as it turned out (this is embarrassing:)) I had already written about the root cause of this issue before ( here ). So what I am learning from this is that perhaps I should at least check my blog before asking questions:) Problem description Intermittently the application will stall, so all requests will hang until...
  • If broken it is, fix it you should

    CLR Inside Out: Large Object Heap Uncovered

    • 1 Comments
    In many of my posts I have discussed performance issues and memory issues caused by excessive use of the Large Object Heap, here are a few examples... ASP.NET Case Study: High CPU in GC - Large objects and high allocation rates ASP.NET Case Study: Bad perf, high memory usage and high CPU in GC - Death By ViewState Maoni just wrote a nice article in MSDN Magazine called CLR Inside Out: Large Object Heap Uncovered , it is definitely worth a read if you are interested in how the GC works and specifically...
  • If broken it is, fix it you should

    Setting .NET breakpoints in Windbg for applications that crash on startup

    • 4 Comments
    I recently received a question from a reader who wanted to know how to set breakpoints in code for applications that crash on startup. The email went like this: I have a .NET app which is crashing upon startup (it even causes DW20.exe to make an appearance). When I open the .NET app in Windbg, I can see exactly what the exception is and where it happens. What I would like to do is put a breakpoint on the method where the exception is being raised so that I can step through it. This is where I'm stuck...
  • If broken it is, fix it you should

    ASP.NET Memory: Thou shalt not store UI objects in cache or session scope

    • 28 Comments
    ASP.NET Memory: Thou shalt not store UI objects in cache or session scope Surprisingly the issue I wrote about in " the eventhandlers that made the memory baloon " (Jan 2006) is something that still happens very frequently, I reference it in cases at least a few times a month.  Just this last week I had different variations of it crop up in different cases so in this post I will show a different variation, what to look out for and how to identify it. Problem description: The issue...
  • If broken it is, fix it you should

    My presentation on Troubleshooting ASP.NET applications at Oredev

    • 1 Comments
    The guys at Oredev are in the midst of preparing for the next Oredev conference in November. Sadly I won't be presenting there this year because of other comittments. I say sadly because it was an awesome event last year. If you want to check out my presentation from last year you can do that here . The page says "Due to technical problems with our video equipment, this session was never recorded" but that is incorrect. The video is there... Disclaimer: I had some issues with the mike not fitting...
  • If broken it is, fix it you should

    The 21 most popular blog posts

    • 15 Comments
    I started this blog 2.5 years ago today, mostly because I felt that the same types of issues came up over and over and over in our support cases. I figured that if I started writing about them, a lot of people would be able to resolve them on their own, or even better avoid them in the first place. A lot of water passed under the bridge since then, but looking back at some of those earlier posts they are still very applicable today, and they still seem to continue to get a lot of hits. Here is a...
Page 5 of 11 (261 items) «34567»