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

    Debugging a classic ReaderWriterLock deadlock with SOSex.dll

    • 3 Comments
    I was helping out on an issue the other day where the process would stall if they added enough users in their load tests.  Btw, serious kudos to them for making load tests, so much nicer to work with a problem in test rather than when it is getting critical on a production machine. We gathered some memory dumps with debug diag of the asp.net process (w3wp.exe) and found that most of the threads were waiting in this type of callstack:  NOTE:  I have changed a lot of function names and...
  • If broken it is, fix it you should

    IIS and PAE

    • 13 Comments
    I recently got a question by one of my customers about PAE and IIS that I thought I’d share the answer to. Their environment looked something like this: 32bit OS (Windows 2003) IIS 6 with multiple application pools, where each app pool hosts a number of applications ~20 GB RAM They were having problems with out of memory exceptions and also with paging under high load. They knew a lot about their application and memory usage in general, so they knew what they were using the memory...
  • If broken it is, fix it you should

    New debugger extension for .NET (PSSCOR2)

    • 19 Comments
    Tom just blogged about a new debugger extension called PSSCor2, which is a superset to the SOS.dll extension that ships with the .net framework. PSSCor2.dll has been around for quite some time at Microsoft, and pretty much everyone debugging .net code with windbg within Microsoft is using this since it contains all the goodness of sos.dll plus a lot of special methods for asp.net and other technologies running on top of the .net framework.  The news now is that after a lot of hard work by Tom...
  • If broken it is, fix it you should

    Videos of developer sessions at Oredev (including mine on .net debugging)

    • 14 Comments
    Just a quick post to share a link to last years videos for the Oredev developer conference http://oredev.org/video Here is my .net debugging presentation where I show off some windbg + new VS.NET features and apart from all the good developer content, you might also want to check out Scott Hanselmans session on Information Overload and managing the workflow with some tips and tricks on how he manages twitter/facebook/email etc. Thank you to the organizers of Oredev for posting these, Tess
  • If broken it is, fix it you should

    Tool for generating DGML graphs showing why your object can’t be collected (VisualGCRoot)

    • 7 Comments
    Visual Studio.NET 2010 has a new feature that allows you to create nice directed graphs with a markup language called DGML (Directed Graph Markup Language).  Visualizing object graphs with DGML Chris Lovett wrote a tool that takes GCRoot output and transforms it to a DGML document so that you can see the roots of an object in a more visual way, and finally Mohamed Mahmoud went one step further and made a debugger extension that does this for you directly.    The debugger extension...
  • If broken it is, fix it you should

    New commands in SOS for .NET 4.0 Part 1

    • 6 Comments
    My friend and fellow debugger Brian at http://Kodehoved.dk recently wrote a couple of posts on news with sos for .NET framework 4.0 (in Danish) New SOS Commands in .NET 4 More debugging news in CLR 4 Since Danish, although a beautiful language is probably foreign to most of you I figured I’d write a summary of the new commands in English and add some comments of my own. Loading sos for .NET 4.0 As in 2.0 you will find sos.dll in the framework directory so you can load it in windbg or cdb using the...
  • If broken it is, fix it you should

    It’s time for TechDays Sweden again…

    • 2 Comments
    March 23rd and 24th I will be presenting at TechDays Sweden in Örebro.  The agenda for my session is not set in stone yet but the plan is to talk about debugging .NET production type issues as usual (Performance, Memory, Crashes, Exceptions etc.) since that is what I know best. I will be talking about them both from a developers perspective, using some of the nice features in Visual Studio .NET 2010 like dump debugging, profiling, and perhaps IntelliTrace as well as discuss options for debugging...
  • If broken it is, fix it you should

    System.Configuration.ConfigurationErrosException “Unrecognized element ‘setting’” and other unrecognized elements

    • 9 Comments
    If you have a .NET configuration file with multiple <setting> elements, you may get the following exception: Unhandled Exception: System.Configuration.ConfigurationErrorsException: Unrecognized element 'setting'. (F:\MyApp\bin\Debug\MyApp.exe.config line 11)  at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)    at System.Configuration...
  • If broken it is, fix it you should

    MSDN Radio (Swedish) - Tess Corner

    • 1 Comments
    MSDN Radio is a Swedish MSDN podcast that is Dag König puts together every other week.  The show contains a number of different segments and is usually pretty fun to listen to. Starting this week, and hopefully every other week or so during the spring, I will have a 5-15 min segment on the show called Tess Corner where I’ll be talking about current ASP.NET and other .net issues or something special I’m working on.  In the first episode posted here http://channel9.msdn.com/posts/buzzfrog...
  • If broken it is, fix it you should

    Debugging Native memory leaks with Debug Diag 1.1

    • 28 Comments
    I often get questions about debugging native memory leaks. In other words, cases where you have high memory usage in your application but you can see that .net memory usage is not all that high. Recently I was helping out on such a case and this post details both generally how you go about troubleshooting these issues as well as what troubleshooting steps we went through in this particular case. Essentially you would go through these steps to troubleshoot a native memory leak: 1. Find out if your...
  • If broken it is, fix it you should

    High CPU in .NET app using a static Generic.Dictionary

    • 26 Comments
    A couple of weeks ago I helped out on a high CPU issue in an ASP.NET application. Problem description Every so often they started seeing very slow response times and in some cases the app didn’t respond at all and at the same time the w3wp.exe process was sitting at very high CPU usage 80-90%.  This started happening under high load, and to get the application to start responding again they needed to restart IIS. Debugging the problem They gathered a few memory dumps during the high CPU situation...
  • If broken it is, fix it you should

    Advanced .NET Debugging book

    • 14 Comments
    Last week i got the new Advanced .NET Debugging book by Mario Hewardt (co-authored with Daniel Pravat) in the mail.  I had the pleasure of tech reviewing it earlier this year and it is a really good deep dive in .net debugging and .net internals. The book talks about debugging .net apps with WinDbg and with PowerDBG (Powershell scripts for debugging by Roberto Farah) as well as other tools and techniques for debugging .net apps, and is well worth a read if you are interested in .net debugging...
  • If broken it is, fix it you should

    More debugging videos and a Resource List from my TechED and Oredev sessions on debugging asp.net applications

    • 1 Comments
    I just returned from Oredev and TechED EMEA , both conferences were very interesting in their own special ways. TechED was of course bigger with a lot of good sessions on my specific area while Oredev is a bit more small and cozy, and a way to meet people that deal with completely different things than I do, like JRuby, Clojure, UI Design what have you… and I guess to some extent to get a reality check and see what the world looks like outside of my .net bubble:) Windows Crash Dump Analysis...
  • If broken it is, fix it you should

    Recap of Oredev and some .net debugging videos

    • 7 Comments
    This week I attended and spoke at the Oredev conference in Malmö Sweden, and it was great fun as usual. It was a pretty productive few days with a lot of good talks and conversations with some really cool people. I’ll put up a link to the talk as it becomes available Channel9 video and chat with Scott Hanselman for Hanselminutes I got to meet “The man, the myth, the legend” Scott Hanselman and he recorded a 10 minute demo for Channel9 where I showed him how to debug a .Net performance...
  • If broken it is, fix it you should

    WOHOO!!!, Debug Diag 64bit is finally released

    • 15 Comments
    For all of you who have been asking me if there is a 64bit version of Debug Diag (used to debug 64 bit processes), I am happy to say that yes, Debug Diag 1.1 64bit is now released. You can download it here: http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en#filelist And an updated whitepaper talking about how to use it is available here: http://www.microsoft.com/downloads/details.aspx?familyid=4A2FBD0D-0635-440C-A08B-ED81BDBB5960&displaylang...
  • If broken it is, fix it you should

    .NET Hang Case study: The danger of locking on strings

    • 6 Comments
    I had an interesting case today where an asp.net app was stuck in a true deadlock. In other words two threads were both waiting for resources that the other thread owned. The scenario in these cases usually goes something like this: FunctionA (locks on ResourceA) and calls FunctionB where it needs ResourceB FunctionB (locks on ResourceB) and calls FunctionA where it needs ResourceA And is typically pretty easy to spot, understand and fix… However, in this particular case things were...
  • If broken it is, fix it you should

    Debug Diag: mscorwks.dll is responsible for 372.46 MBytes worth of outstanding allocations

    • 3 Comments
    I got an email today on an issue that I think is pretty common when you try to memory leak analysis on a dump with debug diag . They had set up a leak rule in debug diag to monitor for leaks and then ran the memory analysis on it to see what was leaking and the results looked something like this:   Warning mscorwks.dll is responsible for 372.46 MBytes worth of outstanding allocations. The following are the top 2 memory consuming functions: mscorwks!EEVirtualAlloc+119 : 312.00 MBytes worth of...
  • If broken it is, fix it you should

    Finding memory leaks with ANTS Memory Profiler

    • 6 Comments
    I was out looking for some sample scripts for tinyget and ran across this ANTS Memory Profiler review where Scott Seely has tested it out on some of my debugging labs . I haven’t had the time and/or opportunity to test it out myself but since many people have asked me if I had used it or what I thought of it I thought I’d just point you to someone who has instead:) Have fun, Tess
  • If broken it is, fix it you should

    ASP.NET Case Study: Hang when loading assemblies

    • 3 Comments
    The other day I came across an issue where an ASP.NET site stopped responding and didn’t start serving requests again until the W3WP.exe process was restarted. We grabbed some memory dumps with debug diag before restarting the process to see what was going on. Debugging the dumps: I opened the dump in windbg, and loaded up sos (.loadby sos mscorwks). As with all hang dumps I usually check what the threads are doing (~* kb) and I found that one thread (10) was initiating a garbage collection...
  • If broken it is, fix it you should

    Busy November, presenting at TechED Europe and Oredev

    • 2 Comments
    TechED Europe – Berlin -  9-13th of November This will be the 2nd time I present at TechED. Last time I had an absolute blast and heard some really  good speakers. I am still working with the TechED team on exactly what type of sessions I will get, and exactly what I’ll be talking about but I’m sure it won’t surprise anybody reading this blog that there will be a lot of debugging involved:)  There will be lot’s of windbg and maybe some Visual Studio 2010 stuff, and of course since...
  • If broken it is, fix it you should

    Forms authentication fails after installing IIS 7.5

    • 10 Comments
    I recently had a customer that just moved from Windows 2008 to Windows 2008 R2 (changing from IIS 7 to IIS 7.5) and after the move they got some weird forms authentication errors in the event log The problem They have two applications (MyWebApp and MyLoginWebApp) where forms authentication is dealt with in MyLoginWebApp <authentication mode="Forms"> <forms name="MyAppAuth" loginUrl="/MyLoginWebApp/Default.aspx" protection="All" timeout="720" path="/" slidingExpiration="true"...
  • If broken it is, fix it you should

    First step in troubleshooting complex issues: Define and scope your issue properly

    • 9 Comments
    Is it a plane, is it a bird, is it a UFO? Before you can delve into any kind of troubleshooting of an issue you need to thoroughly define it.  If you don’t you’ll probably end up spending a lot of time randomly gathering and looking at data that is probably not even relevant to the issue at hand.  More importantly, how do you even know that your problem is fixed if you don’t have a good definition of the problem? This might sound like common sense, but having worked with troubleshooting...
  • If broken it is, fix it you should

    How can I make you learn and benefit from my Blog? and how can I learn from you?

    • 58 Comments
    Summer is almost over and a new season of heavy work is beginning.  I wanted to take this opportunity to start on a new page and make sure that I’m spending my cycles doing the right things.  I’ve been blogging for almost 3 years now and throughout the blogs life I’ve been blogging pretty much the same way, trying to show examples of where me and fellow developers have gotten into situations that have caused crashes, memory leaks, exceptions, hangs etc., so that we can all learn from the...
  • If broken it is, fix it you should

    Why do I see ExecutionEngineException, StackOverflowException and OutOfMemoryException on the heap when debugging .net applications?

    • 7 Comments
    I came back from a long vacation today and I’ve finally caught up with enough emails to do something useful with my day. As I scanned through my blog email bucket I noticed that I had a lot of emails relating to my last post on dumping .net exceptions in windbg , and most of them asked why they see OutOfMemoryExceptions on the heap, and how to troubleshoot this. I think I have mentioned this before, but it seems like it is worth mentioning again as it is probably buried deep in some post from way...
  • If broken it is, fix it you should

    Design tips for Developers

    • 6 Comments
    I found a set of really nice, short videos by Arturo Toledo on the Silverlight blog that I thought were worth sharing. He goes through some of the design principles using the Microsoft Expression tools and talks about what you should think about when designing a web page, logo or whatever it is you are designing. Principles of design: Balance   - how you can achieve a sense of balance, and avoid the feeling of being pulled too much to any part of the design. Rhythm – using repeating visual patterns...
Page 2 of 11 (252 items) 12345»