Presentation is loading. Please wait.

Presentation is loading. Please wait.

WINDBG + SOS: CANNON &SHOTGUN you should include in your toolkit.

Similar presentations


Presentation on theme: "WINDBG + SOS: CANNON &SHOTGUN you should include in your toolkit."— Presentation transcript:

1 WINDBG + SOS: CANNON &SHOTGUN you should include in your toolkit

2 Information  Windbg  Not fancy but strong  SOS  Son of strike

3 The Tools  SOS  Windbg Part of.NET Part of Debugging Tools, Download

4 We already have IDE, why Windbg  We have not IDE in Product Env  We have not source code in Product Env  Do not use windbg if you have IDE and source code

5 Debugging  Open executable (Ctrl + E)  Before CLR boot strap  Attach to process (F6) .detach and qd will leave process running  Open Crash dump (Ctrl + D)  Offline debugging

6 Dumps  Task Manager  Vista or newer  ADPlus  ProcDump

7 ADPlus  Vbs versus exe  Crash dump  adplus -crash -pn w3wp.exe -o c:\crashdump  Hang dump  adplus -hang -pn w3wp.exe -o c:\crashdump

8 Task Manager

9 Useful Commands  Inspecting CLR  !gcroot  !finzlizequeue  !eeheep  !dumpdomain  Meta and code  !name2ee  !dumpmt  !u  Inspecting data  !dumpheap  !dumpobject (!do)  !objsize  !dumparray  Inspecting threads  !threads  !syncblk  Clrstack  !runaway

10 Setting up the Windbg  srv*c:\symbols*http://msdl.microsoft.com/download /symbols .loadby sos mscorwks  3.5 and 2.0  loadby sos clr  4.0

11 Start from Dining Philosophers

12 Demo  html html

13 Conclusion  !syncblk and !clrstack are the key to dead lock

14 Crash

15 Demo  html html

16 Conclusion  !printexception (!pe) is key to detect exception  ~*e!clrstack always work but time cost

17 Scripting .foreach (name { }){

18  Q & A  Thanks


Download ppt "WINDBG + SOS: CANNON &SHOTGUN you should include in your toolkit."

Similar presentations


Ads by Google