WinDbg/SOS:!SyncBlk 输出的说明
我正在寻找 SOS 的 !SyncBlk 命令生成的输出的描述。
特别是我在“MonitorHeld”列中没有找到有用的解释。此列显示一系列故障转储中的高值。
示例:
0:000> !SyncBlk
Index SyncBlock MonitorHeld Recursion Owning Thread Info SyncBlock Owner
44 0000000005a5c228 1 1 000000000e7a6740 2304 273 000000019f858cd0 System.Object
48 000000000579bae8 1 1 000000000e7a72e0 2370 275 000000015f999900 System.Object
52 000000000579b9c8 1 1 0000000011bbd3b0 1e98 295 00000000ff89fe08 System.Object
54 000000000579b938 1 1 000000000e7a38c0 1be4 249 000000013f8aa888 System.Object
108 0000000005a5bfe8 1 1 000000000e79f300 224c 242 00000000ff8a5828 System.Object
110 0000000005a5c078 1 1 000000000e79ca50 2290 262 000000015f9a8020 System.Object
112 0000000005a5c108 1 1 0000000011bb70e0 1d38 236 000000015f99e408 System.Object
114 000000000579b620 1 1 0000000011bb93c0 1884 304 00000001bf974a90 System.Object
124 0000000005a44d48 1 1 000000000e7a6170 2300 272 000000019f853fe8 System.Object
146 0000000005a44688 99 1 000000000588cbf0 13e0 38 000000017f71c4f8 System.Object
155 0000000005a44f88 1 1 0000000011bba530 2274 301 000000019f82f120 System.Object
157 0000000005a45018 1 1 0000000011bbf0c0 2034 290 000000015f952980 System.Object
任何人都可以解释“MonitorHeld”列中的“99”吗?
有人可以链接到该命令的完整参考文档吗?
谢谢, 亚历克斯
I am looking of a description of the output generated by the !SyncBlk command of SOS.
Particularly I found no useful explanation on the column "MonitorHeld". This column shows high values in a series of crash dumps.
Example:
0:000> !SyncBlk
Index SyncBlock MonitorHeld Recursion Owning Thread Info SyncBlock Owner
44 0000000005a5c228 1 1 000000000e7a6740 2304 273 000000019f858cd0 System.Object
48 000000000579bae8 1 1 000000000e7a72e0 2370 275 000000015f999900 System.Object
52 000000000579b9c8 1 1 0000000011bbd3b0 1e98 295 00000000ff89fe08 System.Object
54 000000000579b938 1 1 000000000e7a38c0 1be4 249 000000013f8aa888 System.Object
108 0000000005a5bfe8 1 1 000000000e79f300 224c 242 00000000ff8a5828 System.Object
110 0000000005a5c078 1 1 000000000e79ca50 2290 262 000000015f9a8020 System.Object
112 0000000005a5c108 1 1 0000000011bb70e0 1d38 236 000000015f99e408 System.Object
114 000000000579b620 1 1 0000000011bb93c0 1884 304 00000001bf974a90 System.Object
124 0000000005a44d48 1 1 000000000e7a6170 2300 272 000000019f853fe8 System.Object
146 0000000005a44688 99 1 000000000588cbf0 13e0 38 000000017f71c4f8 System.Object
155 0000000005a44f88 1 1 0000000011bba530 2274 301 000000019f82f120 System.Object
157 0000000005a45018 1 1 0000000011bbf0c0 2034 290 000000015f952980 System.Object
Can anyone explain the "99" in column "MonitorHeld"?
Has anyone a a link to a complete reference documentation of this command?
Thanks,
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
MonitorHeld 指的是该特定 SyncBlk 拥有多少个监视器。
每次发生锁争用时,都会有 1 个所有者持有syncblk。锁上的每个等待者持有 2 个锁。99
意味着您有一个对象“拥有”该锁,还有 49 个对象在等待该锁(49x2 + 1 = 99)。
我发现的关于
!syncblk
的最佳讨论和详细解释是 这个由 Tess Ferrandez 编写。The MonitorHeld refers to how many monitors are held by that specific SyncBlk.
Each time you have contention on a lock, you'll have 1 owner held syncblk. Each waiter on a lock holds 2.
Your 99 means that you have one object "owning" the lock, and 49 objects waiting on the lock (49x2 + 1 = 99).
The best discussion and detailed explanation of
!syncblk
I've found is this one by Tess Ferrandez.除了 Reed 提到的之外,您还可以使用 SOSEX.dll 扩展的 !dlk 命令来检查死锁。
In addition to what Reed mentioned, you can use the SOSEX.dll extension's !dlk command to check for deadlocks as well.