EDN Admin
Well-known member
In this episode of Defrag Tools , Andrew Richards, Chad Beeder and Larry Larsen continue looking at the Debugging Tools for Windows (in particular WinDbg ). WinDbg is a debugger that supports user mode debugging of a process, or kernel mode debugging of a computer. This installment goes over the commands used to diagnose a Critical Section hang in a user mode application. We start with an overview of the four synchronization primitives and then delve deep in to temporary hangs, orphaned Critical Sections and deadlocks. We use these commands: ~*k ~*kv ~ ~~[TID]s !cs !cs <pointer> !locks Make sure you watch http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-Building-your-USB-thumbdrive Defrag Tools Episode #1 and http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-23-Windows-8-SDK Defrag Tools Episode #23 for instructions on how to get the Debugging Tools for Windows and how to set the required environment variables for symbols and source code resolution. Resources:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684169.aspx Critical Section Objects
<span><span> Timeline:
<span><span><span><span> http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=01m00s [01:00] - Hang types - CPU Looping, Temporary Hangs and Permanent Hangs
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=02m00s [02:00] - Synchronization Objects - Event, Semaphore, Mutex, Critical Section
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=06m54s [06:54] - Critical Sections
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=11m45s [11:45] - Debugging a Hang
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=28m08s [28:08] - Debugging an Orphan
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=32m40s [32:40] - Debugging a Deadlock <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Feeds/RSS&WT.dl=0&WT.entryid=Entry:RSSView:005dd17b14f2497da30aa1490136a641
View the full article
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684169.aspx Critical Section Objects
<span><span> Timeline:
<span><span><span><span> http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=01m00s [01:00] - Hang types - CPU Looping, Temporary Hangs and Permanent Hangs
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=02m00s [02:00] - Synchronization Objects - Event, Semaphore, Mutex, Critical Section
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=06m54s [06:54] - Critical Sections
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=11m45s [11:45] - Debugging a Hang
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=28m08s [28:08] - Debugging an Orphan
http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#time=32m40s [32:40] - Debugging a Deadlock <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Feeds/RSS&WT.dl=0&WT.entryid=Entry:RSSView:005dd17b14f2497da30aa1490136a641
View the full article