dotNet dump 分析新手:dotnet-dump 和 clrstack -all
我正在使用一个多线程应用程序,它应该定期启动一个线程,询问一些“汽车”的状态。
由于其中一个线程仍在工作(在 Process Explorer 和内存转储的“线程”部分中可见),我相信我正在处理死锁。
为了调查这一点,我下载了 dotnet-dump
并在命令行中启动了以下命令:
Prompt> dotnet-dump.exe analyze "Dumpfile.DMP"
进入此 dotnet-dump
会话后,我尝试启动 clrstack -all
,如 此网址。
然而,这似乎不起作用:
> clrstack -all
Failed to load data access module, 0x80004002
Can not load or initialize mscordacwks.dll. The target runtime may not be initialized.
For more information see https://go.microsoft.com/fwlink/?linkid=2135652
> setsymbolserver -ms
Added Microsoft public symbol server
> clrstack -all
Failed to load data access module, 0x80004002
Can not load or initialize mscordacwks.dll. The target runtime may not be initialized.
For more information see https://go.microsoft.com/fwlink/?linkid=2135652
我已遵循该网页中的建议,但没有成功。
最重要的是,我的电脑上有不同的“mscordacwks.dll”文件。我怎么知道该选择哪一个?
或者更好的是,是否有更简单的方法来调查 dotNet 内存转储以进行死锁分析?
编辑:供您理解:我在 Visual Studio 中打开了应用程序,但根据以前的经验,我知道“Windbg”等工具具有诸如 !locks
之类的命令,可以使用用于(死)锁分析。在搜索如何调查 .Net 中的(死)锁时,我偶然发现了 dotnet-dump
工具。
I am working with a multi-threaded application, which should reguarly be launching a thread, asking about the status of some "cars".
As one of the threads is still working (visible in Process Explorer and in the "Threads" part of the memory dump), I believe I'm dealing here with a deadlock.
In order to investigate this, I have downloaded dotnet-dump
and I launched the following command in commandline:
Prompt> dotnet-dump.exe analyze "Dumpfile.DMP"
Once inside this dotnet-dump
session, I have tried launching clrstack -all
, as indicated in this URL.
This, however, seems not to be working:
> clrstack -all
Failed to load data access module, 0x80004002
Can not load or initialize mscordacwks.dll. The target runtime may not be initialized.
For more information see https://go.microsoft.com/fwlink/?linkid=2135652
> setsymbolserver -ms
Added Microsoft public symbol server
> clrstack -all
Failed to load data access module, 0x80004002
Can not load or initialize mscordacwks.dll. The target runtime may not be initialized.
For more information see https://go.microsoft.com/fwlink/?linkid=2135652
I have followed the advise in that webpage but no success.
In top of this, I have different "mscordacwks.dll" files on my PC. How can I know which one to take?
Or even better, is there an easier way to investigate a dotNet memory dump for deadlock analysis?
Edit: For your understanding: I have the application open in Visual Studio, but I know from previous experience that tools like "Windbg" have commands like !locks
which can be used for (dead)lock analysis. While searching on how to investigate (dead)locks in .Net, I stumbled upon the dotnet-dump
tool.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论