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)

April, 2008

Posts
  • If broken it is, fix it you should

    Why are some commands missing in sos for 2.0 compared to sos for 1.1?

    • 2 Comments
    This question that I got from a reader is something that I get asked pretty frequently... "I met a small problem during my dump analysis, our application is using .net 2.0. when I load 2.0 version of sos.dll, some of useful extension commands are lost, but sos.dll which is under clr10 debugging tool has. Do you know any way to use those extension command in 1.1 under 2.0 sos.dll?" After you have gotten used to the wealth of commands and functions in sos for .net framework 1.1 it can get a bit tedious...
  • If broken it is, fix it you should

    Setting breakpoints in .net code using !bpmd

    • 5 Comments
    From time to time I get questions like "our process spawns a lot of threads, how do we know who created them?" or "can I tell how many times we call this method?". You can answer both of these questions by setting breakpoints, and below is a simple sample of how this is done in windbg with sos... My demo application (MyApplication.exe) has a class MyThreadClass that has a method CreateAThread, this creates a thread and starts running some method on that thread. What I am going to show here is how...
  • If broken it is, fix it you should

    Does interrupting GC.WaitForPendingFinalizers interrupt finalization?

    • 2 Comments
    I got a question the other day around calling GC.Collect and GC.WaitForPendingFinalizers. The issue revolved around a problem where the finalizer was blocked and where the application would call GC.Collect() and GC.WaitForPendingFinalizers() which then caused the thread that called GC.WaitForPendingFinalizers() to hang, and the question was If we interrupt the thread that calls GC.WaitForPendingFinalizers() will this also interrupt the finalizer thread, i.e. unblocking the finalizer? I would be very...
  • If broken it is, fix it you should

    Pimp up your debugger: Creating a custom workspace for windbg debugging

    • 5 Comments
    From time to time I get questions about how to change settings in windbg like this one... The default color scheme for the command window is really annoying, because it is always black and white. It is really hard to figure out something in the screen after you have executed some commands that generates lots of output, especially for the command you entered. Then I tried to configure the colors through view -> options -> colors, unfortunately I failed because of the items listed there which...
  • If broken it is, fix it you should

    How does the GC work and what are the sizes of the different generations?

    • 30 Comments
    During our ASP.NET debugging chat there were many questions around the GC and the different generations. In this post I will try to explain the basics of how the GC works and what you should think about when developing .net applications in relation to the GC. First off, there is already a lot written about the .net Garbage Collector. One of the best resources regarding how the GC works and how to program efficiently for the GC is Maoni’s blog . She hasn’t written anything since May 2007 but all...
  • If broken it is, fix it you should

    My presentation on Troubleshooting ASP.NET production issues at Developer Summit 2008

    • 2 Comments
    The purpose of my presentation was to show some common pitfalls and of course to show off windbg and sos just to show people that if you have a hang, perf issue, memory leak or crash, there are tools out there that can help you figure out the root cause so that you don't have to resort to guessing. The site I used for the presentation is attached to this blog post. is a summary of the topics I covered. Hangs and Performance issues First I debugged a simple hang (using locks in conjunction...
  • If broken it is, fix it you should

    Developer Summit Sessions on Silverlight, MVC, FaceBook, and Work ethics amongst software developers

    • 4 Comments
    On Wednesday I presented a session on troubleshooting ASP.NET production issues at Developer Summit 2008 in Sweden. It offered a lot of good presentations as usual, and here is a summary of the ones I went to along with some links related to the topics they were covering. I will write a separate post about the presentation I did along with a download for the actual presentation. I spent most of my time on the Web track and I was only there for the first day since I had to get back to work to...
  • If broken it is, fix it you should

    .NET Performance Issues: What if I suspect that my performance problem is in SQL Server Part II

    • 3 Comments
    Last week Graham was guest blogging on my blog about PSSDiag and how to gather data with PSS Diag. In this second installment he talks about how to read and understand the data. Graham is in the process of starting his own blog about how to troubleshoot different SQL issues. As soon as it is up and running I will post a link. In the meantime, enjoy! Part 2: Reviewing the data First off - an addition to Part 1 . One of my colleagues in the US has posted the internal performance statistic T-SQL script...
  • If broken it is, fix it you should

    .NET Performance Issue: What if I suspect that my performance problem is in SQL server?

    • 11 Comments
    Very often when investigating ASP.NET or other .NET performance issues we find threads stuck waiting for SQL Server or some other database to respond. I am by no means an expert in SQL Server so I thought I'd invite one of the escalation engineers, Graham Kent, in the SQL Server support team to write a little bit about how you can determine if there is a performance issue in SQL Server or if you can discard SQL Server as the root cause of your perf issue. Graham Kent, SQL Server Escalation Engineer...
  • If broken it is, fix it you should

    .NET Debugging Demos Lab 7: Memory Leak - Review

    • 18 Comments
    We have reached the end of the .NET Debugging Demos series. And we are going to end it with a review of the last memory leak lab. I am interested to get feedback, either in comments or through email in the contact me section, on what you liked, what you didn't like. If you felt that it was worth your while etc. so I know if there is an interest in possibly doing similar lab series in the future. It will probably be a while before I would post a new series but if there is interest at least I can start...
  • If broken it is, fix it you should

    Recap of yesterdays ASP.NET Debugging Blog Chat

    • 2 Comments
    I have to say that I was happily surprised, not only that so many people showed up and about the amount of questions that came up but also about the type of questions that came up. It was definitely very interesting for me. Tom had a good recap of the chat topics that came up, and we will be dividing these among us to write articles that cover these in a little more detail. The portions that were covered in the chat will be covered in the posts as well... Basics of debugging, how to capture a dump...
  • If broken it is, fix it you should

    Live blog chat about asp.net and debugging with windbg and sos (10 am EST/4 pm CET)

    • 1 Comments
    Welcome to the first blog chat for ASP.NET Debugging. I hope you enjoy this and please let me know your comments on the experience. I am planning on posting a recap of the conversation (or question and answers) after we are done to the blog so that others can see what was discussed. If it gets busy and your question doesn't get answered, I will be reviewing the chat and will get an answer posted in the recap. This chat will last an hour. UPDATE Thank you everyone who attended this chat. It...
  • If broken it is, fix it you should

    Questions about .net Exceptions

    • 9 Comments
    One of my readers emailed me the following question I have a simple questions that my management asks me. When I see all kinds of exceptions thrown (null exceptions etc..), what is the user experience? Does their system hand these back to the user? does it return an error message? or simply crashes? How can I determine the user experience pertaing to these exceptions? My answer The answer depends very much on the type of exception that is thrown, where it is thrown from and of course if it is caught...
  • If broken it is, fix it you should

    New version of SilverLatte and Espresso Blend available for download

    • 12 Comments
    I am sure that you have all been awaiting this new version of SilverLatte and Espresso Blend as much as I have. Last week I got a chance to test out the new bits and I was completely elated with all the new features. Especially the new editor add-in for windbg:) Powered by SilverLatte More information Espresso Blend and SilverLatte are the next in a series of tools that allows you to develop rich user interfaces for both web and windows applications. With its sharp GUI it enables rapid...
Page 1 of 1 (14 items)