[问题记录.WinDbg]WinDbg 调试遇到 Failed to load data access DLL, 0x80004005
【问题】
拿到服务人员提交的dump文件,用 DebugDiag Analysis/WinDbg 分析时提示以下信息。
WinDbg报错
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 mscorwks.dll is in the version directory 3) or, if you are debugging a dump file, verify that the file mscordacwks_<arch>_<arch>_<version>.dllis 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 mscorwks.dll as well. |
DebugDiag Analysis提示
Type | Description | Recommendation |
---|---|---|
Warning | .NET runtime was loaded in the process but managed analysis was not done on this dump file because the managed debugger extension commands failed to execute with the below error CLRDLL: CLR DLL load disabled CLR Debugger Extension Load Attempt CLRDLL: Unable to find mscordacwks_x86_x86_2.0.50727.5485.dll by mscorwks search CLRDLL: Unable to find 'mscordacwks_x86_x86_2.0.50727.5485.dll' on the path CLRDLL: Unable to get version info for 'c:\symcache\mscorwks.dll\53A121FA5ae000\mscordacwks_x86_x86_2.0.50727.5485.dll', Win32 error 0n87 CLRDLL: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.5485.dll, Win32 error 0n87 CLR DLL status: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.5485.dll, Win32 error 0n87 | To fix this problem, you can copy mscordacwks.dll from the server where the dump was taken and rename it tomscordacwks_<arch>_<arch>_<version>.dll and add the path of the folder to theSymbol server path by going to Tools-> Options and Settings |
【原因】
是因为dump机器和调试环境中的mscordacwks.dll版本不一致。详细请查看《“Failed to load data access DLL, 0x80004005” – OR – What is mscordacwks.dll?》
【解决办法】
1.获取对应版本的mscordacwks.dll
>>去抓dump的机器(相同操作系统即可)拷贝。fx2.x86通常在C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll
2.将mscordacwks.dll重命名为mscordacwks_x86_x86_2.0.50727.5485.dll,然后拷贝到搜索目录(Symbol File Path, Source File Path 或 Image File Path 都可以)
>>关于“mscordacwks_AAA_AAA_2.0.50727.xxxx.dll”
>>其中 xxxx 是 .net framework 对应版本号。AAA 根据操作系统及进程运行方式是32位或64位,对应替换为“x86”或“AMD64”。
扩展:
收集部署环境信息,如:CPU、内存、.net framework版本、操作系统、操作系统补丁等途径一(建议):开始-运行,输入“msinfo32” –> [文件-导出]系统摘要
途径二:cmd -> systeminfo