为什么 WinDBG 找不到 mscordacwks.dll?
我正在尝试使用 WinDBG 分析我们一台生产计算机的故障转储。我的问题的根源似乎是我的 .NET 框架构建与生产机器不同,只是我不知道如何解决问题。当我打开 !sym 噪音然后运行 !dlk(来自 SOSEX) 时,我收到以下错误,因为它试图查找 mscordacwks dll
0:000> !dlk
CLRDLL: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll:2.0.50727.3623 f:0
doesn't match desired version 2.0.50727.3607 f:0
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscordacwks_x86_x86_2.0.50727.3607.dll/4ADD5446590000/mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscordacwks_x86_x86_2.0.50727.3607.dll/4ADD5446590000/mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
CLRDLL: Unable to find mscordacwks_x86_x86_2.0.50727.3607.dll by mscorwks search
CLRDLL: Unable to find 'mscordacwks_x86_x86_2.0.50727.3607.dll' on the path
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscorwks.dll/4ADD5446590000/mscorwks.dll not found
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
DBGHELP: C:\Program Files\Debugging Tools for Windows (x86)\mscorwks.dll - file not found
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscorwks.dll/4ADD5446590000/mscorwks.dll not found
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
CLRDLL: Unable to find mscorwks.dll by search
CLRDLL: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.3607.dll, Win32 error 0n2
Unable to initialize .NET data interface. Version 2.0.50727.3607 of mscordacwks.dll is required.
Locate and load the correct version of mscordacwks.dll. See documentation for the .cordll command.
我从生产计算机中获取了 mscorwks.dll、mscordawks.dll 和 sos.dll 并将它们放入C:\mysymbols.txt看起来 WinDBG 正在寻找 mscorwks dll 内的 dll。
I'm trying to use WinDBG to analyze a crash dump from one of our production machines. The root of my problem seems to be that I have a different build of the .NET framework than the production machine, only I don't know how to fix the problem. When I turn !sym noisy and then run !dlk(from SOSEX) I get the following error as it tries to find the mscordacwks dll
0:000> !dlk
CLRDLL: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll:2.0.50727.3623 f:0
doesn't match desired version 2.0.50727.3607 f:0
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscordacwks_x86_x86_2.0.50727.3607.dll/4ADD5446590000/mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscordacwks_x86_x86_2.0.50727.3607.dll/4ADD5446590000/mscordacwks_x86_x86_2.0.50727.3607.dll not found
SYMSRV: c:\mysymbols\mscordacwks_x86_x86_2.0.50727.3607.dll\4ADD5446590000\mscordacwks_x86_x86_2.0.50727.3607.dll not found
CLRDLL: Unable to find mscordacwks_x86_x86_2.0.50727.3607.dll by mscorwks search
CLRDLL: Unable to find 'mscordacwks_x86_x86_2.0.50727.3607.dll' on the path
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscorwks.dll/4ADD5446590000/mscorwks.dll not found
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
DBGHELP: C:\Program Files\Debugging Tools for Windows (x86)\mscorwks.dll - file not found
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mscorwks.dll/4ADD5446590000/mscorwks.dll not found
SYMSRV: c:\mysymbols\mscorwks.dll\4ADD5446590000\mscorwks.dll not found
CLRDLL: Unable to find mscorwks.dll by search
CLRDLL: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.3607.dll, Win32 error 0n2
Unable to initialize .NET data interface. Version 2.0.50727.3607 of mscordacwks.dll is required.
Locate and load the correct version of mscordacwks.dll. See documentation for the .cordll command.
I took the mscorwks.dll, mscordawks.dll and sos.dll from the production machine and placed them in C:\mysymbols. It looks like WinDBG is looking for a dll INSIDE the mscorwks dll.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这个非常完整的Doug Stewart 的解释在这种情况下帮助了我。
摘要:
mscordacwks_AAA_AAA_2.0.50727.xxxx.dll
(取决于您的体系结构和特定框架版本) - 例如针对特定情况的mscordacwks_x86_x86_2.0.50727.3607.dll
在问题中。windbg.exe
目录中。This very complete explanation by Doug Stewart helped me in this situation.
Summary:
mscordacwks_AAA_AAA_2.0.50727.xxxx.dll
(depending on your architecture and the specific framework version) - e.g.mscordacwks_x86_x86_2.0.50727.3607.dll
for the specific case in the question.windbg.exe
.执行这 2 个命令后,一切都正常:
After this 2 commands everything become OK:
我还发现,使用 64 位版本的 Windbg 并调试“任何 CPU”托管代码项目(其中构建设置为“首选 32 位”)将导致此错误。
I've also found that using the 64bit version of windbg and debugging a "Any CPU" managed code project where the build is set to "prefer 32 bit" will cause this error.
查看此处的文章后 http://codenasarre.wordpress.com /2011/06/22/sending-an-sos/
然后基本上尝试了我能做到的每一种移动符号的化身,我发现我能得到这个工作的唯一方法是将 mscorwks.dll、mscordacwks.dll 和 sos.dll 从生产计算机复制到 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
似乎 WinDBG 不能很好地处理同一 DLL 的多个版本。也许我做错了什么,但将 dll 直接复制到 .NET Framework 目录至少让我启动并运行。
After checking out the article here http://codenasarre.wordpress.com/2011/06/22/sending-an-sos/
And then basically trying every incarnation of moving symbols around that I could, I found that the only way I could get this working was to copy the mscorwks.dll, mscordacwks.dll and sos.dll from the production machine into C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
It seems that WinDBG doesn't do so well with multiple version of the same DLL. Maybe I did something wrong, but copying the dlls directly to the .NET Framework directory at least got me up and running.
除了 CodeFox 的答案之外,您还需要将 mscorwks.dll(或 clr.dll,如果您使用的是 .NET 4+)所在的目录放入 WinDbg 中的图像文件路径(位于“文件”菜单中)。
In addition to CodeFox's answer, you need to put the directory where the mscorwks.dll (or clr.dll if you're using .NET 4+) into the Image File Path in WinDbg (off of the File menu).