【问题标题】:windbg and SciTech profiler: Failed to load data access DLL for x64 memory dumpwindbg 和 SciTech 分析器:无法为 x64 内存转储加载数据访问 DLL
【发布时间】:2013-03-27 22:15:56
【问题描述】:

我知道这个问题已经被问过很多次了,但是我已经阅读了所有的内容并且无法解决问题。

基本上,我有一个在 Azure 中作为 Web 角色运行的 IIS 7.0 x64 w3wp.exe 进程的内存转储。我有多个转储,无法在 windbg 或 SciTech .Net Memory Profiler 中加载其中任何一个。对于两者来说,问题似乎都在于找到正确的 mscordacwks.dll。

我已经从机器上获得了 x64 和 x86 mscordacwks.dll,但无法加载它们中的任何一个。

所以当我想在 windbg 中查看托管线程等时,我会遇到熟悉的错误:

0:000> !threads
The version of SOS does not match the version of CLR you are debugging.  Please
load the matching version of SOS for the version of CLR you are debugging.
CLR Version: 4.0.30319.551
SOS Version: 4.0.30319.17929
CLRDLL: Unable to get version info for 'D:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll', Win32 error 0n87
DBGHELP: C:\Program Files\Debugging Tools for Windows (x64)\sym\mscordacwks_AMD64_AMD64_4.0.30319.551.dll\4F191DB4964000\mscordacwks_AMD64_AMD64_4.0.30319.551.dll - OK
CLRDLL: Loaded DLL C:\Program Files\Debugging Tools for Windows (x64)\sym\mscordacwks_AMD64_AMD64_4.0.30319.551.dll\4F191DB4964000\mscordacwks_AMD64_AMD64_4.0.30319.551.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 or on the symbol path
            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 supported cross platform architecture as 
                the dump file. For example, an ARM dump file must be debugged
                on an X86 or an ARM machine; an AMD64 dump file must be
                debugged on an AMD64 machine.

所以我在这里看到了 2 个奇怪之处:

  1. Windows 部署在 Azure 上的 D:\ 驱动器上(这会导致问题吗?)
  2. CLR 版本:4.0.30319.551 但 SOS 版本:4.0.30319.17929

那会是17929的SOS版本吗?服务器上的 mscordacwks.dll 肯定是 551

我已经运行了所有你能想象到的命令行,但没有解决问题。

提前致谢

【问题讨论】:

    标签: .net windbg memory-profiling


    【解决方案1】:

    来自 Microsoft 的 PSSCOR4.dll 是 SOS.dll 的超集,适用于 .NET 4.5 之前的所有 .NET 4 框架版本。感谢 Steve Johnson 澄清它不适用于 .NET 4.5。

    psscor4.dll可以从here下载

    【讨论】:

      【解决方案2】:

      从技术上讲,始终要求使用与您正在调试的运行时相同的 SOS 版本。但是,您通常可以通过匹配前三个版本的位置来解决问题。不过,在这个转储中,它是 .NET 4.0,但您的 SOS 版本是 4.5。这永远不会奏效,因为底层调试 API 在 .NET 4.5 中已完全改变。因此,您需要获取正确版本的 SOS.dll。

      【讨论】:

      • +1。是的,我怀疑机器上有.NET 4.5,我怀疑这是问题所在。然而,即使在没有 4.5 的机器上,我们也无法让它工作。
      【解决方案3】:

      好的,我为同一个盒子抓取了 SOS.dll 并修复了它。所以这是没有人在帖子中的任何地方告诉你

      您需要生成转储的机器上的 SOS.dll 和 mscordacwks.dll - 而不仅仅是 mscordacwks.dll。

      【讨论】:

      • Microsoft 的 PSSCOR4.dll 是 SOS.dll 的超集,适用于所有 .NET 4 框架版本。
      • @MarcSherman 谢谢。您介意将其发布为答案而不是评论吗?我会接受它作为答案 - 我的问题已解决,但我检查过这也有效。我没有看到任何地方提到过这一点,人们需要知道这一点。
      • 此转储中的 CLR 版本是 4.0,但为了澄清一点,Psscor4 不适用于 .NET 4.5。
      • @SteveJohnson 所以对于 .NET 4.5,唯一的解决方案是使用 .NET 4.5 附带的 SOS.dll?
      • 是的,这是唯一的 MS 提供的扩展。但是,SOSEX 也适用于所有风格的 .NET 2+。
      猜你喜欢
      • 2011-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-08
      • 2011-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多