Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windbg: Unable to walk the managed stack

Via Adplus I attached a process (in my iis I ran a website)

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

Below is the code to reproduce stackoverflow exception of that 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 was at:

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 fixing it? How can I trace the location of error?

like image 556
Rocky Singh Avatar asked May 04 '12 16:05

Rocky Singh


1 Answers

This will return the stack trace of each thread, you'll be able to see the stack trace of the managed ones: ~*e !clrstack

like image 175
BornToCode Avatar answered Sep 29 '22 08:09

BornToCode