C# 如何分析WinDBG中的内核转储

C# 如何分析WinDBG中的内核转储,c#,windows-7,crash,kernel,windbg,C#,Windows 7,Crash,Kernel,Windbg,在我们基于表单的windows应用程序中,当导航到WPF屏幕选项卡之一(其他为正常屏幕)时,整个系统挂起,必须重新启动机器。当系统挂起并在WinDBG中打开转储时,我们对这个问题进行了内核转储。下面给出了我们在WinDBG中获得的给定命令和结果。我们发现出现了死锁,但无法找到确切问题的原因。请帮助我们分析结果 3: kd> !locks **** DUMP OF ALL RESOURCE OBJECTS **** KD: Scanning for held locks...........

在我们基于表单的windows应用程序中,当导航到WPF屏幕选项卡之一(其他为正常屏幕)时,整个系统挂起,必须重新启动机器。当系统挂起并在WinDBG中打开转储时,我们对这个问题进行了内核转储。下面给出了我们在WinDBG中获得的给定命令和结果。我们发现出现了死锁,但无法找到确切问题的原因。请帮助我们分析结果

3: kd> !locks
**** DUMP OF ALL RESOURCE OBJECTS ****
KD: Scanning for held locks...........................................................................................................

Resource @ 0x852878d0    Exclusively owned
    Contention Count = 46437
    NumberOfExclusiveWaiters = 34
     Threads: 8584ad48-01<*> 
     Threads Waiting On Exclusive Access:
              85387d48       857aed48       8577a4d0       8577a1e8       
              858de748       857feac8       854527d0       859b7030       
              85808d48       8583dd48       858db678       857fe7e0       
              8588a030       871103c0       87eb6d48       8645aa88       
              85a38b20       859bfb08       857a9b80       85805618       
              87ea2a90       853b8b80       85a61970       86a83520       
              8776ad48       857df970       85440030       854407f0       
              857df688       8749d030       87e25350       864c3d48       
              8645a380       86efd2e8       

KD: Scanning for held locks.

Resource @ 0x86ec5f28    Shared 3 owning threads
    Contention Count = 20
     Threads: 85f2b030-01<*> 8584ad48-01<*> 86efcd48-01<*> 

Resource @ 0x86ec5ed8    Shared 1 owning threads
    Contention Count = 273
     Threads: 85f2b030-01<*> 
KD: Scanning for held locks.

Resource @ 0x86ec5de8    Exclusively owned
    Contention Count = 53
    NumberOfSharedWaiters = 2
     Threads: 85f2b030-01<*> 8584ad48-01    86efcd48-01    
KD: Scanning for held locks....

Resource @ 0x86edfe88    Exclusively owned
    Contention Count = 5
     Threads: 86efcd48-01<*> 
KD: Scanning for held locks........................................................................................................................................................................................................................................................................
11983 total locks, 5 locks currently held


3: kd> !thread 8584ad48
THREAD 8584ad48  Cid 164c.1654  Teb: 7ffdf000 Win32Thread: fd816c28 WAIT: (WrResource) KernelMode Non-Alertable
    86f403a8  Semaphore Limit 0x7fffffff
IRP List:
    85f45008: (0006,01d8) Flags: 00060000  Mdl: 00000000
