How to I resolve GetFrameContext failed in Windbg
Asked Answered
T

3

13

I'm debugging a .NET 4.0 web application using a full crash dump and Windbg. I seem able to get all the versions of everything to match up however when I try to get the managed stack trace of all the thread I get

OS Thread Id: 0x7cd4 (13) Child SP IP Call Site GetFrameContext failed: 1

For all of my managed threads. Any ideas what I'm doing wrong and how I can fix it?

Ternion answered 24/10, 2011 at 15:33 Comment(1)
Were you able to resolve this?Carnet
P
6

I was also getting this error, but I noticed that running !DumpStack does give me a trace when !ClrStack does not.

According to this link it could just be a thread that has been scheduled but is not running. In other words not necessarily a problem. I'm not sure why the clrstack command doesn't work though, possibly an sos bug?

0:037> !clrstack
OS Thread Id: 0x57cc (37)
Child SP         IP               Call Site
GetFrameContext failed: 1
0:037> !dumpstack
OS Thread Id: 0x57cc (37)
Child-SP         RetAddr          Call Site
000000000772f688 000007fefdb210dc ntdll!NtWaitForSingleObject+0xa
000000000772f690 000007fef5ca36ca KERNELBASE!WaitForSingleObjectEx+0x79
000000000772f730 000007fef5ca3a97 clr!CLRSemaphore::Wait+0xaa
000000000772f7f0 000007fef5ca3c20 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x140
000000000772f830 000007fef5cb21ff clr!ThreadpoolMgr::NewWorkerThreadStart+0x2a7
000000000772f8d0 000007fef5cb0582 clr!ThreadpoolMgr::WorkerThreadStart+0x3b
000000000772f970 00000000778d652d clr!Thread::intermediateThreadProc+0x7d
000000000772fb30 0000000077b0c521 kernel32!BaseThreadInitThunk+0xd
000000000772fb60 0000000000000000 ntdll!RtlUserThreadStart+0x1d
Pasquinade answered 31/10, 2014 at 19:59 Comment(0)
I
3

How are you trying to display the managed stack? You should be using sos or sosex (preferably sosex). Does !sosex.mk work for you?

Download sosex from here.

If you are using windbg to debug .net, you want sosex to do it.

Integrand answered 31/8, 2012 at 22:58 Comment(1)
I think I used .loadby sos clrAbeu
E
0

Have you tried installing Psscor4 WinDbg extension? Here is some very useful article on how to do that.

Elicia answered 25/8, 2014 at 8:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.