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

    Fix for RestartWWWService=false in Visual Studio 2010

    • 0 Comments
    We recently published a fix for the following problem: You create a deployment project for a web application in Visual Studio 2010, set the deployment property RestartWWWService=false and deploy to a Windows 2003 server. http://msdn.microsoft.com/en-us/library/22f9106b.aspx In this situation the w3wp.exe process will still be recycled even though the RestartWWWService is set to false. The fix is available at http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=32285...
  • If broken it is, fix it you should

    Debug Diag 1.2 (Beta)

    • 23 Comments
    Are you looking for some good stuff to put in your family’s Christmas stockings this year? Maybe a new phone, a controller for your gaming console, why not a brand new debugging tool:) Jokes aside, I get peppered with questions about Debug Diag and if there is a new version coming that will support Windows 7 / Windows 2008 and luckily some of my EE colleagues have been and are still working hard at making this happen. While it is not available for public download yet at the MS download site, Beta...
  • If broken it is, fix it you should

    Do you know ISA/Forefront and want to work in the cube next to mine (Sweden)?

    • 1 Comments
    If you live in Stockholm, know a lot about ISA/Foreftont/TMG/UAG and you’re just aching to spend the days debugging and troubleshooting interesting problems, we have a full-time Microsoft position open right now. Not only that, but you would get to have your morning “fika” with some fine people like Graham , Spike and Johan :) (ok, better stop now before this turns into an infomercial) Anyways, if it tickles your fancy, you can read more about it on the ISA blog and send your CV to my manager Roffe...
  • If broken it is, fix it you should

    Capturing memory dumps for 32-bit processes on an x64 machine

    • 17 Comments
    This is an issue that I often get questions around and we often have cases where we have to re-capture memory dumps because the memory dumps were captured the “wrong” way. The short story is: If you are executing a 32-bit process on a 64-bit machine, (which is the default case for IIS on x64 machines for example) you need to capture the dump with a tool that allows you to create 32-bit dumps. How do you know if your process is 32-bit? If you are on a 64-bit machine, you can check...
  • If broken it is, fix it you should

    Help! !clrstack is not showing any method names

    • 0 Comments
    From time to time I get questions about missing method names in the sos !clrstack output, like this: 0:019> !clrstack OS Thread Id: 0x5d0 (19) ESP EIP 0f31f340 7c80bef7 [HelperMethodFrame_1OBJ: 0f31f340] 0f31f398 1449167a 0f31f3c4 144915e6 0f31f3f4 10d81b48 0f31f4b4 793e25cf 0f31f4bc 79366b3d 0f31f4d4 793e2734 0f31f4e8 793e26ac 0f31f678 79e7c0e3 [GCFrame: 0f31f678] Jonathan Dickinson from SourceCode, just emailed me and told me that he had written an article about this...
  • If broken it is, fix it you should

    Getting full user mode dumps automatically when your process crashes

    • 9 Comments
    I recently got a question about if it is possible to generate full user mode dumps automatically every time the process crashes (without having debug diag or adplus installed and monitoring your system). This would be useful for example if you are setting up a site, and you want to make sure you get dumps if it ever crashes so that you don’t have to repro the issue at that point, just to get data. It turns out that starting with Windows Server 2008 and Vista + SP1, Windows Error Reporting...
  • If broken it is, fix it you should

    The SQL Server Support Team in Stockholm is hiring

    • 1 Comments
    If you are a contractor in Stockholm, skilled in SQL, have a look at this post: http://blogs.msdn.com/b/grahamk/archive/2010/06/22/the-sql-server-support-team-in-stockholm-is-hiring.aspx Have a good one, Tess
  • If broken it is, fix it you should

    .NET Memory Leak: XslCompiledTransform and “leaked” dynamic assemblies

    • 5 Comments
    I have written before about high memory usage caused by improper usage of XmlSerializer objects both in a case study and in a debugging lab .  The problem there was that every time you create a new XmlSerializer object with a non-default constructor, you generate a new dynamic assembly that contains the definition and methods for the serializer.  Since assemblies can’t be unloaded from a process unless the application domain they are loaded in is unloaded memory will keep increasing if...
  • If broken it is, fix it you should

    New Visual Studio 2010 and .NET 4 debugging content

    • 0 Comments
    It’s been a pretty busy few weeks at work coupled with some vacation so I’ve been lagging a bit with the blogging, so sorry for bombarding the blog with new posts now:) As you all know, Visual Studio 2010 just released and there is a lot of new content out there and I thought I’d mention a few in the debugging/troubleshooting space. ScottGu wrote a post on the VS 2010 debugger improvements as part of his VS 2010 and .NET 4 post series where he talks about news with Data Tips and Breakpoints. The...
  • 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

    • 28 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

    • 17 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...
Page 2 of 11 (261 items) 12345»