Not impersonating
DeviceMap                 b24698e8
Owning Process            856a7bd0       Image:         ICEProLauncher.exe
Attached Process          N/A            Image:         N/A
Wait Start TickCount      24324          Ticks: 2 (0:00:00:00.031)
Context Switch Count      16352             
UserTime                  00:00:11.575
KernelTime                00:00:03.900
Win32 Start Address 0x1016479e
Stack Init c6c47fd0 Current c6c47628 Base c6c48000 Limit c6c45000 Call 0
Priority 14 BasePriority 8 UnusualBoost 3 ForegroundBoost 2 IoPriority 2 PagePriority 5
ChildEBP RetAddr  Args to Child              
c6c47640 82ab0c65 8584ad48 00000000 807c8120 nt!KiSwapContext+0x26 (FPO: [Uses EBP] [0,0,4])
c6c47678 82aaf563 8584ae08 8584ad48 86f403a8 nt!KiSwapThread+0x266
c6c476a0 82aa940f 8584ad48 8584ae08 00000005 nt!KiCommitThreadWait+0x1df
c6c4771c 82ae12e5 86f403a8 0000001b 00000000 nt!KeWaitForSingleObject+0x393
c6c47774 82a7f8d4 86f403a8 00000001 8584ad48 nt!ExpWaitForResource+0x16f
c6c477b4 82acc714 86ec5de8 00000001 82acae87 nt!ExAcquireResourceSharedLite+0x22c
c6c477c8 8250dcbc 86ec5de8 8250fe3f c6c47a80 nt!ExEnterPriorityRegionAndAcquireResourceShared+0x24
WARNING: Stack unwind information not available. Following frames may be wrong.
c6c4780c 825107a3 ffb808e0 00000000 c6c47b9c win32k+0xbdcbc
c6c47a94 8252e2f0 ffb808e0 fdacedc0 00000000 win32k+0xc07a3
c6c47ac8 8252eb42 ffb808e0 fdacedc0 00000000 win32k+0xde2f0
c6c47bb0 8254ef82 ffbbd550 826694f8 ffbbd550 win32k+0xdeb42
c6c47c00 825162d2 2b010eab fd816c28 fea00618 win32k+0xfef82
c6c47c20 825162fa fea53a50 fd816c28 00000030 win32k+0xc62d2
c6c47c44 8251708c fea00618 fd816c28 00000030 win32k+0xc62fa
c6c47c60 8250b830 00000000 c6c47ce4 44a1c376 win32k+0xc708c
c6c47cb4 82503ba9 c6c47ce4 000025ff 00000000 win32k+0xbb830
c6c47d18 82a8544a 0027eeb4 00000000 00000000 win32k+0xb3ba9
c6c47d18 771e6194 0027eeb4 00000000 00000000 nt!KiFastCallEntry+0x12a (FPO: [0,3] TrapFrame @ c6c47d34)
0027eddc 00000000 00000000 00000000 00000000 0x771e6194


3: kd> !thread 85f2b030
THREAD 85f2b030  Cid 164c.1038  Teb: 7ff4c000 Win32Thread: fde81dd8 WAIT: (UserRequest) KernelMode Non-Alertable
    86f5c030  Mutant - owning thread 8584ad48
Not impersonating
DeviceMap                 b24698e8
Owning Process            856a7bd0       Image:         ICEProLauncher.exe
Attached Process          N/A            Image:         N/A
Wait Start TickCount      23777          Ticks: 549 (0:00:00:08.564)
Context Switch Count      1040             
UserTime                  00:00:00.109
KernelTime                00:00:00.530
Win32 Start Address 0x613cb684
Stack Init c363bfd0 Current c363baa0 Base c363c000 Limit c3639000 Call 0
Priority 14 BasePriority 8 UnusualBoost 4 ForegroundBoost 2 IoPriority 2 PagePriority 5
ChildEBP RetAddr  Args to Child              
c363bab8 82ab0c65 85f2b030 00000000 807c8120 nt!KiSwapContext+0x26 (FPO: [Uses EBP] [0,0,4])
c363baf0 82aaf563 85f2b0f0 85f2b030 86f5c030 nt!KiSwapThread+0x266
c363bb18 82aa940f 85f2b030 85f2b0f0 00000000 nt!KiCommitThreadWait+0x1df
c363bb90 82510c3e 86f5c030 00000006 00000000 nt!KeWaitForSingleObject+0x393
WARNING: Stack unwind information not available. Following frames may be wrong.
c363bbd0 8252dddc c363bc38 c363bbfc 8252ed0f win32k+0xc0c3e
c363bbdc 8252ed0f c363bc38 c363bc10 8252df22 win32k+0xddddc
c363bbfc 8252ebd2 500107c0 82516caf 06ebf9fc win32k+0xded0f
c363bccc 82516cde fd7cf320 ffaa18f8 ffbbd550 win32k+0xdebd2
c363bd00 82a8544a 500107c0 00000000 00000000 win32k+0xc6cde
c363bd00 771e6194 500107c0 00000000 00000000 nt!KiFastCallEntry+0x12a (FPO: [0,3] TrapFrame @ c363bd34)
06ebfa0c 00000000 00000000 00000000 00000000 0x771e6194


3: kd> !thread 86efcd48
THREAD 86efcd48  Cid 01ac.01fc  Teb: 7ffd8000 Win32Thread: ffb1a3b8 WAIT: (WrResource) KernelMode Non-Alertable
    86f403a8  Semaphore Limit 0x7fffffff
IRP List:
    868ec990: (0006,0100) Flags: 00060970  Mdl: 00000000
