Naming tests
I’m a sucker for clean, minimalistic code, that is easy to read, understand and maintain.
I’m a sucker for clean, minimalistic code, that is easy to read, understand and maintain.
I often hear (on social media or direct comments) people saying you can’t use minimal APIs for “real production” apps.
After 12 years in support I decided to lift my head above the WinDbg window and take a look at what the rest of the world has to offer.
I get several emails every day (through the blog) with urgent requests to help troubleshoot memory issues or memory related performance issues. Some just say...
We recently published a fix for the following problem:
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...
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 th...
From time to time I get questions about missing method names in the sos !clrstack output, like this
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...
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 ther...
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 ...
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 maki...
I recently got a question by one of my customers about PAE and IIS that I thought I’d share the answer to.
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.
Just a quick post to share a link to last years videos for the Oredev developer conference
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).
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)
If you have a .NET configuration file with multiple <setting> elements, you may get the following exception:
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 .n...
A couple of weeks ago I helped out on a high CPU issue in an ASP.NET application.
I just returned from Oredev and TechED EMEA, both conferences were very interesting in their own special ways.
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 goo...
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...
I had an interesting case today where an asp.net app got stuck in a true deadlock. In other words two threads were both waiting for resources that the other ...
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.
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 restarte...
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 ...
Is it a plane, is it a bird, is it a UFO?
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 ...
I came back from a long vacation today and I’ve finally caught up with enough emails to do something useful with my day.
I found a set of really nice, short videos by Arturo Toledo on the Silverlight blog that I thought were worth sharing.
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 w...
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 t...
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...
I have put together a quick and dirty debug diag script for troubleshooting .net memory leaks.
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.
I recently got an email with the following question:
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...
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().
After installing .NET 3.5 SP1 you may get Validation of viewstate MAC failed exceptions when doing post backs on ASP.NET pages
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. thin...
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...
I was working on some Silverlight samples and needed an image that could flip over.
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 ...
This lab series is not really in-line with my normal debugging posts, but I just created a simple Traffic Jam game in Silverlight and thought I’d make it int...
I get several emails every week through the blog asking for help on various issues. Unfortunately due to time constraints I can’t really look at them all on...
I was looking at a memory dump recently for an issue where the process would grow to over 1 GB and return OutOfMemory Exceptions.
Earlier this week I got an email from a reader who had a hang in an application and sent in some Debug Diag logs.
If you live in Sweden and haven’t signed up for TechDays 2009 yet, go ahead and check it out. There are a lot of good speakers scheduled for the conference.
In my last post I wrote about a WCF hang I caused because of a newbie mistake. I also wrote that I would post about how to create a simple WCF service. This ...
I know it is a little late, but Happy New Year to all of you. My holiday break was great, and I wish I would have had some more time to blog, but instead I g...
My TechEd presentation Common Issues in ASP.NET and how to debug them with Windbg is now up on channel 9, so if you want to watch it, here you go
There’s been close to 25 000 downloads of the buggy bits lab set, YAY!!! :) but now I think it’s time to expand it a bit with some new labs.
… and here are the slides for the interactive session
I still have to figure out a way to host the video from the break-out session but until then, here are the slides for my presentations.
I’m back from TechEd in Barcelona, and it was one of the most fun, scary and humbling roller coaster rides I have ever been on.
You learn something new every day…
Mike Stall just wrote a very interesting post about ICoreDebug announcements at the PDC. More specifically that ICoreDbg for 4.0 will support dump debugging ...
Rico Mariani (Chief Architect of Visual Studio – previously performance architect for .net), Vance Morrison (Performance architect for .net) and Mark Friedma...
TechEd EMEA Developers is just around 2 weeks away now and the pre-conference nervousness is starting to get to me :) This will be my first time at TechEd (e...
I hope you will join me for TechEd in Barcelona on the 10th-14th of November.
Following my post about how to troubleshoot a low CPU performance issue with VSTS Test, I will now do the same for lab 4 where we have high CPU in GC.
I’ve been wanting to dig into the Test features in Visual Studio Team System for a while to “debug” issues during the test phase. In my previous post I linke...
John Robbins beat me to the punch and wrote an excellent post about using .cmdtree in windbg to ease some .net debugging pain in windbg.
Here are of some of the reader emails I got this week and my answers to them…
I was helping a colleague out with an OOM (OutOfMemory) situation he was dealing with.
I have probably mentioned this before, but I think it is worth mentioning again because of the frequency of this issue.
From time to time we get issues with high memory and performance issues due to massive viewstate. I have talked about it before here, but I thought I’d show ...
When you have to pass an object back and forth between processes or application domains you have to serialize it into some type of stream that can be underst...
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 exec...
Earlier this week I was doing a presentation and since the company I presented for had mostly win forms developers I wanted to convert all my ASP.NET debuggi...
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 ...
I got an email with some questions around application domains, application pools and unhandled exceptions from a developer that was frequently seeing his web...
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 wi...
Today I got a question from a reader (Chris) about a memory leak they are seeing in their application
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 ab...
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.
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 ...
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 goin...
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.
I recently received a question from a reader who wanted to know how to set breakpoints in code for applications that crash on startup.
ASP.NET Memory: Thou shalt not store UI objects in cache or session scope Surprisingly the issue I wrote about in the event handlers that made the memory bal...
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 ...
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 t...
Issues caused by frequent application restarts are pretty common. If you are interested in what causes application restarts in general, and how you can monit...
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…
When you use authenticode signed assemblies in an application, the application needs to go out and check the certificate revocation lists (CRLs) to verify th...
Today I came across a really good article for bloggers, Scott Hanselmans post on Blog Interesting - 32 Ways to Keep Your Blog from Sucking
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, performa...
I have written a few posts about StackOverflowExceptions, here, here, here and here. The one I am going to talk about today is one of those unfortunate cases...
This question that I got from a reader is something that I get asked pretty frequently
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...
I got a question the other day around calling GC.Collect and GC.WaitForPendingFinalizers.
From time to time I get questions about how to change settings in windbg like this one…
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 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 is...
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...
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 ...
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 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 ...
We have reached the end of the .NET Debugging Labs series. And we are going to end it with a walkthrough of the last memory leak lab.
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 ...
One of my readers emailed me the following question
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 ...
When you use very complex row filters or expressions on datasets or data tables you may end up getting a StackoverflowException.
If you use mixed mode dlls (assemblies with .net and c++ code) you need to take care to not have any .net entry points so that you don’t end up with a GC/Loa...
This is the last debugging lab in the .NET Debugging Labs series. By now you should have the basics down for troubleshooting hangs, perf issues, memory leaks...
Since it took me so long to get Lab 6 out the door i’ll post the review right away… After this we only have one memory leak lab to go before you have gone th...
It’s been about a week since I posted the debugging challenge for this lab, things have been a bit busy lately so sorry about the tardiness on posting the l...
Here is the debugging challenge for lab 6, this one is really tricky.
One of the synchronization methods in .NET is the ResetEvent. It comes in two flavors, the AutoResetEvent which resets itself immediately after it is set, an...
Since I already posted a challenge for this lab earlier, I didn’t want to wait too long with publishing the walkthrough
Last week I published a debugging challenge for Lab 5. It was really interesting to see the results and I have to say I was really happy to see the excellen...
ScottGu has outdone himself again with a demo series First Look at Silverlight 2 and First Look at using Expression Blend with Silverlight 2.
We’re about halfway through with the labs so to change it up a little bit I’m going to give you a debugging challenge.
I was working through the High CPU Lab Walkthrough which is basically caused by high CPU in GC. To understand what happens you need to know what a generation...
Hope you have had a chance to go through the high CPU lab… Some people already commented with the solution in the lab instructions but here are my answers an...
I got this question today (through the blog) and normally I don’t really answer questions sent to me directly through the blog for a couple of reasons alread...
So we finished the first round of performance issues, crashes and memory leaks.
It’s that time of year again… on the 9th of April I will be presenting at ExpertZone Developer Summit 2008 in Sweden.
This is the walkthrough of Lab 3 in the Buggy Bits series
I was helping a colleague with an interesting case yesterday concerning a memory leak in IE when using win forms user controls.
TGIF, almost time for the weekend, but before you leave, here is lab 3.
It’s been a long time since I posted anything in the bag of chips category but man, this book really made me laugh :) Why read stories to your kids about Cin...
In December I blogged about a little tool that I wrote to analyze hangs in dumps, and i showed the following output, but didn’t really get into the details o...
It was nice to see that so many people downloaded the demo site already and checked out the lab instructions for the first lab.
Earlier this week I published the first .NET Debugging Lab. If you haven’t tried it out yet, here are the instructions.
This is the first in a series of about 10 labs on .NET debugging. The lab will use a site called BuggyBits, and as the name suggests the bits are extremely b...
.NET Debugging Labs
I often get questions like How do I learn .net debugging? What books should I read? Where can I find more information?
I have talked about blocked finalizers before and this issue is a special case of blocked finalizers where we are not really finalizing a .NET object but rat...
Update 2021: This is a re-post of a post from Johan Straarup - I am posting it here as his blog has been decommissioned
After making some changes to their domains one of my customers noticed that their ASP.NET 2.0 applications didn’t respond anymore. HTML pages and images were...
As you already know, i spend my days analyzing dumps for customers, and more often than not I don’t have access to the customers code.
Lately, no matter where you turn there are linq presentations and Silverlight demos. A couple of years back the hot new stuff was web services and XML.
In my constant effort to make my job obsolete, I have created an “add-in” for windbg that automatically checks for hang conditions in a .NET memory dump.
Update 2021: This is a re-post of a post from Johan Straarup - I am posting it here as his blog has been decommissioned
I’m back from Oredev which turned out to be a really cool conference.
This has been a busy month for blogging for me, I’m up to a whopping 8 posts this month including this one which is the most I have written in any given mont...
If you were to compare the taste of the oranges in the fruit basket at work to the taste of the apples you bought on your way home and realize that they tast...
Time for a commercial break,
A few days ago I got an interesting case with a customer who intermittently kept getting a download box with Safari and a similar one telling him that he has...
Sometimes you hear and accept advice but you don’t really know the details behind it. That has always been the case with me and high CPU situations caused by...
Normally I write about issues that only manifest themselves in production environment, issues that you can’t really reproduce in a controlled dev environment...
Nov 13th-15th I will be presenting at Oredev in Malmö, Sweden. Oredev is a tech conference and this year it looks really promising considering all the big na...
In my last post I wrote a script to dump out all the ASP.NET requests on the heap. Since one of the most common memory issues I encounter is too much cache o...
When you debug asp.net applications it is often useful to find out which requests are currently executing, how long they have been executing, what the query ...
Having debugging as a profession, you might have thought that I would have done a lot of kernel debugging, but since I deal mostly with ASP.NET and .NET deve...
This is a bit of a continuation of ASP.NET Memory Issue: High memory usage in a 64bit w3wp.exe process so if you haven’t checked it out you might want to jus...
Recently we have been getting quite a few similar hangs in ASP.NET. From the first look they really aren’t all that similar but when we get down to the nitty...
By default when you run IIS on a 64-bit machine you will still be running a 32-bit w3wp.exe, so apart from a few differences, like being able to use 4 GB vir...
Last week I was helping a colleague of mine with a ViewState case that turned out to be pretty interesting…
This year the Swedish Microsoft Office won the “Best place to work” award from the Great Place to Work institute for the second year in a row.
I see post-mortem debugging as:
I know most of you probably don’t know Swedish, but for those of you who do, here is a link to a podcast where Dag König is interviewing me about .NET issues...
It was really exciting to see that so many people answered the .NET GC PopQuiz, especially seeing that so many had great answers. Perhaps the questions were ...
Time for a little pop-quiz/potential interview questions to get some action going in the comments section…
I often get questions like “what is this thread doing?”. A lot of the time it is about threads that are essential to the process but completely unrelated to ...
One of my colleagues asked me to look at a memory dump for a customer and I thought that was I found was fairly interesting so here is the story.
I thought I’d share a support story with you from a very interesting case I have. My customer is running a pretty busy ASP.NET application on an 8-way box. A...
A short commercial break… I’ll be talking about debugging ASP.NET issues at Developer Summit 2007 in Stockholm on May 23rd.
I’m sorry I haven’t had a chance to write much lately because of a lot of different reasons. I moved houses and at the same time I started writing some manag...
I was Tagged by David Salgado so here are 5 things you probably don’t know about me…
December has been a very busy month, so I am sorry that I haven’t had time to write anything…
In August I wrote about how you could cause a nasty high memory situation by using CacheItemRemovedCallbacks improperly, today I got a case where improper us...
I get enough issues relating to bad perf caused by large views tate that I felt like it is time to dedicate some blog space to it, so here is a typical probl...
I have talked about a number of different hang/performance issues in my posts. This post is a generic debugging walk through for hangs. It applies to all t...
I have talked in earlier posts about how to log and debug .net exceptions with WinDBG.
Courtesy of Ring some of my blog posts are now available in Chinese. Thank you much Ring for taking the time to translate…
It’s been a while again. Lots of prepping for the debugging workshops and a bit of re-modeling done to the house but now it’s time to write again…
I know this might be a select group, but if you have a Premier contract with Microsoft, and you live in northern Europe, and you are interested in learning ....
My favorite author Simon Singh is a wiz at analogies. In his book The big bang he explains concepts like the doppler effect and the theory of relativity usin...
A few days ago I posted a question I had gotten on email
Yesterday I received an email from a blog reader about caching and memory leaks…
Last night I got a question from one of the readers of the blog that went like this:
Rather than spending a lot of time on explaining the details of the garbage collector, I’ll refer you to Maoni’s blog for some very interesting reading, but ...
I have written earlier about how to track down exceptions using configuration scripts for adplus.
For a long time all my case studies have been on 1.1. it’s time to venture out in 2.0 land and look at what may seem like a 2.0 specific issue.
Ensure that the debug="false" on the <compilation> element in the web.config file of each and every ASP.NET application on the server. The default d...
In ASP.NET 1.1, do not deploy strong named assemblies to the BIN directory (i.e. if they are strong named make sure you DO put them in the GAC).
Wherever possible strong name and install to the global assembly cache (GAC) any assemblies that are used by more than one ASP.NET application. This will ...
Recently my colleague Doug wrote a nice post on Nine tips for a healthy “in production” ASP.NET application.
This time I figured I’d talk about an issue that spans all three debugging scenarios, hangs, memory issues and crashes… yummy :)
Hi All,
This issue has been pretty frequent since .net came out, and I am bringing it up for two reasons.
I hate to give away the resolution in the title of the blog since it takes away a lot of the suspense :) but I can’t figure out a better way to name the blog...
If someone asked me, what is the nastiest types of issues you get? I would say managed heap corruption, closely followed by native heap corruption.
I’ve written quite a few posts on memory issues because that is the type of problem we get most frequently in support, but I thought I’d break it up a little...
A while back I got interested in the new .net/CLR features in SQL Server 2005 such as .net stored procedures, functions, triggers etc.
I got a comment on one of the posts asking this question and I started writing a comment-answer but it turned into a long-winded rant so I decided to blog it...
In ASP.NET 1.1 as you probably know, there are 3 different locations to store session objects.
I have been receiving a lot of email lately asking for help on particular issues.
This is a completely off topic post but I added the “–and a bag of chips” to the blog description to allow myself to write these:)
I was writing a post on debugging a high memory usage problem caused by storing too much in session scope, but I realized I got in to tangent discussions all...
It always feels like issues come in clusters. One week we get tones of cache related cases, next week everyone is stuck in some lock and so on. Lately I have...
Not sure if anyone is reading this blog, but if you are and there is something specific you want me to blog about please let me know.
Yes, you read it right… it’s not only a debugger, for only $19.95 extra, we’ll throw in a free calculator and chat client:) and you can even run applications...
Windbg.exe and its friends can be installed from here
The situation here is that the server at times slows down considerably, or even hangs completely. Requests start timing out and no new requests seem to be ge...
When looking at a dump, a lot of the art of debugging (I like to call it an art because it makes me feel more important:)) is knowing what you can ignore so ...
Symbols can contain information about global variables, local variables, function names, parameters, structures and source line numbers.
If you get tired of starting the debugger, loading your dump, setting up your sympath, loading your extensions, etc. etc. here is a nifty way of getting “Deb...
This may seem like a preposterous statement, but unfortunately it’s all too common.
So you got a 1000 w3wp.exe stopped unexpectedly in the event viewer or your process just exited in some weird undefined way and you don’t know why.
The most powerful command when debugging a managed memory leak is by far !dumpheap. It will show you all the objects on the managed heaps and using the diffe...
Not that it matters a tremendous lot but just because it is a big pet-peeve of mine I want to differentiate between a real memory-leak and high memory usage.
To answer this question, there are a few concepts we need to discuss.
10 years ago, still in college, I started working for a company developing real-time systems for trains in Motorola HC11 assembly. Although very interesting ...