<?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>My application seems to hang. What do I do? – Part 2</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx</link><description>Last time I talked about the hang scenario where your process is taking 0 CPU and the CPU is taking by other process(es) on the same machine. The next scenario is your process is taking 0 CPU and the CPU is barely used by other processes. As one of the</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: My application seems to hang. What do I do? – Part 2</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#1128608</link><pubDate>Thu, 23 Nov 2006 18:07:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1128608</guid><dc:creator>Rudi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have been reading a lot on your blog (and others), &amp;nbsp;but still there is something I cannot explain:&lt;/p&gt;
&lt;p&gt;We have an ASP.NET application that can generate reports. However, some users will request soo much data that the server will throw an OutOfMemoryException. &lt;/p&gt;
&lt;p&gt;We will fix the application so that users can not attempt to get that much data back.&lt;/p&gt;
&lt;p&gt;But I still have the question why ASP.NET does not recover from the OutOfMemoryException. Initially we get the exception and after some more failed requests we will get the Server Application Unavailable error. My understanding is that since the request has been aborted, the memory used by the request should become 'unreachable' and the Garbage Collector should be capable of reclaiming the memory. But that does not seem to happen.&lt;/p&gt;
&lt;p&gt;I have reviewed the code and none of the objects are set in Session/Application/Cache.&lt;/p&gt;
&lt;p&gt;Would you have an explanation of why the memory is not being reclaimed?&lt;/p&gt;
</description></item><item><title>New and Notable 127</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#1128625</link><pubDate>Thu, 23 Nov 2006 18:11:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1128625</guid><dc:creator>Sam Gentile</dc:creator><description>&lt;p&gt;I thought Thanksgiving morning is for adults to be sleeping in. Instead, not only are the kids up at&lt;/p&gt;
</description></item><item><title>re: My application seems to hang. What do I do? – Part 2</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#1162219</link><pubDate>Tue, 28 Nov 2006 02:50:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1162219</guid><dc:creator>maoni</dc:creator><description>&lt;p&gt;Rudi, GC will attemp a collection before it returns OOM. When the server gives you unavailable error was it still getting OOM exceptions or due to something else?&lt;/p&gt;
</description></item><item><title>re: My application seems to hang. What do I do? – Part 2</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#6867725</link><pubDate>Wed, 26 Dec 2007 10:59:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6867725</guid><dc:creator>Nick Batell</dc:creator><description>&lt;p&gt;Great post. Here is another article about the top 3 reasons &amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://www.correlsense.com/cto-blog/top-3-reasons-an-application-hangs/&amp;quot;&amp;gt;applications"&gt;http://www.correlsense.com/cto-blog/top-3-reasons-an-application-hangs/&amp;quot;&amp;gt;applications&lt;/a&gt; hang&amp;lt;/a&amp;gt; for no reason&lt;/p&gt;
</description></item><item><title>re: My application seems to hang. What do I do? – Part 2</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#8692961</link><pubDate>Sat, 05 Jul 2008 13:30:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8692961</guid><dc:creator>Ron Inbar</dc:creator><description>&lt;p&gt;Hi Maoni,&lt;/p&gt;
&lt;p&gt;My application seems to hang in the middle of GC.&lt;/p&gt;
&lt;p&gt;The stack looks like this:&lt;/p&gt;
&lt;p&gt;ntdll!NtWaitForSingleObject+0xa&lt;/p&gt;
&lt;p&gt;kernel32!WaitForSingleObjectEx+0x130&lt;/p&gt;
&lt;p&gt;mscorwks!Thread::LeaveRuntimeNoThrow+0xba&lt;/p&gt;
&lt;p&gt;mscorwks!CLREvent::WaitEx+0x57&lt;/p&gt;
&lt;p&gt;mscorwks!WKS::gc_heap::start_c_gc+0x1b&lt;/p&gt;
&lt;p&gt;mscorwks!`string'+0x56f3a&lt;/p&gt;
&lt;p&gt;mscorwks!WKS::GCHeap::GarbageCollectGeneration+0x17d&lt;/p&gt;
&lt;p&gt;mscorwks!WKS::gc_heap::try_allocate_more_space+0x2f1&lt;/p&gt;
&lt;p&gt;mscorwks!WKS::GCHeap::Alloc+0x6d&lt;/p&gt;
&lt;p&gt;mscorwks!Alloc+0x7a&lt;/p&gt;
&lt;p&gt;mscorwks!FastAllocatePrimitiveArray+0x71&lt;/p&gt;
&lt;p&gt;mscorwks!JIT_NewArr1+0x43d&lt;/p&gt;
&lt;p&gt;Base_ni!Philips.PmsCT.Base.MathLib.Vector3..ctor()+0x1c&lt;/p&gt;
&lt;p&gt;The other threads all look more or less like this:&lt;/p&gt;
&lt;p&gt;ntdll!NtWaitForSingleObject+0xa&lt;/p&gt;
&lt;p&gt;kernel32!WaitForSingleObjectEx+0x130&lt;/p&gt;
&lt;p&gt;mscorwks!Thread::LeaveRuntimeNoThrow+0xba&lt;/p&gt;
&lt;p&gt;mscorwks!CLREvent::WaitEx+0x57&lt;/p&gt;
&lt;p&gt;mscorwks!WKS::gc_heap::wait_for_gc_done+0x5b&lt;/p&gt;
&lt;p&gt;mscorwks!WKS::GCHeap::WaitUntilGCComplete+0x4b&lt;/p&gt;
&lt;p&gt;So the question is what is the GC waiting for?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Ron&lt;/p&gt;
</description></item><item><title>re: My application seems to hang. What do I do? – Part 2</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#8692987</link><pubDate>Sat, 05 Jul 2008 13:47:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8692987</guid><dc:creator>Ron Inbar</dc:creator><description>&lt;p&gt;After submitting the previous post, I found out that there is one thread that doesn't have WKS::GCHeap::WaitUntilGCComplete on its stack. &amp;nbsp;Its stack looks as follows:&lt;/p&gt;
&lt;p&gt;ntdll!ZwWaitForMultipleObjects+0xa&lt;/p&gt;
&lt;p&gt;kernel32!WaitForMultipleObjectsEx+0x1cf&lt;/p&gt;
&lt;p&gt;mscorwks!WaitForMultipleObjectsEx_SO_TOLERANT+0xc1&lt;/p&gt;
&lt;p&gt;mscorwks!Thread::DoAppropriateAptStateWait+0x41&lt;/p&gt;
&lt;p&gt;mscorwks!Thread::DoAppropriateWaitWorker+0x195&lt;/p&gt;
&lt;p&gt;mscorwks!Thread::DoAppropriateWait+0x5c&lt;/p&gt;
&lt;p&gt;mscorwks!WaitHandleNative::CorWaitOneNative+0x19f&lt;/p&gt;
&lt;p&gt;mscorlib_ni!System.Threading.WaitHandle.WaitOne(Int64, Boolean)+0x1f&lt;/p&gt;
&lt;p&gt;Could it be that the GC is waiting for this thread to suspend, thereby creating a deadlock?&lt;/p&gt;
</description></item><item><title>re: My application seems to hang. What do I do? – Part 2</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#9000150</link><pubDate>Wed, 15 Oct 2008 02:08:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000150</guid><dc:creator>maoni</dc:creator><description>&lt;p&gt;Ron, both callstacks you showed are doing normal operations. The first one is waiting for the concurrent GC thread to wake it up and the second one is detecting that a GC is in progress and the threadpool suspended the thread.&lt;/p&gt;
</description></item><item><title>New and Notable 127</title><link>http://blogs.msdn.com/maoni/archive/2006/11/14/my-application-seems-to-hang-what-do-i-do-part-2.aspx#9171141</link><pubDate>Wed, 03 Dec 2008 21:20:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9171141</guid><dc:creator>Sam Gentile's Blog</dc:creator><description>&lt;p&gt;I thought Thanksgiving morning is for adults to be sleeping in. Instead, not only are the kids up at the crack at dawn but one (the eight year old) is playing games on Vista and asking for Starbucks, while the nearly 4 year old is clamoring for princess&lt;/p&gt;
</description></item></channel></rss>