Windbg: Unable to manage managed stack

Through Adplus I attached the process (in my iis I launched the site)

C:\Program Files (x86)\Debugging Tools for Windows (x86)>ADPlus -crash -pn w3wp .exe -o C:\dumps

Below is the code for reproducing the stackoverflow exception of this website:

protected void Page_Load(object sender, EventArgs e)
{

}
public void Hello()
{
    Hello();
}

protected void Button_Test_Click(object sender, EventArgs e)
{
    Hello();
}

Dump created for me:

C:\Dumps\Crash_Mode__Date_05-04-2012__Time_21-44-2020\PID-12452__W3WP.EXE_DefaultAppPool__1st_chance_Process_Shut_Down__full_2bc0_2012-05-04_21-45-53-704_30a4

I opened this dump in windbg and ran these commands

0:000> .loadby sos clr
0:000> !clrstack

and I got the following message

Unable to walk the managed stack. The current thread is likely not a 
managed thread. You can run !threads to get a list of managed threads in
the process

Can you help me fix this? How to track error location?

+5
source share
3 answers

You can enter! pe to get an exception or ~ # s to switch to a failed stream.! clrstack should work then.

+5
source

This will return a stack trace for each thread, you can see the stack trace of the managed ones: ~*e !clrstack

+5
source

As Remus noted, the current thread is not a managed thread. ~ on windbg will give you a list of topics, and if you look closely (my bad monitor made it worse for me: P) there is. (dot) before the current thread. You need to change it to a managed thread, which you can do with .

Now I will call a debug guru to help me - how to find which thread is a managed thread? A colleague told me that, in general, thread 0 is controlled, and I was able to escape to this question: |

+2
source

All Articles