【问题标题】:windbg.exe: Failed to load data access DLL, 0x80004005windbg.exe:加载数据访问DLL失败,0x80004005
【发布时间】:2011-09-20 12:23:09
【问题描述】:

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

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.

据我所知,mscordacwks_x86_x86_4.0.30319.237.dll 已成功加载,但我仍然收到错误消息。我错过了什么?

【问题讨论】:

  • 您是如何创建转储文件的?如果您在 64 位机器上使用默认工具,您会得到 64 位进程的转储,包括所有 WoW64 内容。
  • 我在 64-box 上使用了 process-explorer,右键单击。我假设转储 32 位进程会产生 32 位转储,即使它在 64 位机器上运行?
  • 您在加载 SOS 时是否遇到任何错误?如果您希望我发布有关如何处理 Wow64 位转储的答案或评论,请告诉我。
  • 64-box 上的 process-explorer 产生 32 位进程的 64 位转储
  • @plodoc 是的,除非您从 \Windows\SysWOW64 目录启动进程资源管理器。

标签: debugging windbg sos postmortem-debugging


【解决方案1】:

我通过使用ProcDump 获取在 64 位机器上运行的 32 位进程的 32 位转储解决了这个问题。我可以使用 32bit windbg 成功地检查它。 this blog post有更多细节。

【讨论】:

  • friism,谢谢。我的情况和你一样。我按照您的建议使用 ProcDump 创建了转储。我能够使用 32 位 Windbg 加载 sos/psscor2。但是当我发出 !clrstack 命令时,调试器会查找 mscordacwks_x86_x86_2.0.50727.4216.dll (这是我的产品服务器上的版本号)。它还尝试从 MS 符号服务器下载此 dll,但失败并显示消息“SYMSRV:msdl.microsoft.com/downloads/symbols/… 未找到”。您能否提出一些可行的建议
  • 您从生产服务器上复制相关的 dll 并将其放在 windbg 可以找到的位置 - 我想我也必须这样做。
  • 是的,这就是我最终要做的。现在可以了。无论如何感谢您的指针。干杯。
  • 这些都没有帮助我。问题是 .NET 4.5 SOS.dll 与 .NET 4.0 mscordacwks.dll 不兼容。当我尝试在安装了 4.0 运行时但没有安装 4.5 的 VM 上加载它时,它起作用了。
【解决方案2】:

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

CLR DLL status: ERROR: Unable to load DLL mscordacwks_AMD64_x86_2.0.50727.3053.dll, Win32 error 0n87

至少那是根据来自黑暗角落博客的笔记上的博客帖子 “Failed to load data access DLL, 0x80004005” – OR – What is mscordacwks.dll?

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

对我来说,总是因为我没有正确版本的 mscordacwks。也有可能windbg找不到。请参阅我对Problem debugging hang-dump in windbg 的回答,了解我用来从安全补丁中查找/提取正确版本的一种方法。为了让windbg加载它,我将windbg的图像路径设置为指向我存储它的目录。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-28
    • 2012-12-21
    • 2012-12-29
    • 2020-09-01
    • 2019-07-10
    • 2015-10-14
    相关资源
    最近更新 更多