<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - Defrag Tools: #24 - WinDbg - Critical Sections</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections/RSS"></atom:link>
	<image>
		<url>http://media.ch9.ms/ch9/6a4e/36f4f1fa-0829-4996-b755-b8db6e136a4e/DefragToolsE24_220.jpg</url>
		<title>Channel 9 - Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<link></link>
	</image>
	<description>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&amp;nbsp;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 &amp;lt;pointer&amp;gt; !locks Make sure you watch Defrag Tools Episode #1 and 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:Critical Section Objects Timeline:[01:00] - Hang types - CPU Looping, Temporary Hangs and Permanent Hangs[02:00] - Synchronization Objects - Event, Semaphore, Mutex, Critical Section[06:54] - Critical Sections[11:45] - Debugging a Hang[28:08] - Debugging an Orphan[32:40] - Debugging a Deadlock </description>
	<link></link>
	<language>en</language>
	<pubDate>Wed, 19 Jun 2013 03:36:37 GMT</pubDate>
	<lastBuildDate>Wed, 19 Jun 2013 03:36:37 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[Where is the Defrag Show - when is it coming back&#63;&#63;&#63;<p>posted by edi</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634944030308643155</link>
		<pubDate>Mon, 21 Jan 2013 22:10:30 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634944030308643155</guid>
		<dc:creator>edi</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p><img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-2.gif?v=c9' alt='Big Smile' /> today I also debugged a Explorer crash causes by a wrong cs usage in the technet forums <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-2.gif?v=c9' alt='Big Smile' /></p><p><pre class="brush: text">0:033&gt; !cs -s 000000001a496f50
-----------------------------------------
Critical section   = 0x000000001a496f50 (&#43;0x1A496F50)
DebugInfo          = 0x0000000013c9bee0
LOCKED
LockCount          = 0x0
WaiterWoken        = No
OwningThread       = 0x0000000000001b04
RecursionCount     = 0x1
LockSemaphore      = 0x0
SpinCount          = 0x00000000020007d0


Stack trace for DebugInfo = 0x0000000013c9bee0:

0x000007fbd4bf0410: ntdll! ?? ::FNODOBFM::`string'&#43;0x7E91
0x000007fbcf385be5: verifier!AVrfpInitializeCriticalSectionCommon&#43;0x115
0x000000018012f76b: ComcastSecureBackupShareshell!DllUnregisterServer&#43;0x12C45B
0x0000000180002a7b: ComcastSecureBackupShareshell&#43;0x2A7B
0x000000018000302a: ComcastSecureBackupShareshell&#43;0x302A
0x00000001801a9b4b: ComcastSecureBackupShareshell!DllUnregisterServer&#43;0x1A683B
0x000007fbcf383b2e: verifier!AVrfpStandardDllEntryPointRoutine&#43;0xBE
0x000007fbd4afba0e: ntdll!LdrpCallInitRoutine&#43;0x3E
0x000007fbd4b182dc: ntdll!LdrpInitializeNode&#43;0x192
0x000007fbd4b1787f: ntdll!LdrpInitializeGraph&#43;0x6F
0x000007fbd4b19202: ntdll!LdrpPrepareModuleForExecution&#43;0x1A5
0x000007fbd4b19af2: ntdll!LdrpLoadDll&#43;0x344
0x000007fbd4b0e08b: ntdll!LdrLoadDll&#43;0xA7
0x000007fbcf383ff6: verifier!AVrfpLdrLoadDll&#43;0x76
0x000007fbd1aef653: KERNELBASE!LoadLibraryExW&#43;0xBF
0x000007fbd355296c: combase!LoadLibraryWithLogging&#43;0x2C
0x000007fbd35528c4: combase!CClassCache::CDllPathEntry::LoadDll&#43;0x70
0x000007fbd3552693: combase!CClassCache::CDllPathEntry::Create&#43;0x43
0x000007fbd35522a0: combase!CClassCache::CClassEntry::CreateDllClassEntry&#43;0x196
0x000007fbd3552238: combase!CClassCache::GetClassObjectActivator&#43;0x932
</pre></p><p>@edi</p><p>maybe Gov has no time (Windows Blue)</p><p>&nbsp;</p><p>posted by MagicAndre1981</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634944821615289295</link>
		<pubDate>Tue, 22 Jan 2013 20:09:21 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634944821615289295</guid>
		<dc:creator>MagicAndre1981</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p>Would you guys consider managed code analysis in future versions of Debug Tools. I think it provides much more value for real life scenarios for people watching show since majority of applications we deal on daily basis are managed code nowdays.</p><p>posted by gt65345</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945533411278750</link>
		<pubDate>Wed, 23 Jan 2013 15:55:41 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945533411278750</guid>
		<dc:creator>gt65345</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p>@<a href="/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945533411278750">gt65345</a>:&nbsp;If you debug managed code, you'll find&nbsp;these&nbsp;fundamentals&nbsp;being used&nbsp;by the CLR to achieve the synchronization. After the next two&nbsp;episodes on sync objects, and handles in general,&nbsp;we'll tape a managed debugging episode to show the differences, and more commonly, the similarities. I actually mentioned this in next&nbsp;week's episode, which was taped this morning.</p><p>Thanks for the feedback.</p><p>posted by windev</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945947856660900</link>
		<pubDate>Thu, 24 Jan 2013 03:26:25 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945947856660900</guid>
		<dc:creator>windev</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p>@<a href="/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634944821615289295">MagicAndre1981</a>: based on the limited evidence in the stack, it looks like ComcastSecureBackupShareshell is to blame.&nbsp;Was the CS reallocated when it was referenced?</p><p>posted by windev</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945950831006912</link>
		<pubDate>Thu, 24 Jan 2013 03:31:23 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945950831006912</guid>
		<dc:creator>windev</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p>@<a href="/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634944821615289295">MagicAndre1981</a>: based on the limited evidence in the stack, it looks like ComcastSecureBackupShareshell is to blame.&nbsp;Was the CS reallocated when it was referenced?</p><p></p></div></blockquote><p></p><p>I also think this was the cause. WinDbg tells me this as cause:</p><p></p><pre class="brush: text">APPLICATION_VERIFIER_LOCKS_EXIT_THREAD_OWNS_LOCK (200)Thread cannot own a critical section.This stop is generated if a thread (thread ID is parameter1) is terminated, suspended or is in a state (worker thread finished a work item) in which it cannot hold a critical section.</pre><p></p><p>&nbsp;</p><p>The DLL is a bit older:</p><p></p><pre class="brush: text">    Loaded symbol image file: ComcastSecureBackupShareshell.dll    Image path: C:\Program Files\SecureBackupShare\ComcastSecureBackupShareshell.dll    Image name: ComcastSecureBackupShareshell.dll    Timestamp:        Mon Nov 08 23:47:33 2010 (4CD87E05)    CheckSum:         00426F0D    ImageSize:        00450000    File version:     2.4.3.0    Product version:  2.4.0.0    File flags:       0 (Mask 3F)    File OS:          40004 NT Win32    File type:        2.0 Dll    File date:        01CCBBA5.094B4C4D    Translations:     0009.04b0    CompanyName:      Secure Backup and Share    ProductName:      Secure Backup and Share    InternalName:     x64_shell.dll    ProductVersion:   2.4.0.0    FileVersion:      2.4.3.0    FileDescription:  Secure Backup and Share Shell Extensions    LegalCopyright:   Copyright © 2010</pre><p></p><p>&nbsp;</p><p>But the user hasn't replied back if this was the fix.</p><p>&nbsp;</p><p>posted by MagicAndre1981</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946024614673276</link>
		<pubDate>Thu, 24 Jan 2013 05:34:21 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946024614673276</guid>
		<dc:creator>MagicAndre1981</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p>How come, in all these decades, MSFT haven't built a debugger that's a little easier to use? Like the ANTS tools from red-gate.</p><p>posted by LukePuplett</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946328075018585</link>
		<pubDate>Thu, 24 Jan 2013 14:00:07 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946328075018585</guid>
		<dc:creator>LukePuplett</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p>@<a href="/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634945533411278750">gt65345</a>: There's a pretty good show on .NET debugging with windbg&nbsp;<a href="http://channel9.msdn.com/Series/-NET-Debugging-Stater-Kit-for-the-Production-Environment">http://channel9.msdn.com/Series/-NET-Debugging-Stater-Kit-for-the-Production-Environment</a></p><p>Won't complain if the Defrag Tools folks cover it in more detail as well though <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p>@windev, are those crashing sample apps you have available? It might be useful to follow along and see if we get the same results (t'would confirm the debgging tools are set up properly on our boxes) and also play more with some of the scenarios you've demoed.</p><p>posted by JohnLudlow</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946338943000775</link>
		<pubDate>Thu, 24 Jan 2013 14:18:14 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946338943000775</guid>
		<dc:creator>JohnLudlow</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p>@<a href="/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946338943000775">JohnLudlow</a>: I'll ask Larry how to get them on the C9 site for download. I have no issue releasing them.&nbsp;Email me at <a href="mailto:defragtools@microsoft.com">defragtools@microsoft.com</a> and I'll send you the ZIP.</p><p>posted by windev</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946650188239276</link>
		<pubDate>Thu, 24 Jan 2013 22:56:58 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946650188239276</guid>
		<dc:creator>windev</dc:creator>
	</item>
	<item>
		<title>Re: Defrag Tools: #24 - WinDbg - Critical Sections</title>
		<description>
			<![CDATA[<p>@<a href="/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946338943000775">JohnLudlow</a>: We'll cover Managed Debugging at a high level in (near) future episode. For sure, watch the .NET Debugging <a href="http://channel9.msdn.com/Series/-NET-Debugging-Stater-Kit-for-the-Production-Environment">series</a>&nbsp;by Brad - it covers different command/techniques than what I'll go over.</p><p>posted by windev</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946652473113356</link>
		<pubDate>Thu, 24 Jan 2013 23:00:47 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-24-WinDbg-Critical-Sections#c634946652473113356</guid>
		<dc:creator>windev</dc:creator>
	</item>
</channel>
</rss>