Debugging windbg.exe:无法加载数据访问DLL,0x80004005

Debugging windbg.exe:无法加载数据访问DLL,0x80004005,debugging,windbg,sos,postmortem-debugging,Debugging,Windbg,Sos,Postmortem Debugging,我正在尝试调试在x64机器上运行的进程的32位进程转储。我正在x64笔记本电脑上运行x86版本的windbg。我已经遵循了这些建议,但我仍然得到了以下结论: 0:000> .cordll -ve -u -l CLR DLL status: No load attempts 0:000> !clrstack CLRDLL: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll:4.0.30319.17020 f:8

我正在尝试调试在x64机器上运行的进程的32位进程转储。我正在x64笔记本电脑上运行x86版本的windbg。我已经遵循了这些建议,但我仍然得到了以下结论:

0:000> .cordll -ve -u -l
CLR DLL status: No load attempts
0:000> !clrstack
CLRDLL: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll:4.0.30319.17020 f:8
doesn't match desired version 4.0.30319.237 f:8
CLRDLL: Loaded DLL c:\symbols\public\mscordacwks_x86_x86_4.0.30319.237.dll\4DD234A8670000\mscordacwks_x86_x86_4.0.30319.237.dll
Failed to load data access DLL, 0x80004005
Verify that 1) you have a recent build of the debugger (6.2.14 or newer)
            2) the file mscordacwks.dll that matches your version of clr.dll is 
                in the version directory
            3) or, if you are debugging a dump file, verify that the file 
                mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.
            4) you are debugging on the same architecture as the dump file.
                For example, an IA64 dump file must be debugged on an IA64
                machine.

You can also run the debugger command .cordll to control the debugger's
load of mscordacwks.dll.  .cordll -ve -u -l will do a verbose reload.
If that succeeds, the SOS command should work on retry.

If you are debugging a minidump, you need to make sure that your executable
path is pointing to clr.dll as well.
0:000>.cordell-ve-u-l
CLR DLL状态:无加载尝试
0:000> !clrstack
CLRDLL:C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll:4.0.30319.17020 f:8
与所需版本4.0.30319.237 f:8不匹配
CLRDLL:加载的DLL c:\symbols\public\mscordacwks\u x86\u x86\u 4.0.30319.237.DLL\4DD234A8670000\mscordacwks\u x86\u x86\u 4.0.30319.237.DLL
无法加载数据访问DLL,0x80004005
验证1)您是否拥有调试器的最新版本(6.2.14或更新版本)
2) 与您的clr.dll版本匹配的文件mscordacwks.dll是
在版本目录中
3) 或者,如果正在调试转储文件,请验证该文件
mscordacwks______.dll位于符号路径上。
4) 您正在与转储文件相同的体系结构上进行调试。
例如,必须在IA64上调试IA64转储文件
机器。
您还可以运行调试器命令.cordl来控制调试器的
加载mscordacwks.dll。Cordell-ve-u-l将执行详细的重新加载。
如果成功,SOS命令应在重试时工作。
如果您正在调试小型转储,则需要确保您的可执行文件
路径也指向clr.dll。

据我所知,
mscordacwks\u x86\u x86\u 4.0.30319.237.dll
已成功加载,但我仍然收到错误消息。我缺少什么?

看起来您有一个32位转储文件-否则错误看起来像

CLR DLL状态:错误:无法加载DLL mscordacwks\u AMD64\u x86\u 2.0.50727.3053.DLL,Win32错误0n87

至少这是根据一个黑暗角落博客笔记上的博文

请注意错误消息中AMD64_x86与x86_x86的混合


对我来说,这总是因为我没有正确版本的mscordacwks。也有可能windbg找不到它。请参阅我的答案,了解我用于从安全修补程序中查找/提取正确版本的一种方法。为了让windbg加载它,我将windbg的映像路径设置为指向存储它的目录

我通过使用获取64位机器上运行的32位进程的32位转储来解决此问题。我可以使用32位windbg成功地检查它。有关详细信息,请参见。

您是如何创建转储文件的?如果在64位框上使用默认工具,则会得到64位进程的转储,包括所有WoW64内容。我使用了process explorer,右键单击64位框。我假设转储一个32位进程会产生一个32位转储,即使它在64位机器上运行?加载SOS时是否有错误?如果您想让我发布关于如何处理Wow64位转储的答案或评论,请告诉我。64位框上的process-explorer会产生32位的64位转储procress@plodoc是,除非您从\Windows\SysWOW64 directory.frism、thx启动process explorer。我的处境和你的一样。我按照您的建议使用ProcDump创建了转储。我能够使用32位Windbg加载sos/psscor2。但是当我发出命令的时候!clrstack命令调试器查找mscordacwks_x86_x86_2.0.50727.4216.dll(我的prod服务器上的版本号)。它还尝试从MS symbol服务器下载此dll,但失败并显示消息“SYMSRV:not found”。你可以建议一些可能有效的方法吗?你可以从生产服务器上复制相关的dll,并将其放在windbg可以找到的地方-我想我也必须这样做。是的,这就是我最终要做的。现在可以了。无论如何,谢谢你的指点。干杯,这些都帮不了我。问题在于.NET 4.5 SOS.dll与.NET 4.0 mscordacwks.dll不兼容。当我尝试将它加载到安装了4.0运行时但没有安装4.5的VM上时,它就工作了。