How do I debug aspnet_wp.exe deadlocks? 
Author Message
 How do I debug aspnet_wp.exe deadlocks?

I have a C# class that I wrote that I call from every asp.net page.
This class uses .NET's ReaderWriter class to acquire and release
locks.  I am confident that I am always releasing locks (by using
finally blocks) and do not see how I could be possibly causing a
deadlock.

However I am receiving this error message:
aspnet_wp.exe  (PID: <xxx>) was recycled because it was suspected to
be in a
deadlocked state. It did not send any responses for pending requests
in the
last 180 seconds

According to this KB article:
http://www.*-*-*.com/ ;en-us;Q321792 this
may be due to a bug with .NET prior to SP2.

*** My main question is this: The article says: "Attach a native
de{*filter*} to the Aspnet_wp.exe process, and then dump out the threads.
If any of the threads are currently processing a request, you are
experiencing a deadlock. In this case, examine the thread that is
processing a request to determine what is causing the request to stop
responding (hang)."

Can some please explain this process of debugging in more detail.
What do they mean by attaching a "native" de{*filter*}?  Can I use my
VS.NET C# de{*filter*}?  How do I "dump out the threads"?  How can I see
which thread(s) are processing a request and trace that back to a
possible cause?

Also another big question I have is how to know WHEN I am supposed to
look for this deadlock?  For example, everything within my application
seems to work just fine.  Its not until later that the "deadlock
state" error message shows up in the log.  I assume at that point
since it says it recycled the thread that it is no longer in a state
where I can see it in the de{*filter*}.  So how am I supposed to know when
to tap in with the de{*filter*}?

Thanks!

Richard



Wed, 04 May 2005 11:28:48 GMT  
 How do I debug aspnet_wp.exe deadlocks?
In VS.Net, menu:
Debug, Processes..., (brings up dialog box), choose aspnet_wp.exe, then
attach, checkbox native, click ok.  This will attach you to the process
and debug info will show in the output window.  But, I'm not sure how to
dump the threads from that method.

You can also use Spy++, which comes with VS.Net, to look at the
Aspnet_wp process properties, though, I'm no expert on what they're
doing.  They do give the wait state reason for the threads.

Chris R.


Quote:
> I have a c# class that I wrote that I call from every asp.net page.
> This class uses .NET's ReaderWriter class to acquire and release
> locks.  I am confident that I am always releasing locks (by using
> finally blocks) and do not see how I could be possibly causing a
> deadlock.

> However I am receiving this error message:
> aspnet_wp.exe  (PID: <xxx>) was recycled because it was suspected to
> be in a
> deadlocked state. It did not send any responses for pending requests
> in the
> last 180 seconds

> According to this KB article:
> http://www.*-*-*.com/ ;en-us;Q321792 this
> may be due to a bug with .NET prior to SP2.

> *** My main question is this: The article says: "Attach a native
> de{*filter*} to the Aspnet_wp.exe process, and then dump out the threads.
> If any of the threads are currently processing a request, you are
> experiencing a deadlock. In this case, examine the thread that is
> processing a request to determine what is causing the request to stop
> responding (hang)."

> Can some please explain this process of debugging in more detail.
> What do they mean by attaching a "native" de{*filter*}?  Can I use my
> VS.NET C# de{*filter*}?  How do I "dump out the threads"?  How can I see
> which thread(s) are processing a request and trace that back to a
> possible cause?

> Also another big question I have is how to know WHEN I am supposed to
> look for this deadlock?  For example, everything within my application
> seems to work just fine.  Its not until later that the "deadlock
> state" error message shows up in the log.  I assume at that point
> since it says it recycled the thread that it is no longer in a state
> where I can see it in the de{*filter*}.  So how am I supposed to know when
> to tap in with the de{*filter*}?

> Thanks!

> Richard



Thu, 05 May 2005 14:26:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. debug exe OK but release exe crashes

2. CRecordset AND Debug exe success AND Release exe failure

3. Debug a exe launched by another exe

4. Debug VC6 exe launched from VB6 exe

5. Can't find debug symbols in a debug exe

6. Debugging child process, Startup .EXE for debugging DLL

7. Doing the opposite of AxImp.exe..Possible?

8. debugging things done vis nmake

9. aspnet_wp.exe crashed after calling Win32 API with callback...

10. a.exe + b.exe = c.exe

11. redistributing cl.exe, link.exe, nmake.exe, etc.

12. cl.exe, link.exe, mscvrt.exe Madness...

 

 
Powered by phpBB® Forum Software