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

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

    A case of lost session variables when using out of process session state

    • 0 Comments
    Recently I had a case where the customer had an issue with session variables.  The claim was that if they use in-proc session state their session variables would work just fine, but if they changed the session mode to stateserver in web.config their sessions were lost. <sessionState mode="StateServer" cookieless="UseCookies" stateConnectionString="tcpip=127.0.0.1:42424"/> When looking at bit closer at the repro, it wasn’t really all session variables that...
  • If broken it is, fix it you should

    Visual Studio 2010 .net debugging resource

    • 3 Comments
    If my post on dump debugging in VS 2010 piqued your interest, here is a list of a number of other new debugging features coming up in 2010 http://blogs.msdn.com/ms_joc/archive/2009/05/27/dev10-beta1-free-at-last.aspx I for one will be following the blog to get the scoop… On a related note, John Robbins also wrote a nice post about historical debugging in VS2010, I haven’t tried it yet but I can already see a number of ASP.NET scenarios where it can be applied. http://www.wintellect...
  • If broken it is, fix it you should

    First look at debugging .NET 4.0 dumps in Visual Studio 2010

    • 14 Comments
    I know that for a lot of you this is a bit far into the future, but I thought it would be nice to run through a few of my lab scenarios to show off some of the new features in Visual Studio 2010.  I am sure that I will miss a bunch of cool features here as this post is just based on my first experience with this, but I will likely post more about these features as we get closer to RTM.  As we are only in Beta, anything and everything may change before RTM and the below is just based on...
  • If broken it is, fix it you should

    Background Garbage Collection in CLR 4.0

    • 10 Comments
    Yesterday I found this really nice Channel 9 interview with Maoni Stephens (Dev Owner of the CLR GC) and Andrew Pardoe (Program manager for the CLR GC) where they talked about the new Background GC in CLR 4.0. She also talks about it here and there is not much value in me repeating what she already says there but basically the main points of the video and the post are: Concurrent GC is being replaced by Background GC in CLR 4.0 Concurrent GC is the mode of the GC that you use in desktop...
  • If broken it is, fix it you should

    Debug Diag script for troubleshooting .NET 2.0 Memory leaks

    • 27 Comments
    I have put together a quick and dirty debug diag script for troubleshooting .net memory leaks. (attached to this post) The reason I put it together was mainly to show how you can create your own debug diag scripts but feel free to use it to troubleshoot memory leaks, knowing that it does string parsing on the output so it is a bit prone to errors if sos changes output formats. NOTE: This script will only work on .NET 2.0 x86 memory dumps Mourad recently published a whitepaper on debug diag...
  • If broken it is, fix it you should

    Neat .NET 2.0 StackViewer to troubleshoot hangs/performance issues

    • 13 Comments
    Bret wrote a post about Managed Stack Explorer , a really nice tool that was developed in 2006 but since then seems to have been forgotten. It’s excellent if you want to troubleshoot hangs/performance issues in a process but don’t want to go through the hassle of getting and analyzing a dump.   What it will do is basically attach, snap the .net call stack and detach so you can see what all the .net threads are doing without using a debugger. What is even cooler is that you can copy/run...
  • If broken it is, fix it you should

    Unable to load DLL ‘dllname.dll’: A dynamic link library (DLL) initialization routine failed. 0x8007045A

    • 13 Comments
    I recently got an email with the following question: “Can you give me some very helpful hints with this one ? I am struggling with the following error in an asp.net application. Exception Message: Internal Error : Unable to load DLL 'RdbNet.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) The RdbNet.dll is an .NET dll from Oracle so I can't debug into it. If I use a windows forms application I never have the error. I have already used procmon...
  • If broken it is, fix it you should

    Show me the memory: Tool for visualizing virtual memory usage and GC heap usage.

    • 25 Comments
    A colleague of mine, John Allen, created an awesome tool way back that displays memory usage in a process very nicely. I use screenshots from it from time to time in presentations or posts but unfortunately that tool is not publicly available. Since lots of people have asked me about it I figured I would just do a quick and dirty mock-up (based on the same ideas) and post the VS solution here. This sample tool will give you a visual overview of the virtual memory space (from a memory dump)...
  • If broken it is, fix it you should

    .NET Exceptions: Quick WinDbg/SOS tip on how to dump all the .NET exceptions on the heap

    • 14 Comments
    Since a .net exception is a .NET object like any other, it gets stored on the GC heap when you (or some code you call) calls new XXException().  This means that if you have a memory dump of a process you can dump out all the recent exceptions that have occurred, or rather all exceptions that have not yet been garbage collected, which will give you a good feel for what exceptions occurred recently.  Doing this is pretty easy if you have sos loaded (.loadby sos mscorwks) in windbg 0:015>...
  • If broken it is, fix it you should

    Validation of viewstate MAC failed after installing .NET 3.5 SP1

    • 44 Comments
    After installing .NET 3.5 SP1 you may get Validation of viewstate MAC failed exceptions when doing post backs on ASP.NET pages Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information...
  • If broken it is, fix it you should

    Developers are from Mars, Ops people are from Venus… or It looked good on paper

    • 19 Comments
    A few weeks back me and Micke (one of our Architect Evangelists) had a session at TechDays where we talked about “things that looked good on paper” i.e. things that sound pretty ok in the design/development phase but sometimes turn out to be a disaster in production. We are both pretty passionate about making the lives of the ops. people easier by thinking about the maintenance of the sites/apps at design time, rather than having it be an afterthought.  I stole the title of this post from one...
  • If broken it is, fix it you should

    Debugging a .NET crash with rules in Debug Diag

    • 26 Comments
    During mine and Micke’s presentation at TechDays this week I showed a demo of setting up rules with Debug Diag to identify the cause of a crash in an ASP.NET application. Even though debugging might be tricky, setting up rules in Debug Diag is beautifully simple and I personally believe that it would be a good idea for anyone running a web site to have debug diag installed along with a few instructions for the ops personnel on how to set up the rules. Better yet, you can set up the rules in advance...
  • If broken it is, fix it you should

    Silverlight/WPF FlipImage Animation

    • 19 Comments
    I was working on some Silverlight samples and needed an image that could flip over as in the example below. All the samples I could find on the net were pretty complex and contained a lot of code to do the animation and I wanted something really simple. To create the illusion of an image that flips over (or any kind of UI element that flips over) you just need 4 things 1. A front image / UI element 2. A back image / UI element 3. A flip animation 4. A reverse animation The flip...
  • If broken it is, fix it you should

    .NET Rocks: Debugging chat

    • 11 Comments
    Yesterday I had a nice chat with Richard and Carl at .NET Rocks . We talked about .net, debugging, memory issues and a bunch of other stuff, and in the end I got a pop quiz that I failed:) See if you can figure out what caused the outage on their servers… The show will be uploaded here some time today. Laters, Tess
  • If broken it is, fix it you should

    Silverlight Game – Part 3 - Using Linq to XML to read and generate the levels

    • 4 Comments
    This is part three in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In Part 2 we created some Cars to place on the board, in this post we will read the level information and place the Cars accordingly. I have attached a number of xml files to this post...
  • If broken it is, fix it you should

    Silverlight Game – Part 4 - Adding drag and drop functionality to move the cars around

    • 4 Comments
    This is part four in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In part 3 we finished the level generation, now we are getting ready to move the cars around a little. 1. Add EventHandlers for MouseLeftButtonDown, MouseMove and MouseLeftButtonUp on the...
Page 3 of 11 (261 items) 12345»