最近使用Windbg的時候一直在用Preview版本,感覺解析一下就能直接加載起環境來太爽了。不過最近遇到一個dump加載不起來了。
但是最近一次加載卻失敗了,嘗試了很久也不行
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.
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.
從服務器上下載下來對應的dll加載也沒有用
clr.dll
mscordacwks.dll
SOS.dll
最終發現Preview版本會自動加載很多dll 其中就有自動下載下來的SOS版本
||2:2:360> .chain
Extension DLL search Path:
C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\WINXP;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext\arcade;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\pri;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64;C:\Users\bianc\AppData\Local\Dbg\EngineExtensions;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Windows Kits\10\Debuggers\x64;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\bianc\AppData\Local\Microsoft\WindowsApps;C:\Users\bianc\.dotnet\tools
Extension DLL chain:
D:\WorkTemp\Windb\Runtime\Server\clr.dll: image 4.7.3701.0, built Thu Sep 3 03:32:39 2020
[path: D:\WorkTemp\Windb\Runtime\Server\clr.dll]
D:\WorkTemp\Windb\Runtime\Server\SOS.dll: image 4.7.3701.0, API 1.0.0, built Thu Sep 3 03:22:41 2020
[path: D:\WorkTemp\Windb\Runtime\Server\SOS.dll]
C:\mysymbols\SOS_AMD64_AMD64_4.7.3701.00.dll\5F4FF3579ec000\SOS_AMD64_AMD64_4.7.3701.00.dll: image 4.7.3701.0, API 1.0.0, built Thu Sep 3 03:22:41 2020
[path: C:\mysymbols\SOS_AMD64_AMD64_4.7.3701.00.dll\5F4FF3579ec000\SOS_AMD64_AMD64_4.7.3701.00.dll]
ext: image 10.0.25111.1000, API 1.0.0,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext\ext.dll]
CLRComposition: image 10.0.25111.1000, API 0.0.0,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext\CLRComposition.dll]
MachOBinComposition: image 10.0.25111.1000, API 0.0.0,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext\MachOBinComposition.dll]
ELFBinComposition: image 10.0.25111.1000, API 0.0.0,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext\ELFBinComposition.dll]
dbghelp: image 10.0.25111.1000, API 10.0.6,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\dbghelp.dll]
exts: image 10.0.25111.1000, API 1.0.0,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\WINXP\exts.dll]
uext: image 10.0.25111.1000, API 1.0.0,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext\uext.dll]
ntsdexts: image 10.0.25111.1000, API 1.0.0,
[path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\WINXP\ntsdexts.dll]
猜測可能是自動加載的跟我們服務器上的部分Dll不匹配。所以導致了問題,那麼換成正常版本的Windbg,然後手動依次加載從服務器上下載下來的對應版本。
0:000> .load D:\WorkTemp\Windb\Runtime\Server\SOS.dll
0:000> .load D:\WorkTemp\Windb\Runtime\Server\clr.dll
0:000> .cordll -lp D:\WorkTemp\Windb\Runtime\Server
CLR DLL status: Loaded DLL D:\WorkTemp\Windb\Runtime\Server\mscordacwks.dll
0:000> !eeversion
************* Symbol Loading Error Summary **************
Module name Error
clr The system cannot find the file specified
You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
PDB symbol for clr.dll not loaded
4.7.3701.0 free
Server mode with 8 gc heaps
SOS Version: 4.7.3701.0 retail build
果然就好了
然後看一下加載目錄
0:000> .chain
Extension DLL search Path:
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\WINXP;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\winext;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\winext\arcade;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\pri;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64;C:\Users\bianc\AppData\Local\Dbg\EngineExtensions;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Windows Kits\10\Debuggers\x64;C:\Users\bianc\AppData\Local\Microsoft\WindowsApps;C:\Users\bianc\.dotnet\tools
Extension DLL chain:
D:\WorkTemp\Windb\Runtime\Server\clr.dll: image 4.7.3701.0, built Thu Sep 3 03:32:39 2020
[path: D:\WorkTemp\Windb\Runtime\Server\clr.dll]
D:\WorkTemp\Windb\Runtime\Server\SOS.dll: image 4.7.3701.0, API 1.0.0, built Thu Sep 3 03:22:41 2020
[path: D:\WorkTemp\Windb\Runtime\Server\SOS.dll]
ELFBinComposition: image 10.0.22621.1, API 0.0.0,
[path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\winext\ELFBinComposition.dll]
dbghelp: image 10.0.22621.1, API 10.0.6,
[path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll]
exts: image 10.0.22621.1, API 1.0.0,
[path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\WINXP\exts.dll]
uext: image 10.0.22621.1, API 1.0.0,
[path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\winext\uext.dll]
ntsdexts: image 10.0.22621.1, API 1.0.0,
[path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\WINXP\ntsdexts.dll]
應該就是自動加載的那個SOS的版本跟服務器上的匹配不上導致的。