(轉)解決WinDbg調試Dump文件不一樣環境mscordacwks.dll版本問題 解決WinDbg調試Dump文件不一樣環境mscordacwks.dll版本問題

解決WinDbg調試Dump文件不一樣環境mscordacwks.dll版本問題

 

開發人員提交一個dump文件(Windows Server 2008 R2),當前調試環境Windows Server 2012,加載sos.dl執行~* e !clrstack,提示以下錯誤:html

複製代碼
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.
複製代碼

當前系統mscordacwks.dll版本和dump來源系統版本不一樣,未來源系統對應版本的mscordacwks.dll複製到對應的搜索目錄(Symbol File Path、Source File Path和Image File Path均可以),並從新加載。這個時候你會發如今Symbol File Path已經下載了對應的mscordacwks.dll運行時版本,好比:mscordacwks_AMD64_AMD64_4.0.30319.01.dll\4BA21EEB965000\mscordacwks_AMD64_AMD64_4.0.30319.01.dll。post

繼續執行~* e !clrstack,WinDbg提示以下錯誤:ui

複製代碼
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.1
SOS Version: 4.0.30319.17929
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.
複製代碼

調試機器和來源機器SOS.dll、clr.dll版本不一致,未來源機器的兩個文件複製到一個指定目錄。用.load命令加載這個版本的sos,再次執行~* e !clrstack,運行成功。以後執行sos的任何命令WinDbg都會提示以下信息(暫時忽略它):url

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.1
SOS Version: 4.0.30319.17929            
相關文章
相關標籤/搜索