windbg调试一个CPU100%的.net进程(二)—— What is mscorlib.ni.dll

前文: windbg调试一个CPU100%的.net进程

本来以为一篇已经能终结这个问题了,但是没想到还有续写这个topic的一天,当然我也发现了新世界的大门。

这次的犯人是157C(5500)号线程。

看着这个堆栈,我只能黑人问号???

what is mscorlib_ni+0x57cff2 ???
what is 0x000007fe`8a3856ba ???
what is mscorlib_ni ???

首先先解决 what is mscorlib_ni 。google 很久发现有一篇讲到了这个。

The mscorlib_ni.dll module shown in the stack trace output of the k command is the NGEN image (“ni”) corresponding to the mscorlib.dll MSIL image. You can treat these modules just like their MSIL sources for the purpose of SOS debugging.

原来 mscorlib_ni 就是 mscorlib.ni.dll,也是 mscorlib.dll,是 Ngen 本地映象化技术加速代码执行的结果。

又通过了google,发现《Advanced .NET Debugging》书中有介绍一个叫 !IP2MD 的命令可以看到函数地址的函数信息(ipaddress2methoddesc)。

这样就有结果了。

所以万恶之源是最下面的JobEngine.Engine_Job_Thread.Process_Start()。查看代码发现这里的 while true 没有加 sleep。

看来还是看书系统性的学习调试比较靠谱(然而英文原版书好贵啊,电子书又看的头疼

 

参考资料:

How Windows Debuggers Work

《Advanced .NET Debugging》

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注