Not impersonating
DeviceMap                 8ce050a8
Owning Process            86ec5348       Image:         csrss.exe
Attached Process          N/A            Image:         N/A
Wait Start TickCount      24077          Ticks: 249 (0:00:00:03.884)
Context Switch Count      11243             
UserTime                  00:00:00.000
KernelTime                00:00:01.201
Win32 Start Address 0x75313146
Stack Init af886fd0 Current af8865c8 Base af887000 Limit af884000 Call 0
Priority 13 BasePriority 13 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
ChildEBP RetAddr  Args to Child              
af8865e0 82ab0c65 86efcd48 00000000 807c8120 nt!KiSwapContext+0x26 (FPO: [Uses EBP] [0,0,4])
af886618 82aaf563 86efce08 86efcd48 86f403a8 nt!KiSwapThread+0x266
af886640 82aa940f 86efcd48 86efce08 0000000e nt!KiCommitThreadWait+0x1df
af8866bc 82ae12e5 86f403a8 0000001b 00000000 nt!KeWaitForSingleObject+0x393
af886714 82ae0361 86f403a8 00000098 86ec5de8 nt!ExpWaitForResource+0x16f
af886750 825a2607 86ec5de8 00000001 ffb83050 nt!ExAcquireSharedStarveExclusive+0x18d
WARNING: Stack unwind information not available. Following frames may be wrong.
af8868f4 825a2a07 ffb808e0 000000f1 00000098 win32k+0x152607
af88694c 8249adf1 ffb808e0 000000f1 00000098 win32k+0x152a07
af886974 8249e7af ffb83008 000000f1 00000098 win32k+0x4adf1
af8869b4 8256fc98 00b83008 000000f1 00000098 win32k+0x4e7af
af8869f4 8253e849 000000f1 00000098 00000000 win32k+0x11fc98
af886a2c 8253e6ca 00000000 86467e18 af886a84 win32k+0xee849
af886a3c 82aea163 ffb22aa0 ffb22ac8 00000000 win32k+0xee6ca
af886a84 82ab0c4d 00000000 00000000 00000000 nt!KiDeliverApc+0x17f
af886ac8 82aaf563 86ef13f8 86efcd48 86efce44 nt!KiSwapThread+0x24e
af886af0 82aab82f 86efcd48 86efce08 00000000 nt!KiCommitThreadWait+0x1df
af886c68 824ef74d 00000002 865544d0 00000001 nt!KeWaitForMultipleObjects+0x535
af886cc0 82459008 00000001 865544d0 82463048 win32k+0x9f74d
af886d04 82458599 865544d0 00000001 82672ce0 win32k+0x9008
af886d18 8251e170 00000004 00cafd3c af886d34 win32k+0x8599
af886d28 82a8544a 00000004 00cafd7c 771e6194 win32k+0xce170
af886d28 771e6194 00000004 00cafd7c 771e6194 nt!KiFastCallEntry+0x12a (FPO: [0,3] TrapFrame @ af886d34)
00cafd7c 00000000 00000000 00000000 00000000 0x771e6194
3:kd>!锁
****所有资源对象的转储****
KD:扫描持有的锁。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
资源@0x852878d0专有
争用计数=46437
排他性投标人数量=34
螺纹:8584ad48-01
等待独占访问的线程:
85387d48 857aed48 8577a4d0 8577a1e8
858de748 857feac8 854527d0 859b7030
85808d48 8583dd48 858db678 857fe7e0
8588a030 871103c0 87eb6d48 8645aa88
85a38b20 859bfb08 857a9b80 85805618
87ea2a90 853B80 85a61970 86a83520
8776ad48 857df970 85440030 854407f0
857df688 8749d030 87e25350 864c3d48
8645a380 86efd2e8
KD:扫描持有的锁。
资源@0x86ec5f28共享3个拥有线程
争用计数=20
螺纹:85f2b030-01 8584ad48-01 86efcd48-01
资源@0x86ec5ed8共享1个拥有线程
争用计数=273
螺纹:85f2b030-01
KD:扫描持有的锁。
资源@0x86ec5de8独家拥有
争用计数=53
NumberOfSharedWaiters=2
螺纹:85f2b030-01 8584ad48-01 86efcd48-01
KD:扫描持有的锁。。。。
资源@0x86edfe88独家拥有
争用计数=5
螺纹:86efcd48-01
KD:锁定扫描。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
总共11983个锁,目前持有5个锁
3:kd>!螺纹8584ad48
线程8584ad48 Cid 164c.1654 Teb:7ffdf000 Win32线程:fd816c28等待:(WrResource)内核模式不可警报
86f403a8信号量限制0x7fffffff
IRP列表:
85f45008:(0006,01d8)标志:00060000 Mdl:00000000
不冒充
设备映射b24698e8
拥有进程856a7bd0映像:ICEProLauncher.exe
附加流程不适用图像:不适用
等待开始计时24324次计时:2(0:00:00:00.031)
上下文切换计数16352
用户时间00:00:11.575
内核时间00:00:03.900
Win32起始地址0x1016479e
堆栈初始化c6c47fd0当前c6c47628基c6c48000限制c6c45000调用0
Priority 14 BasePriority 8异常boost 3 Foreground Boost 2 IoPriority 2 PagePriority 5
ChildEBP将参数重新寻址到Child
c6c47640 82ab0c65 8584ad48 00000000 807c8120 nt!KiSwapContext+0x26(FPO:[使用EBP][0,0,4])
c6c47678 82aaf563 8584ae08 8584ad48 86f403a8 nt!KiSwapThread+0x266
c6c476a0 82aa940f 8584ad48 8584ae08 0000000 5 nt!KiCommitThreadWait+0x1df
c6c4771c 82ae12e5 86f403a8 000000 1B 00000000新台币!KeWaitForSingleObject+0x393
c6c47774 82a7f8d4 86f403a8 0000000 1 8584ad48 nt!ExpWaitForResource+0x16f
c6c477b4 82acc714 86ec5de8 0000000 1 82acae87 nt!ExAcquireResourceSharedLite+0x22c
c6c477c8 8250dcbc 86ec5de8 8250fe3f c6c47a80 nt!ExterpriorityRegionandAcquireResourceShared+0x24
警告:堆栈展开信息不可用。下面的框架可能是错误的。
c6c4780c 825107a3 FFB808E000000000 c6c47b9c win32k+0xbdcbc
c6c47a94 8252e2f0 ffb808e0 fdacedc0 00000000 win32k+0xc07a3
c6c47ac8 8252eb42 ffb808e0 fdacedc0 00000000 win32k+0xde2f0
C6C47BBB0 8254ef82 ffbbd550 826694f8 ffbbd550 win32k+0xdeb42
c6c47c00 825162d2 2b010eab fd816c28 fea00618 win32k+0xfef82
c6c47c20 825162fa fea53a50 fd816c28 000000 30 win32k+0xc62d2
c6c47c44 8251708c fea00618 fd816c28 000000 30 win32k+0xc62fa
c6c47c60 8250B83000000000 c6c47ce4 44a1c376 win32k+0xc708c
c6c47cb4 82503ba9 c6c47ce4 000025ff 00000000 win32k+0xbb830
c6c47d18 82a8544a 0027eeb4 00000000 00000000 win32k+0xb3ba9
c6c47d18 771e6194 0027eeb4 00000000 00000000新台币!KiFastCallEntry+0x12a(FPO:[0,3]TrapFrame@c6c47d34)
0027eddc 00000000 00000000 00000000 0x771e6194
3:kd>!螺纹85f2b030
线程85f2b030 Cid 164c.1038 Teb:7ff4c000 Win32线程:fde81dd8 WAIT:(用户请求)内核模式不可警报
86f5c030变体-拥有线程8584ad48
不冒充
设备映射b24698e8
拥有进程856a7bd0映像:ICEProLauncher.exe
附加流程不适用图像:不适用
等待开始计时23777次计时:549(0:00:00:08.564)
上下文切换计数1040
用户时间00:00:00.109
内核时间00:00:00.530
Win32起始地址0x613cb684
堆栈初始化c363bfd0当前c363baa0基本c363c000限制c3639000调用0
Priority 14 BasePriority 8异常boost 4 Foreground Boost 2 IoPriority 2 PagePriority 5
ChildEBP将参数重新寻址到Child
c363bab8 82ab0c65 85f2b030 00000000 807c8120新台币!KiSwapContext+0x26(FPO:[使用EBP][0,0,4])
c363baf0 82aaf563 85f2b0f0 85f2b030 86f5c030 nt!KiSwapThread+0x266
c363bb18 82aa940f 85f2b030 85F2B0F000000000新台币!KiCommitThreadWait+0x1df
c363bb90 82510c3e 86f5c030 0000000 6 00000000新台币!KeWaitForSingleObject+0x393
警告:堆栈展开信息不可用。下面的框架可能是错误的。
c363bbd0 8252dddc c363bc38 c363bbfc 8252ed0f win32k+0xc0c3e
c363bbdc 8252ed0f c363bc38 c363bc10 8252df22 win32k+0xDDC
c363b
8584ad48
c6c4771c 82ae12e5 86f403a8 0000001b 00000000 nt!KeWaitForSingleObject+0x393

and
86efcd48
af8866bc 82ae12e5 86f403a8 0000001b 00000000 nt!KeWaitForSingleObject+0x393