当我没有安装该 FF 版本时,如何使用 WinDBG 调试 NET 4.6.2 Full Framework .dbg 文件?

How to use WinDBG to debug a NET 4.6.2 Full Framework .dbg file when I don't have that FF version installed?

提问人:Pure.Krome 提问时间:11/14/2023 最后编辑:halferPure.Krome 更新时间:11/23/2023 访问量:38

问:

我希望调试 .NET FF 4.6.2 应用程序的 .dbg 转储文件。在我的机器上,我只安装了 .NET 4.8。

当我尝试调试此转储文件时,我收到错误,我假设这些错误与 .NET 不匹配版本有关?

Loading Dump File [C:\Users\justi\Downloads\pd1sdwk0001AT_w3wp_8948_20231114-002621.dmp]
User Mini Dump File with Full Memory: Only application data is available

Comment: '
*** "C:\Program Files (x86)\SiteExtensions\DaaS\3.9.23829.01\bin\DiagnosticTools\procdump.exe"  -accepteula -r -dc "InvokedViaDaasApi" -ma 8948 C:\local\Temp\Logs\231114_0025579998\pd1sdwk0001AT\pd1sdwk0001AT_w3wp_8948_20231114-002621.dmp
*** Manual dump
*** via Process Snapshot'

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
Windows 10 Version 14393 UP Free x64
Product: Server, suite: TerminalServer DataCenter SingleUserTS
Edition build lab: 10.0.14393.5125 (rs1_release.220429-1732)
Debug session time: Tue Nov 14 11:26:25.000 2023 (UTC + 11:00)
System Uptime: 1 days 8:38:34.044
Process Uptime: 0 days 1:07:44.000
................................................................
................................................................
................................................................
............................................
Loading unloaded module list
..........
For analysis of this file, run !analyze -v
*** WARNING: Unable to verify checksum for w3wp.exe
ntdll!NtWaitForSingleObject+0x14:
00007ffe`78265d14 c3              ret
0:000> .load sos
0:000> !DumpHeap -type System.String -min 500000
         Address               MT     Size
Object <exec cmd="!ListNearObj /d 00000214993d0968">00000214993d0968</exec> has an invalid method table.
0:000> !DumpHeap -type System.String -min 50000
         Address               MT     Size
Object <exec cmd="!ListNearObj /d 00000214993d0968">00000214993d0968</exec> has an invalid method table.
0:000> .chain
Extension DLL search Path:
    C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\WINXP;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\winext;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\winext\arcade;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\pri;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64;C:\Users\justi\AppData\Local\Dbg\EngineExtensions;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.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\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)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\Users\justi\AppData\Local\Microsoft\WindowsApps;C:\Users\justi\.dotnet\tools;C:\Users\justi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\justi\AppData\Local\Programs\Azure Data Studio\bin;C:\Users\justi\AppData\Local\Programs\oh-my-posh\bin;C:\Users\justi\AppData\Local\Programs\Fiddler;C:\Users\justi\.dotnet\tools
Extension DLL chain:
    DbgEngCoreDMExt: image 10.0.25921.1001, API 0.0.0, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\winext\DbgEngCoreDMExt.dll]
    C:\ProgramData\Dbg\sym\SOS_AMD64_AMD64_4.8.4645.00.dll\648F6F63b34000\SOS_AMD64_AMD64_4.8.4645.00.dll: image 4.8.4645.0, API 1.0.0, built Mon Jun 19 06:47:35 2023
        [path: C:\ProgramData\Dbg\sym\SOS_AMD64_AMD64_4.8.4645.00.dll\648F6F63b34000\SOS_AMD64_AMD64_4.8.4645.00.dll]
    CLRComposition: image 10.0.25921.1001, API 0.0.0, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\winext\CLRComposition.dll]
    MachOBinComposition: image 10.0.25921.1001, API 0.0.0, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\winext\MachOBinComposition.dll]
    ELFBinComposition: image 10.0.25921.1001, API 0.0.0, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\winext\ELFBinComposition.dll]
    dbghelp: image 10.0.25921.1001, API 10.0.6, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\dbghelp.dll]
    exts: image 10.0.25921.1001, API 1.0.0, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\WINXP\exts.dll]
    uext: image 10.0.25921.1001, API 1.0.0, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\winext\uext.dll]
    ntsdexts: image 10.0.25921.1001, API 1.0.0, 
        [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2308.2002.0_x64__8wekyb3d8bbwe\amd64\WINXP\ntsdexts.dll]

dump 文件来自 Azure 应用服务 -> 诊断问题 -> 获取内存转储。

我也尝试了这个命令:

0:000> .cordll -ve -u -l
CLRDLL: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll:4.8.9181.00 f:8
doesn't match desired version 4.8.4645.00 f:8
CLRDLL: Loaded DLL C:\ProgramData\Dbg\sym\mscordacwks_AMD64_AMD64_4.8.4645.00.dll\648F6F63b34000\mscordacwks_AMD64_AMD64_4.8.4645.00.dll
Automatically loaded SOS Extension
CLR DLL status: Loaded DLL C:\ProgramData\Dbg\sym\mscordacwks_AMD64_AMD64_4.8.4645.00.dll\648F6F63b34000\mscordacwks_AMD64_AMD64_4.8.4645.00.dll

我怎样才能在这里继续?我猜:

  • 我需要获取正确的SOS文件??从哪里来?
  • 告诉windbg加载该特定版本?

这是我的:C:\ProgramData\Dbg\sym

enter image description here

C# 调试 Windbg

评论

0赞 Lex Li 11/14/2023
不幸的是,你不能。唯一的方法是从原始计算机中获取更多文件,halfblood.pro/how-to-prepare-your-windbg-magic-box-43b5e9ad8a03
0赞 Pure.Krome 11/16/2023
史诗般的悲伤 😭
0赞 Dai 11/23/2023
Azure 应用服务都在 .NET 4.8(或 4.8.1)上 - 而不是 4.6.1 - 并且你发布的 WinDbg 输出不包含与 CLR 或 BCL 版本相关的任何错误消息 - 所以...?
0赞 Pure.Krome 11/23/2023
对不起@Dai - 我不明白你的评论?鉴于转储文件,我正在尝试“解析”它,但它似乎无法正常工作,我正在寻找帮助以试图弄清楚断开连接是什么。我并不是说 Azure A.S. 是 4.6.1。我只是想提供尽可能多的信息来帮助解释我做了什么,我是如何到达那里的,现在我被困住了。
0赞 Dai 11/23/2023
从命令中删除标志 - 因为这会指示 WinDbg 卸载 CLR 调试器,而 is 加载它 - 因此这是一个矛盾的命令。-u.cordll -ve -u -l-l

答: 暂无答案