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

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

    DebugDiag 1.1 or Windbg, which one should I use? and how do I gather memory dumps

    • 15 Comments
    If you have read any of my posts you have probably noticed that I am very partial to windbg and the debugging tools for windows. I often get friendly nudges from the developers of debugdiag when I suggest using adplus and windbg on internal discussion lists, and to be fair I have to beat on the drum a bit for debug diag as well. My answer to the question "Should I use DebugDiag 1.1 or Windbg" is both... it just depends on the scenario. I often lean towards windbg but to a large extent that is because...
  • If broken it is, fix it you should

    ASP.NET Performance issue: Large number of application restarts due to virus scanning

    • 12 Comments
    Issues caused by frequent application restarts are pretty common. If you are interested in what causes application restarts in general, and how you can monitor application restarts and what causes them you should read this post: ASP.NET Case Study: Lost session variables and appdomain recycles The most recent one was one where the ASP.NET site would respond slowly at regular intervals (read: it grinded to a halt every few hours). First shot at gathering data: We started off by getting a memory dump...
  • If broken it is, fix it you should

    IIS7 Breaking Changes for ASP.NET 2.0

    • 1 Comments
    I just came across this great post from Mike Volodarsky (a program manager in the IIS team) about breaking changes when you move 2.0 applications to IIS 7 . It is definitely worth a read before you make the switch so you can take appropriate actions to avoid running into problems. Laters, Tess
  • If broken it is, fix it you should

    "Failed to start stack walk: 80004005", "Following frames may be wrong" and other errors you may see in windbg

    • 24 Comments
    When you debug .net applications you will sometimes get error messages in windbg. Here are a few of the ones I most commonly get questions around... Failed to start stack walk If you run the sos command !clrstack to display the .net stack on a thread, and this thread is a .net thread but it is not currently running any .net code, sos will spit out Failed to start stack walk: 80004005. This does not mean that there is anything wrong with the process or with the debugger. It simply means that sos can...
  • If broken it is, fix it you should

    ASP.NET Hang: Authenticode signed assemblies

    • 2 Comments
    When you use authenticode signed assemblies in an application, the application needs to go out and check the certificate revocation lists (CRLs) to verify that the signature is still valid the first time it loads up the authenticode signed assembly. If the server, serving your asp.net application, doesn't have internet access or if the internet connection is slow this can lead to issues where you stall the process during startup or when the assembly in question first loads. What you will typically...
  • If broken it is, fix it you should

    Blog Interesting - 32 Ways to Keep Your Blog from Sucking

    • 6 Comments
    Today I came across a really good article for bloggers, Scott Hanselmans post on " Blog Interesting - 32 Ways to Keep Your Blog from Sucking " (update: for some reason the link gives an xml error, should be http://www.hanselman.com/blog/BlogInteresting32WaysToKeepYourBlogFromSucking.aspx if the link above doesn't work) I realize that most of you are not bloggers, and also that I am breaking rule #7 and #8 on the list here:) 7. Don't post throwaways I try to have a minimum length...
  • If broken it is, fix it you should

    How do I get a hotfix for .net or Visual Studio?

    • 3 Comments
    I very frequently get emails like the one I got this morning: "Tess, It sounds like the hotfix for kb946644 may resolve a problem we've been having for some time in .Net 2.0. How, exactly, can we get this hotfix? Can you provide it?" This particular hotfix was one i blogged about here, regarding a deadlock with the GC when using XmlSchemaSet.Add... but the answer will be the same for any hotfix. Many new hotfixes in the Visual Studio or .net framework area are available for public download by the...
  • If broken it is, fix it you should

    ntdll!kifastSystemcallret, SharedUserData!SystemCallStub and search engines...

    • 8 Comments
    If I were to pick out ten keywords for my blog I would pick, in no particular order, ASP.net, windbg, sos, debugging, .net exceptions, memory leaks, performance issues, OutOfMemory exceptions, garbage collection, troubleshooting. Those are the things that I think, but I might be wrong, that people who visit my blog are most interested in. As with most other technical blogs (I think), about half of the traffic to my blog comes from people searching on various search engines, but what really surprised...
  • If broken it is, fix it you should

    ASP.NET Crash: StackOverflowException with Server.Transfer

    • 13 Comments
    I have written a few posts about stackoverflow exceptions, here, here , here and here . The one I am going to talk about today is one of those unfortunate cases where you are trying to do the right thing and still shoot yourself in the foot. Problem description: Randomly when browsing the application we get the "Internet Explorer cannot display the webpage" page, and the following event is found in the system eventlog Event Type: Warning Event Source: W3SVC Event Category: None Event ID: 1009...
Page 5 of 11 (252 items) «34567»