博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
windbg使用
阅读量:7049 次
发布时间:2019-06-28

本文共 1207 字,大约阅读时间需要 4 分钟。

配置符号文件

SRV*D:\symbols*http://msdl.microsoft.com/download/symbols

.load c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\sos.dll

检查堆栈:
Examine the stacks

1. Examine the native callstacks

~* kb 2000

2. Examine the .net callstacks

~* e !clrstack

Q: Do you see any patterns or recognize any of the callstacks that suggests a thread is waiting for a synchronization mechanism?

Troubleshoot the hang

1. Determine the ID of the thread owning the lock
!syncblk

Q: What thread owns the lock?

Q: How many threads are waiting for the lock?

Hint: MonitorHeld = 1 for each owner and 2 for each waiter.

2. Pick one of the waiters (Hint: waiters will sit in AwareLock::Enter) and take a look at what it is doing.

~5s (move to thread 5, replace 5 with actual thread ID)

kb 2000 (examine native stack)
!clrstack (examine .net stack)

Q: In which .net function is it waiting for the lock?

3. Determine what the owning thread is doing

~5s (move to thread 5, replace 5 with actual thread ID)

kb 2000 (examine native stack)
!clrstack (examine .net stack)

Q: Why is it blocking?

4. Examine the code for .NET method owning the lock to verify your theory.

转载于:https://www.cnblogs.com/yukaizhao/archive/2012/05/16/windbg_clrstack.html

你可能感兴趣的文章
y轴数据变换利器——yaxis-transformer
查看>>
Hibernate缓存机制
查看>>
从头开始复习css之动画
查看>>
sed常见用法,删除匹配行的上2行,下3行
查看>>
【BZOJ】1415 [Noi2005]聪聪和可可 期望DP+记忆化搜索
查看>>
android 7.1 调用相机崩溃解决办法
查看>>
访问控制符
查看>>
Android studio修改字体(font)大小(size)
查看>>
------第二节-----------------第二讲----单链表的基本操作---------
查看>>
iOS 百度地图大头针使用
查看>>
1118: 零起点学算法25——求两点之间的距离
查看>>
delegate代理设计模式
查看>>
花10分钟搞懂开源框架吧 - 【NancyFx.Net】
查看>>
busybox的使用
查看>>
GridView(网格视图)+MotionEvent(触控事件)实现可以拖动排序的网格图
查看>>
jq实现全选或者全不选
查看>>
牛人博客
查看>>
linux笔记_20150825_linux有什么好处
查看>>
各种实用工具的使用 学习
查看>>
MarkLight
查看>>