TopplistanDatorerDetaljer för "If broken it is, fix it you should"

If broken it is, fix it you should

If broken it is, fix it you should
En blogg om hur man debuggar problem i ASP.NET med windbg, Bloggen behandlar problem som hängningar, minnesläckor, krasher och exceptions av olika typer.
Artiklar: 1-30, 31-60, 61-90, 91-120, 121-150

Artiklar

Kinect SDK for Windows ? Hover Button / Hover Control
2011-10-24 15:57:00
This is part of what will be a series of posts on Kinect SDK demos and howtos, go here to see the whole list. In this post I will talk about how you can create a simple and versatile Hover Button / Hover Control for Kinect with a Metro look.  The control is largely based on the Kinect Buttons from Shai Raiten, so all cred goes to him, this is just a customization of his work. Hover button UI The HoverButton control can have either an image or text or both and can be resized to fit your needs. It features a Click event that will occurr after a hovering for 2 seconds. Below are two examples of how you could use the HoverButton control… In the first example I have used 10 HoverButtons to create a metro style UI for getting into different demos and I have used both images and just buttons with text together so you can see the difference.  The center button is currently selected and the white overlay slowly covers the whole button… when the button is fully covere...
Kinect SDK for Windows?Extensions Methods
2011-10-24 15:57:00
This is part of what will be a series of posts on Kinect SDK demos and howtos, go here to see the whole list. Every time I create a new Kinect SDK demo I find myself doing the same setup so I created a few extensions methods that I use in my projects to make life easier. I figured I would share them here since I will be using them in my blog posts about Kinect in the future. The extension methods are SetSmoothTransform, which sets the smoothing parameters on the skeleton to stabilize the skeleton movement a bit, and the second method (GetFirstTrackedSkeleton) simply grabs the first skeleton that is tracked, so that we can use it in the SkeletonFrameReady event if we only need data about one skeleton. public static class RuntimeExtensions{ public static void SetSmoothTransform(this Runtime runtime) { runtime.SkeletonEngine.TransformSmooth = true; var parameters = new TransformSmoothParameters { Smoothing = 0.75f,...
Kinect SDK for Windows ? demos
2011-10-24 15:57:00
Lately I have been working quite a bit with the Kinect SDK for Windows, which you can install and use on your computer from our research department Geting started The only thing you need to get started is a computer running Windows, a Kinect device (must be the one with a power chord, but you can buy the power chord separately very cheep at most stores where they sell Kinect), and the Kinect SDK. Once you have everything installed I suggest you go to Channel9 and watch the QuickStarts  to familiarize yourself with the basics and finally move over to the Channel9 Kinect blog to get inspiration and look at all the cool projects people are making. This series In this series I will post a number of different controls, extensions and demo apps that I have created.  Some are based on inspiration from the Kinect blog and other sources. The list of demos/howtos here will hopefully grow over time 1. RuntimeExtension methods for common stuff 2. Creating a Kinect Hover Button / Hover...
Entering geek territory or exiting geek territory? That?s the question?
2011-10-24 15:57:00
  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? In fact, I decided not only to have a look but take a long long jump to the other end of the software spectrum, miles away from ?My ASP.NET app hangs? to the world of ?This new stuff that will be released in 2014 is soooo cool I?m gonna die?, and believe me, it?s a scary leap For the next two months I?ll be working in a team at Microsoft called DPE (Developer Evangelism), looking at what?s next in Web, Phone, Kinect, HTML5, you name it, still doing what I love most though, which is making people excited about technology and talking about what I learn along the way. Just to explain how far away from my ?day job? this is, I?ll share what my first assigment was?  my first task in this new role was to design a character for this site we are starting up http://www.migbi.se with all swedish content for people getting started with app and ...
Reader email: Need help troubleshooting perf/memory issues
2011-10-24 15:57:00
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 have a memory issue, how do I troubleshoot it?” and others are far far more detailed with links to dumps and everything:) I love getting emails, but since I have a day job too (troubleshooting such issues:)) I unfortunately have to ignore most such requests through the blog:( to have time to help the customers that contact me through the normal support channels, and therefore I would recommend that if you do have a pressing issue, that you create a support case on http://support.microsoft.com/ to make sure that you get a dedicated support engineer and that your issue gets the attention it deserves. Having said all that, I wanted to point out one email I got today, both because I could see that the person writing it had put some effort into try troubleshooting the issue before contacting me, and because I ...
Fix for RestartWWWService=false in Visual Studio 2010
2011-10-24 15:57:00
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 and should only be installed on development machines if you experience this problem.  Have a good one, Tess
Debug Diag 1.2 (Beta)
2011-10-24 15:57:00
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 1 of Debug Diag has been released and is ready for use.  The main new stuff in Beta 1 is that it now supports the aforementioned Windows 7 and 2008, and if you need it right now, you can send an email to dbgdiag (at) microsoft.com, or if you have a case open, you can ask the support engineer you are working with to send it to you. It has a 32-bit and a 64-bit version (for 1.2, install the 64bit version on 64bit OSes and 32bit version on 32bit OSes, independently of the bitness of t...
Do you know ISA/Forefront and want to work in the cube next to mine (Sweden
2011-10-24 15:57:00
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 - rolfhe(at)microsoft.com. /Tess
Capturing memory dumps for 32-bit processes on an x64 machine
2011-10-24 15:57:00
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 task manager to see what architecture your process is using. Processes with *32 are 32-bit and the rest are 64-bit so in the example above we can see that for example w3wp.exe is executing 32-bit code. Why is it important to capture them with the right tools? If you capture a dump with a tool that captures 64-bit dumps you will still get a memory dump, but you will get a memory dump of the syswow64 which means that a lot of extensions like sos and psscor2 won’t be able to read the d...
Help! !clrstack is not showing any method names
2011-10-24 15:57:00
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 and how to resolve it.  You can read the whole article here: http://jonathan.dickinsons.co.za/blog/2010/08/windbg-stack-fix/ Thanks Jonathan for writing that article. Solution: As mentioned in the article there are a couple of things you need to get rid of the problem. 1. The correct version of MSCORDACWKS.dll You can get this in two ways… a. from the Microsoft public symbol server by setting the symbol path to srv*c:mycache*http://msdl.microsoft.com/download/symbols or b. by copyin...
Getting full user mode dumps automatically when your process crashes
2011-10-24 15:57:00
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 (WER) will let you do just that.  It even worked on my Win 7 machine. http://msdn.microsoft.com/en-us/library/bb787181(VS.85).aspx The documentation here says that “Applications that do their own custom crash reporting, including .NET applications, are not supported by this feature”.  It’s a bit hard to tell what this actually means but I think this is added here due to ambiguity about what constitutes a crash.  For example if you have an exception...
The SQL Server Support Team in Stockholm is hiring
2011-10-24 15:57:00
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
.NET Memory Leak: XslCompiledTransform and ?leaked? dynamic assemblies
2011-10-24 15:57:00
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 you create new XmlSerializer objects until eventually you end up with a System.OutOfMemoryException. In the case of the XmlSerializer dynamic assemblies, they are quite easy to spot as you can look at meta-data (see previous posts) and figure out that they are XmlSerializer generated assemblies, and you can even see what type is being serialized. This time I?m going to walk through a similar issue where unfortunately the dynamic assembly generator is a bit more difficult to spot. Symptoms:...
New Visual Studio 2010 and .NET 4 debugging content
2011-10-24 15:57:00
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 Visual Studio Profiler Team Blog has a lot of posts worth reading about profiling in VS 2010, including Silverlight Profiling and guidance for profiling. Steve released a new version of SOSex.dll with features that work for both 2.0 and 4.0 John Robbins released 3 new really good webcasts (unfortunately the encoding is a bit poor but the content makes up for it) on channel 9 about Advanced .NET Debugging in VSTS 2010 There is probably plenty more out there but that should at...
Debugging a classic ReaderWriterLock deadlock with SOSex.dll
2011-10-24 15:57:00
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 code snippets since it is not relevant for the post. 0:071> !clrstack OS Thread Id: 0x21ac (71) ESP       EIP     1c8ceb88 7c8285ec [HelperMethodFrame_1OBJ: 1c8ceb88] System.Threading.ReaderWriterLock.AcquireReaderLockInternal(Int32) 1c8cebe4 1c880d72 DataStore.get_SomeItem() ... So they were sitting in DataStore.get_SomeItem, waiting to acquire a ReaderLock for some resource.  A ReaderWriterLock is used to synchronize ...
IIS and PAE
2011-10-24 15:57:00
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 for and why they got the OOMs, in this case, memory usage was relatively high per application (intentionally), but it remained stable so no leak.  With this in mind, we discussed solutions to the OOMs like splitting up the applications further etc. to avoid this.  Now their question was: Is IIS 6 PAE aware, i.e. will we be using the full 20 GB of RAM or only 4 GB? I didn?t really know much about this so I consulted with one of our IIS escalation engineers Andreas to get the scoop. The ans...
New debugger extension for .NET (PSSCOR2)
2011-10-24 15:57:00
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 and Jon Langdon in the CLR team, it is finally released publicly, YAY!!! You can download it here and Tom promised to write some posts about the new commands so you might want to follow that? I will likely do the same later on as well? Just to name two of the commands in there that I use a lot: !dae  (Dumps out all the exceptions on the .net heaps with callstacks) !aspxpages  (Dumps out all the asp.net pages that are currently executing or have been executing recently, ...
Videos of developer sessions at Oredev (including mine on .net debugging)
2011-10-24 15:57:00
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
Tool for generating DGML graphs showing why your object can?t be collected
2011-10-24 15:57:00
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 is called VGCRoot and you can get the extension, and some instructions and demos for it here. The VGCRoot extensions If you are looking at a memory dump in windbg and try to figure out why your object is still sticking around, collection after collection, you can use the sos extension to run a command called !GCRoot which will give you a textual representation of how your object is rooted.  In other words, it will give you several ?stacks? linking your object all the way u...
New commands in SOS for .NET 4.0 Part 1
2011-10-24 15:57:00
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 full path .load C:WindowsMicrosoft.NETFrameworkv4.0.30128sos.dll You can also use the short hand .loadby method but since the name of the core dll has changed in 4.0, you will no longer load it using .loadby sos mscorwks, instead you can now load it using .loadby sos clr SOS now takes advantage of windbg?s DML feature making it easier to debug DML stands for Debugger Markup Language and allows commands to emit hyper links in the command output.  For ex...
It?s time for TechDays Sweden again?
2011-10-24 15:57:00
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 issues that occur in environments where you don?t have Visual Studio, concentrating on WinDbg/Debug Diag and other tools that lend themselves well for production environment debugging. Hope to see you there, Tess  
System.Configuration.ConfigurationErrosException ?Unrecognized element ?set
2011-10-24 15:57:00
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:MyAppinDebugMyApp.exe.config line 11)  at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)    at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)    at System.Configuration.Base...
MSDN Radio (Swedish) - Tess Corner
2011-10-24 15:57:00
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/MSDN-Radio-11-Jan--Tess-Corner/ I talk about debugging .NET apps with IntelliTrace in Visual Studio.NET 2010. Check out the other MSDN episodes on http://channel9.msdn.com/tags/MSDN+Radio/ (also in Swedish) and if you listen to the show and want to hear about something special, feel free to post me a comment. Have a good one  Tess
Debugging Native memory leaks with Debug Diag 1.1
2011-10-24 15:57:00
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 memory usage / leak is mostly .net memory or native memory 2. If it is native memory that is ?leaking?, use a tool like debug diag 1.1. to track allocations and deallocations 3. Look at the main allocators and the stacks associated with the biggest chunks of allocations to determine who is making the allocations and why the memory is not released. 1. Find out if your memory usage / leak is mostly .net memory or native memory There are various ways to find out if your mem...
High CPU in .NET app using a static Generic.Dictionary
2011-10-24 15:57:00
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 for us to review and when running the sos.dll command ~* e !clrstack (in windbg) to see what all the threads were doing we found that they were all stuck in callstacks similar to this one: OS Thread Id: 0x27dc (124) ESP       EIP     2f77ed24 795b3c5c System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.__Canon, mscorlib]].FindEntry(Int32) 2f77ed3c 795b3835 System.Collections.Generic.Dictionary`2[[System.Int...
New debugger extension for .NET (PSSCOR2)
2010-03-30 16:31:00
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 and Jon Langdon in the CLR team, it is finally released publicly, YAY!!! You can download it here and Tom promised to write some posts about the new commands so you might want to follow that? I will likely do the same later on as well? Just to name two of the commands in there that I use a lot: !dae  (Dumps out all the exceptions on the .net heaps with callstacks) !aspxpages  (Dumps out all the asp.net pages that are currently executing or have been executing recently, ...
Videos of developer sessions at Oredev (including mine on .net debugging)
2010-03-09 09:30:00
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
Tool for generating DGML graphs showing why your object can?t be collected
2010-03-03 14:57:00
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 is called VGCRoot and you can get the extension, and some instructions and demos for it here. The VGCRoot extensions If you are looking at a memory dump in windbg and try to figure out why your object is still sticking around, collection after collection, you can use the sos extension to run a command called !GCRoot which will give you a textual representation of how your object is rooted.  In other words, it will give you several ?stacks? linking your object all the way u...
New commands in SOS for .NET 4.0 Part 1
2010-03-01 16:21:00
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 full path .load C:WindowsMicrosoft.NETFrameworkv4.0.30128sos.dll You can also use the short hand .loadby method but since the name of the core dll has changed in 4.0, you will no longer load it using .loadby sos mscorwks, instead you can now load it using .loadby sos clr SOS now takes advantage of windbg?s DML feature making it easier to debug DML stands for Debugger Markup Language and allows commands to emit hyper links in the command output.  For ex...
It?s time for TechDays Sweden again?
2010-02-17 11:24:00
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 issues that occur in environments where you don?t have Visual Studio, concentrating on WinDbg/Debug Diag and other tools that lend themselves well for production environment debugging. Hope to see you there, Tess  
Mer artiklar från denna bloggen:
1-30, 31-60, 61-90, 91-120, 121-150
27719 bloggar i topplistan.
Statistiken nollställs varje vecka.


Kontakta
© FeWorks Ltd 2012 - Stöds av Web Catalog - Sökmotoroptimering av FeWorks