Share via


New debugger extension for .NET, Psscor2, released

*UPDATE* The download is now 32-bit ! 

I wanted to be the first to inform everyone that there is a major update to the debugger extension story for .NET.  Psscor2 has been released!  This is a superset of the SOS.dll that ships with the framework.

This extension has a lot of advantages over SOS if you are trying to troubleshoot problems, especially if they are caused by ASP.NET.  All of the functionality that has been talked about on this blog for the SOS that comes with the debugger is now available for .NET Framework 2.0, 3.0, and 3.5.

This one extension will troubleshoot all of those versions.

I will be getting into the new commands and talking more about this in the coming weeks.  But I wanted to let everyone know and have you all go download the extension.

The download contains a version for x86, amd64, and ia64.  Just like SOS, please be sure the debugger and psscor2 match the architecture of the process you want to troubleshoot.

This extension is being released AS IS.  So there is no support for it.  But having said that, if you have an issue or problem, please post it here on my blog and I will try to look into it.

Go download Psscor2 and give it a try.  Happy debugging!

Comments

  • Anonymous
    March 29, 2010
    Thanks for the new dll, but you might want to make it a 32bit exe to make it easier to unzip.

  • Anonymous
    March 29, 2010
    Thanks, I'll look into it.

  • Anonymous
    March 29, 2010
    Waiting for your further blogs about this.

  • Anonymous
    March 29, 2010
    Can you please pastle a couple of screenshots, I prefere to look at this debugger before downloading.

  • Anonymous
    March 29, 2010
    The comment has been removed

  • Anonymous
    March 30, 2010
    abdulrauf, This extension is the same as what has been talked about a lot on this blog.  I will go over the new commands, but most of them are the ones that you can use with the sos.dll that ships with the debugger package.

  • Anonymous
    March 30, 2010
    cms, There are lots of screenshots on this blog for using the sos.dll that ships with the debugger package.  This would look the same.

  • Anonymous
    March 30, 2010
    Jochen, It is just for !clrstack.  What other commands did you have in mind that you would want that for?

  • Anonymous
    March 30, 2010
    This is fantastic news. It's been a particularly sore point for us in the past [1] but I'm now eager to take on new issues with this in hand - thank you! [1] - http://www.onpreinit.com/2009/09/windbg-sos-dumpdatatables-aspxpages-etc.html

  • Anonymous
    March 30, 2010
    This download is not seen as a valid win32 executable on my Windows machine...am I missing something?

  • Anonymous
    March 30, 2010
    The comment has been removed

  • Anonymous
    March 30, 2010
    Thanks, guys! SOS.dll saved me more than once.

  • Anonymous
    March 31, 2010
    Any update on this? We are dying to use this (currently battling a crashing issue :)

  • Anonymous
    April 01, 2010
    Any idea when we might see a version that works on CLR/.NET 4.0?

  • Anonymous
    April 02, 2010
    The command, !dumpheap -type, in psscor2 does not seem to work.  When I run it, no objects are listed.  I know that they are in my dump file, because when I run the !dumpheap -stat command, they are listed in the output. I've tried this with a couple of different dump files and I get the same result, no objects listed. If I instead use sos on the same dump files, the !dumpheap -type command works and displays the types in my dump file. Has anyone else noticed this?

  • Anonymous
    April 05, 2010
    TSW, No update yet but you can download the exe and extract it on a 64-bit machine and then move the files over.  We hope to have a new exe very soon. Mario, we are looking into that as we speak, but no timeline as of yet.  Hopefully soon though. Tim, I am not sure exactly what command you are using but there is a slight difference with psscor2 for type.  If you want it to match a partial type, use a wildcard ().  For example,    !dumpheap -type System.St If that doesn't help, can you let me know what you are trying to see and having it fail for you?

  • Anonymous
    April 05, 2010
    Works fine in VS2008 although havent tried in WinDbg. !dumpheap -type System.String produced enough output to keep my system busy for 10 minutes!

  • Anonymous
    April 06, 2010
    Thanks for releasing this. I have a few comments if you don't mind: Good stuff:

  • Lots of new commands! Yay!
  • Additional output, e.g. !dumpheap displays generation as well
  • Thousand separators in output. Big Thanks! Problems/Questions/Requests:
  • I noticed that psscor2 has the same new commands as SOS for CLR4, e.g. ListNearObj, GCWhere, etc. but it doesn't seem to support DML as the new SOS. That would be very helpful.
  • !dumpheap -type seems to require a wild card whereas the SOS counterpart automatically does a "contains" on the supplied string.
  • !clrstack and !dumpstack aren't too happy with wow64 dumps as far as I can tell (even when using wow64exts). Brian
  • Anonymous
    April 07, 2010
    Brian, Thanks for the comments.  Glad you like the new commands.  You are correct, it doesn't support DML.  That is something that is being looked at but probably won't be included unless people really want it. For dumpheap -type, that was changed so that if you only want System.MyObject it wouldn't also return System.MyObject.ChildObjects and System.MyObjectAccessor for example.  So that you can get just what you are interested in and not extra stuff. wow64 dumps are kind of tricky to see.  Are you able to use those commands with SOS?

  • Anonymous
    April 07, 2010
    Looks like the psscor2 download link is broken.

  • Anonymous
    April 07, 2010
    Thanks for the reply. I find DML a really useful addition to the new version of SOS as it reduces copy/paste and typing a lot. As for wow64: I guess that is just a bumpy road, but I have a couple of examples where SOS seems to perform a little better than PSSCOR2 in this case. Let me know if you want the details.

  • Anonymous
    April 08, 2010
    Mahi, I just clicked on it and it worked fine for me.  Can you let me know if you have more problems?  We were updating the link yesterday so it may have had issues from time to time then.

  • Anonymous
    April 08, 2010
    Brian, Thanks, I would like the details.  Can you use the http://blogs.msdn.com/tom/contact.aspx link to send me a message with the details?

  • Anonymous
    April 08, 2010
    No DML!?! But... but... Talk about give with one hand and take with the other.

  • Anonymous
    April 11, 2010
    Piers7, DML is something we are looking at for the future.  Hopefully it will be available in a future update soon.  If more people really want DML, please let me know so I can better prioritize it along with other updates.

  • Anonymous
    April 15, 2010
    Tom, When I use !address -summary, I get the following.  Platform is win2008 SP2, 64-bit. Can repro on other dumps as well. 0:000> !address -summary Failed to map Heaps (error 80004005) --- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal Free                                    912      7ff2b892000 (   7.997 Tb)           99.96% <unclassified>                         1983        0b284d000 (   2.789 Gb)  84.02%    0.03% Stack                                  1968        014800000 ( 328.000 Mb)   9.65%    0.00% Image                                  2605        00d1a7000 ( 209.652 Mb)   6.17%    0.00% TEB                                     656        000520000 (   5.125 Mb)   0.15%    0.00% NlsTables                                 1        000023000 ( 140.000 kb)   0.00%    0.00% ActivationContextData                    22        000020000 ( 128.000 kb)   0.00%    0.00% CsrSharedMemory                           1        000006000 (  24.000 kb)   0.00%    0.00% PEB                                       1        0`00001000 (   4.000 kb)   0.00%    0.00%

  • Anonymous
    April 19, 2010
    Tom, I am also seeing "Failed to map heaps". We have a bad memory leak but when I add up all the heap data - it is far, far less than what say TaskMan shows. So far sos tools have been great but I'd like to know about this heap error message. Thanks Ted

  • Anonymous
    April 21, 2010
    Ted, Can you tell me the version of the debugger, 32 or 64 bit debugger?  And what is the OS you are running this on?  Also, are you using the public symbol server?

  • Anonymous
    April 21, 2010
    Tom, I am using 64 bit windbg 6.12.0002.633 AMD64, as well as the public symbol server.

  • Anonymous
    May 04, 2010
    Tom, I am also seing "Failed to map heaps" when using the debugger 6.12.0002.633, 32 or 64-bits. When running on Windows 2008 R2 x64, and when running on Windows 2003 SP2 x86, with the public symbol server.

  • Anonymous
    June 24, 2010
    The comment has been removed

  • Anonymous
    July 01, 2010
    The comment has been removed

  • Anonymous
    July 01, 2010
    I'll look into the failed to map heaps soon and let you know what I find out.

  • Anonymous
    July 08, 2010
    @Tim (2 Apr 2010) I had similar issues when I had both sos and psscor2 loaded. .unloadall and reloading just psscor2 fixed my issue.

  • Anonymous
    July 08, 2010
    Apparently !do lists the value of IntPtrs as decimal instead of hex as I would expect. E.g. 0:038> !do 3e5ea8cc Name: System.EventHandler MethodTable: 703b914c EEClass: 70171760 Size: 32(0x20) bytes GC Generation: 2 (C:windowsassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll) Fields:      MT    Field   Offset                 Type VT     Attr    Value Name 703d84dc  40000ff        4        System.Object  0 instance 3e5ea33c _target 703dd0ac  4000100        8 ...ection.MethodBase  0 instance 00000000 _methodBase 703db188  4000101        c        System.IntPtr  1 instance 523057820 _methodPtr       <--- **** Should be 1f2d3a9c **** 703db188  4000102       10        System.IntPtr  1 instance        0 _methodPtrAux 703d84dc  400010c       14        System.Object  0 instance 00000000 _invocationList 703db188  400010d       18        System.IntPtr  1 instance        0 _invocationCount Of course there's an easy workaround, since I can just dump the memory from the offset, but it would be better to list the value of IntPtrs as hex just as the SOS version of !do does.

  • Anonymous
    November 11, 2010
    I just got some negative numbers in analysis. What cound be the reason for this? Case 1: 0:000> !heapstat -inclUnrooted Heap            Gen0          Gen1               Gen2         LOH Heap0    1962152      4671712      173081896    2002269960   Free space:                                                                                                    Percentage Heap0     15600          454736       158980952    -1337812104          SOH: 88% LOH: 46% Unrooted objects:                                                                                        Percentage Heap0    1361032      4208384      1567272      272721352               SOH:  3% LOH:  4% Case 2: 0:034> !heapstat -inclUnrooted Heap         Gen0            Gen1             Gen2                    LOH Heap0    776360       1122064      213038328    -1009803888 Free space:                                                                                                     Percentage Heap0     5832           302352       204661864      642485352              SOH: 95% LOH: 19% Unrooted objects:                                                                                          Percentage Heap0    549800       412400             49328          35374112                 SOH:  0% LOH:  1%

  • Anonymous
    December 01, 2010
    I have been looking for a version/keeping an eye out for the CLR4. Is there still the intention of building a version comatible with CLR4?

  • Anonymous
    January 04, 2011
    Yes there is.  Hopefully it will be live on the internet in the next few weeks.  Working on it now.

  • Anonymous
    January 11, 2011
    I'm behind a corporate firewall and I can't download executables.  Can this be packaged as an msi or even a zip?

  • Anonymous
    January 12, 2011
    Yes it can.  If you download and extract the exe like at home, it contains a zip that you could then send to yourself.  Let me know if that doesn't work for you.

  • Anonymous
    March 28, 2011
    Thank you for the download. airplanesimulatorreviews.com

  • Anonymous
    April 09, 2011
    The comment has been removed

  • Anonymous
    April 11, 2011
    Vandana, The output is the total time.  It is the timestamp of the request subtracted from the current time of the process.