How to I resolve GetFrameContext failed in Windbg

孤人 提交于 2019-12-18 13:01:33

问题


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?


回答1:


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



回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/7878112/how-to-i-resolve-getframecontext-failed-in-windbg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!