<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx</link><description>The situation here is that the server at times slows down considerably, or even hangs completely. Requests start timing out and no new requests seem to be getting through. The scenario below is a bit simplified but it shows the technique to find owners</description><dc:language>sv-SE</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#10123598</link><pubDate>Wed, 02 Feb 2011 13:28:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10123598</guid><dc:creator>Xavier</dc:creator><description>&lt;p&gt;I have my Page.ProcessRequest hang on me (randomly), but it is not because of a code lock on something that we are doing in code. &amp;nbsp;I am doing a trace and the call to the db and returning of data takes 1 second or so. &amp;nbsp;But for some people it hangs for like 2 minutes (consistently 1:55)&lt;/p&gt;
&lt;p&gt;Do you have a tip on how I can debug this?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10123598" width="1" height="1"&gt;</description></item><item><title>re: A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#10024288</link><pubDate>Mon, 14 Jun 2010 08:30:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10024288</guid><dc:creator>Tess1</dc:creator><description>&lt;p&gt;Kevin,&lt;/p&gt;
&lt;p&gt;its a bit unusual to catch it like that but it means one of two things.&lt;/p&gt;
&lt;p&gt;1. the lock is in the middle of transitioning (i.e. someone unlocked and someone else is going to grab the lock) or...&lt;/p&gt;
&lt;p&gt;2. rather than using lock, someone is using Monitor.enter and managed to grab the lock without exiting it and the thread exited while the monitor was still held. &lt;/p&gt;
&lt;p&gt;Look at what the waiters are doing and see if there is another thread in the middle of leaving the lock &lt;/p&gt;
&lt;p&gt;/Tess&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10024288" width="1" height="1"&gt;</description></item><item><title>re: A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#10023544</link><pubDate>Fri, 11 Jun 2010 14:59:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10023544</guid><dc:creator>Kevin</dc:creator><description>&lt;p&gt;What does it mean if the owning thread is 00000000?&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;0:000&amp;gt; !syncblk&lt;/p&gt;
&lt;p&gt;Index SyncBlock MonitorHeld Recursion Owning Thread Info &amp;nbsp;SyncBlock Owner&lt;/p&gt;
&lt;p&gt; &amp;nbsp; 62 001ffa3c &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 36 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 00000000 &amp;nbsp; &amp;nbsp; none &amp;nbsp; &amp;nbsp;0bc63970 System.RuntimeType+RuntimeTypeCache+MemberInfoCache`1[[System.Reflection.RuntimeMethodInfo, mscorlib]]&lt;/p&gt;
&lt;p&gt;		Waiting threads: 22 35 36 39 44 45 46 47 50 51 52 53 54 58 59 61 62 63&lt;/p&gt;
&lt;p&gt;-----------------------------&lt;/p&gt;
&lt;p&gt;Total &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 89&lt;/p&gt;
&lt;p&gt;CCW &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/p&gt;
&lt;p&gt;RCW &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/p&gt;
&lt;p&gt;ComClassFactory 0&lt;/p&gt;
&lt;p&gt;Free &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10023544" width="1" height="1"&gt;</description></item><item><title>re: A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#9372431</link><pubDate>Fri, 23 Jan 2009 13:12:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9372431</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;Have you seen Debug Inspector at www.debuginspector.com. It works on managed and unmanaged code and resolves deadlocks where it can.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9372431" width="1" height="1"&gt;</description></item><item><title>re: A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#7634528</link><pubDate>Tue, 12 Feb 2008 10:30:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7634528</guid><dc:creator>Tess1</dc:creator><description>&lt;p&gt;Excellent Keith, &amp;nbsp;I'm very happy that it helped:)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7634528" width="1" height="1"&gt;</description></item><item><title>re: A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#7631576</link><pubDate>Tue, 12 Feb 2008 07:52:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7631576</guid><dc:creator>Keith L</dc:creator><description>&lt;p&gt;Tess, I wanted to thank you for this most excellent set of materials on debugging Deadlocks. Using the tricks you taught in these pages, I was able to debug a deadlock issue that had been plaguing my production website for months. &lt;/p&gt;
&lt;p&gt;It's a &amp;quot;slow leak&amp;quot; that took days to repro and I was finally able to trace it down to a bug in the MySql.Data.DLL that I was using to access the Database. Turns out this was a hot issue that had been plaguing many other people and websites for months:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://bugs.mysql.com/bug.php?id=29289"&gt;http://bugs.mysql.com/bug.php?id=29289&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wanted to say I would still be clueless if I hadn't learned these nifty tricks from your pages. &lt;/p&gt;
&lt;p&gt;Thanks a bundle,&lt;/p&gt;
&lt;p&gt;- Keith&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7631576" width="1" height="1"&gt;</description></item><item><title>Hang caused by GC - XML Deadlock</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#7607558</link><pubDate>Mon, 11 Feb 2008 13:42:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7607558</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;In December I blogged about a little tool that i wrote to analyze hangs in dumps , and i showed the following&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7607558" width="1" height="1"&gt;</description></item><item><title>Hang caused by GC - XML Deadlock</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#7606679</link><pubDate>Mon, 11 Feb 2008 12:54:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7606679</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;In December I blogged about a little tool that i wrote to analyze hangs in dumps , and i showed the following&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7606679" width="1" height="1"&gt;</description></item><item><title>Tracking down orphaned critical sections in ASP.NET</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#7151341</link><pubDate>Fri, 18 Jan 2008 20:57:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7151341</guid><dc:creator>ASP.NET Debugging</dc:creator><description>&lt;p&gt;Recently we have seen quite a few issues where the problem turned out to be an orphaned critical section.&amp;amp;#160;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7151341" width="1" height="1"&gt;</description></item><item><title>re: A Hang Scenario, Locks and Critical Sections</title><link>http://blogs.msdn.com/b/tess/archive/2006/01/09/a-hang-scenario-locks-and-critical-sections.aspx#5459509</link><pubDate>Mon, 15 Oct 2007 10:56:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5459509</guid><dc:creator>Tess1</dc:creator><description>&lt;p&gt;LOL:) &amp;nbsp;Thats awesome... &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5459509" width="1" height="1"&gt;</description></item></channel></rss>