Windbg 线程状态笔记

发布日期:2018-02-09    浏览次数:495

  1、ntdll!ZwWaitForSingleObject

  线程被挂起,如果下面跟着是这样子:

RetAddr           : Args to Child                                                           : Call Site
00000000`7766e518 : 00000000`ffffffff 00000000`00000000 00000000`00000000 00000000`1019d8e0 : ntdll!ZwWaitForSingleObject+0xa
00000000`7766e40b : 000007fe`00000000 00000000`09e7f300 00000000`00000000 000007fe`f1a3d4e8 : ntdll!RtlpWaitOnCriticalSection+0xe8
000007fe`f140f174 : 00000000`0a0ab120 00000000`0000000a 000007fe`f1a3d4e8 00000000`0a0ab120 : ntdll!RtlEnterCriticalSection+0xd1
000007fe`f1821433 : 00000000`00000001 00000000`0a0ab120 ffffffff`fffffffe 00000000`09e7f300 : mscorwks!UnsafeEEEnterCriticalSection+0x20
000007fe`f128563b : 000007fe`f1a3d4e8 000007fe`f12a7266 000007fe`e7fafc23 00000000`09e7f300 : mscorwks!CrstBase::Enter+0x123
000007fe`f1299f5a : 00000000`00000001 00000000`09e7f300 00000000`00000001 00000000`09e7f300 : mscorwks!UnManagedPerAppDomainTPCount::DispatchWorkItem+0x1bb
000007fe`f124b3ac : 00000000`00000000 00000000`00000000 00000000`0ae0fbc0 00000000`00000000 : mscorwks!ThreadpoolMgr::WorkerThreadStart+0x1ba
00000000`7751652d : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : mscorwks!Thread::intermediateThreadProc+0x78
00000000`7764c541 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0xd
00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x1d

  那么线程是在等待进入临界区,有可能是死锁引起的。

  如果下面跟着是这个样子:

RetAddr           : Args to Child                                                           : Call Site
000007fe`fd6d10dc : 00000000`09e7e7c8 00000000`0b93384f 00000000`00000000 00000000`00000002 : ntdll!ZwWaitForSingleObject+0xa
000007fe`f128d0e0 : 00000000`ffffffff 00000000`ffffffff 00000000`00000000 00000000`00000454 : KERNELBASE!WaitForSingleObjectEx+0x79
000007fe`f128d1e3 : 00000000`00000000 00000000`09e7e760 00000000`00000000 00000000`ffffffff : mscorwks!MethodTableBuilder::MethodSignature::GetMethodAttributes+0xa8
000007fe`f13c3cc1 : 00000000`00000001 00000000`00000000 00000000`00000000 00000000`0b8f87c1 : mscorwks!CLREvent::WaitEx+0x63
000007fe`f1820de1 : 00000000`0efe4a78 00000000`00000000 00000000`1044ef60 00000000`0a1dc670 : mscorwks!SVR::GCHeap::WaitUntilGCComplete+0x31

  那说明此线程在等待GC释放,极有可能是内出了问题导致GC如此猛烈。

  如果跟的是

0:000> ~* kb
...
  83  Id: 7558.6914 Suspend: 0 Teb: 000007ff`ffe56000 Unfrozen
RetAddr           : Args to Child                                                           : Call Site
000007fe`fd6d10dc : 00000002`2f3cfe10 00000001`5faa1eb0 00000000`11606268 000007fe`fd6d64da : ntdll!ZwWaitForSingleObject+0xa
000007fe`f128d0e0 : 00000000`ffffffff 00000000`ffffffff 00000002`00000000 00000000`00000460 : KERNELBASE!WaitForSingleObjectEx+0x79
000007fe`f128d1e3 : 00000000`00000000 00000000`09e7e190 00000000`00000000 00000000`ffffffff : mscorwks!MethodTableBuilder::MethodSignature::GetMethodAttributes+0xa8
000007fe`f138e250 : 00000000`0b65c640 000007fe`f138e289 0000739d`00000004 00000000`00000001 : mscorwks!CLREvent::WaitEx+0x63
000007fe`f15a9596 : 00000000`00064000 000007fe`f129b6cb ffffffff`fffffffe 000007fe`f1286920 : mscorwks!SVR::gc_heap::wait_for_gc_done+0x80
000007fe`f17339cc : 00000000`00000007 000007fe`f129b6ef 00000001`1ff9e250 00000000`00064930 : mscorwks!SVR::GCHeap::GarbageCollectGeneration+0x206
000007fe`f13996a2 : 00000000`00000000 00000000`0b65c810 00000000`00064930 000007fe`00000007 : mscorwks!SVR::gc_heap::try_allocate_more_space+0x1ac
000007fe`f136ecef : 00000000`00000002 00000000`00000000 00000000`00000038 00000000`00000038 : mscorwks!SVR::gc_heap::allocate_more_space+0x32
000007fe`f12d7278 : 00000000`00000038 00000000`00000038 00000000`09e7e1f8 000007fe`f12d71b1 : mscorwks!SVR::gc_heap::allocate_large_object+0x5f
000007fe`f12d758e : 00000000`010b25e0 00000002`838d92c8 00000000`0006492c 00000000`0003248a : mscorwks!SVR::GCHeap::Alloc+0x198
000007fe`f17b9433 : 00000001`7f8ce378 00000000`09e7e190 00000000`0b65c9a8 00000000`09e7e190 : mscorwks!SlowAllocateString+0x7e
000007fe`f051beec : 00000000`00032489 00000000`00000000 00000000`00000000 00000000`00000002 : mscorwks!FramedAllocateString+0xd3
000007ff`00cf0313 : 00000001`5f3ecd98 00000001`1ff9e098 00000002`55400368 00000000`00000000 : mscorlib_ni+0x2ebeec
000007ff`012b0ac5 : 00000001`5f3ecd98 00000001`5f418988 00000001`ff350370 00000002`4f89cd50 : 0x7ff`00cf0313

  那么就是触发GC操作。

本文网址:https://www.wyxxw.cn/blog-detail-2-6-276.html

返回列表

非特殊说明,本文版权归原作者所有,转载请注明出处

提示:本站所有资源仅供学习与参考,请勿用于商业用途。图片来自互联网~如侵犯您的权益,请联系QQ:1067507709.

提示:转载请注明来自:http://www.cnblogs.com/kissdodog/p/3748145.html 。 转载人:momo