netext icon indicating copy to clipboard operation
netext copied to clipboard

WinDbg begginers question: Unable to acquire .NET debugger interface. Error: 8027025b

Open arisjr opened this issue 4 years ago • 15 comments

I am getting the following error on WinDbg Preview 1,0,2007.0.6001:

!windex -tree Unable to acquire .NET debugger interface. Error: 8027025b c0000005 Exception in netext.windex debugger extension. PC: 5a07691c VA: 00000000 R/W: 0 Parameter: 00000000

.chain Extension DLL search Path: C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Common Files\Apple\Apple Application Support;C:\Program Files (x86)\Common Files\Apple\Mobile Device Support;C:\Program Files\Common Files\Apple\Apple Application Support;C:\Program Files\Common Files\Apple\Mobile Device Support;C:\WINDOWS\System32\OpenSSH;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Users\aristeu.agaj\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon
Extension DLL chain: netext: image 2.1.57.5000, API 1.0.0, built Mon May 18 13:26:11 2020 [path: C:\Users\aristeu.agaj\Desktop\memdump\WinDbg\x86\netext.dll] mscorwks: image 2.0.50727.9151, built Sat Mar 21 02:10:51 2020 [path: C:\Users\aristeu.agaj\Desktop\memdump\WinDbg\x86\mscorwks.dll] ELFBinComposition: image 10.0.20153.1000, API 0.0.0, [path: C:\Users\aristeu.agaj\Desktop\memdump\WinDbg\x86\winext\ELFBinComposition.dll] dbghelp: image 10.0.20153.1000, API 10.0.6, [path: C:\Users\Desktop\memdump\WinDbg\x86\dbghelp.dll] ext: image 10.0.20153.1000, API 1.0.0, [path: C:\Users\aristeu.agaj\Desktop\memdump\WinDbg\x86\winext\ext.dll] exts: image 10.0.20153.1000, API 1.0.0, [path: C:\Users\aristeu.agaj\Desktop\memdump\WinDbg\x86\WINXP\exts.dll] uext: image 10.0.20153.1000, API 1.0.0, [path: C:\Users\aristeu.agaj\Desktop\memdump\WinDbg\x86\winext\uext.dll] ntsdexts: image 10.0.20153.1000, API 1.0.0, [path: C:\Users\aristeu.agaj\Desktop\memdump\WinDbg\x86\WINXP\ntsdexts.dll]

arisjr avatar Aug 17 '20 02:08 arisjr

In the debugger, what is the output of:

.cordll -u -ve -l

rodneyviana avatar Aug 25 '20 16:08 rodneyviana

Idle for a long time

rodneyviana avatar Nov 10 '20 20:11 rodneyviana

@rodneyviana I'm able to reproduce it.

0:000> !windex -tree Unable to acquire .NET debugger interface Try running .cordll -l. Error: 8027025b c0000005 Exception in C:\tools\NetExt-2.1.65.5000\x64\NetExt.dll.windex debugger extension. PC: 00007ffab3c0d76b VA: 0000000000000000 R/W: 0 Parameter: 00000000`00000000 0:000> .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\Cherkashin\AppData\Local\Dbg\EngineExtensions;C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Python38\Scripts;C:\Python38;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\Cherkashin\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\Cherkashin\AppData\Local\Microsoft\WindowsApps;C:\Users\Cherkashin\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Cherkashin.dotnet\tools;E:\Program Files\JetBrains\JetBrains Rider 2020.3.3\bin;C:\Program Files (x86)\GitHub CLI;C:\Users\Cherkashin.dotnet\tools;C:\Users\Cherkashin\AppData\Local\Microsoft\WindowsApps;C:\Users\Cherkashin\AppData\Roaming\npm;C:\Program Files\heroku\bin Extension DLL chain: 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] C:\tools\NetExt-2.1.65.5000\x64\NetExt.dll: image 2.1.65.5000, API 1.0.0, built Tue Aug 17 23:31:23 2021 [path: C:\tools\NetExt-2.1.65.5000\x64\NetExt.dll] sos: image 6.0.257301+27172ce4d05e8a3b0ffdefd65f073d40a1b1fe54, API 2.0.0, built Wed Nov 24 01:21:39 2021 [path: C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2205.18001.0_x64__8wekyb3d8bbwe\amd64\winext\sos\sos.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]

0:000> !wdo 0000016533A8FAD0 Unable to acquire .NET debugger interface Try running .cordll -l. Error: 8027025b

acherkashin avatar May 25 '22 13:05 acherkashin

@acherkashin

Please help me understand the problem better:

Are you able to get heap information from sos (like '!dumpheap -stat')? What's the result of NetExt's '!wver' ? What do you get from '.cordll -ve -u -l' ?

rodneyviana avatar May 25 '22 14:05 rodneyviana

Are you able to get heap information from sos (like '!dumpheap -stat')?

yes

What's the result of NetExt's '!wver' ?

0:000> !wve No export wve found

What do you get from '.cordll -ve -u -l' ?

0:000> .cordll -ve -u -l CLR DLL status: No load attempts

acherkashin avatar May 25 '22 15:05 acherkashin

You used "!wve" instead of "!wver" The response to '.cordll -ve -u -l' suggests that there is no .NET runtime available in the image. So, if you are debugging .NET core, most times the process where the code run in not w3wp.exe but an external process. If you have problem with '!wver', check 'lmv m core*' and 'lm v m clr'

rodneyviana avatar May 25 '22 16:05 rodneyviana

Hi Rodney, I am seeing the same behavior and another wrinkle:

  • If I try with a trace that does not have CLR DLL loaded, then I get the same error as mentioned above which makes sense:

    0:000> .cordll -u -ve -l CLRDLL: No CLR image loaded (i.e. mscorwks.dll) CLR DLL status: No load attempts

    0:000> !wver CLRDLL: No CLR image loaded (i.e. mscorwks.dll) Unable to acquire .NET debugger interface Try running .cordll -l. Error: 8027025b

  • You're saying that is expected correct?

  • But for some traces where I do have CLR DLL loaded, I am getting an exception that crashes windbgx:

0:000> .cordll -u -ve -l CLRDLL: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll:4.8.9032.00 f:8 doesn't match desired version 4.8.4430.00 f:8 WARNING: Unable to register for CLR module notifications CLRDLL: Loaded DLL d:\symbols\mscordacwks_AMD64_AMD64_4.8.4430.00.dll\61270E85ac1000\mscordacwks_AMD64_AMD64_4.8.4430.00.dll Automatically loaded SOS Extension CLR DLL status: Loaded DLL d:\symbols\mscordacwks_AMD64_AMD64_4.8.4430.00.dll\61270E85ac1000\mscordacwks_AMD64_AMD64_4.8.4430.00.dll

0:000> !wver Runtime(s) Found: 1 0: Filename: mscordacwks_Amd64_Amd64_4.8.4430.00.dll +--> .NET 4.8.4430.0

NetExt (this extension) Version: 2.1.65.5000

0:000> !windex Starting indexing at 10:20:45 AM c00000fd Exception in netext.windex debugger extension. PC: 00007ffad932f485 VA: 000000a928585fc8 R/W: 1 Parameter: 00000000`00000000

Treamendous avatar May 25 '22 17:05 Treamendous

I suspect this might be expected as well if there's no managed heap in the trace etc. ?

(I mean, not the crash, but an exception if there's nothing to load)

Treamendous avatar May 25 '22 17:05 Treamendous

@rodneyviana

0:000> !wver

Unable to acquire .NET debugger interface Try running .cordll -l. Error: 8027025b

0:000> .cordll -ve -u -l

CLR DLL status: No load attempts

0:000> lmv m core*

Browse full module list start end module name 00007ff9d2670000 00007ff9d2b6c000 coreclr (private pdb symbols) C:\ProgramData\Dbg\sym\coreclr.pdb\AA11B6311143444AA0A8DBD4EDF363A71\coreclr.pdb Loaded symbol image file: coreclr.dll Image path: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.3\coreclr.dll Image name: coreclr.dll Browse all global symbols functions data Timestamp: Thu Feb 24 03:01:06 2022 (6216CAC2) CheckSum: 004EA1E5 ImageSize: 004FC000 File version: 6.0.322.12309 Product version: 6.0.322.12309 File flags: 0 (Mask 3F) File OS: 4 Unknown Win32 File type: 0.0 Unknown File date: 00000000.00000000 Translations: 0409.04b0 Information from resource tables: CompanyName: Microsoft Corporation ProductName: Microsoft® .NET InternalName: CoreCLR.dll OriginalFilename: CoreCLR.dll ProductVersion: 6,0,322,12309 @Commit: c24d9a9c91c5d04b7b4de71f1a9f33ac35e09663 FileVersion: 6,0,322,12309 @Commit: c24d9a9c91c5d04b7b4de71f1a9f33ac35e09663 FileDescription: Microsoft .NET Runtime LegalCopyright: © Microsoft Corporation. All rights reserved. Comments: Flavor=Retail

acherkashin avatar May 25 '22 18:05 acherkashin

@rodneyviana Sorry for bothering you, but could you guide me what should I do to get it working?

acherkashin avatar May 26 '22 12:05 acherkashin

If .cordll is not loading the DAC DLL it means the heap is in an unstable state or not initialized. Are you sure sos core is working? What do you get when you run sos' eeheap?

!eeheap

rodneyviana avatar May 26 '22 15:05 rodneyviana

I suspect this might be expected as well if there's no managed heap in the trace etc. ?

(I mean, not the crash, but an exception if there's nothing to load)

You are correct. It seems to be the case. If sos doesn’t work, NetExt will not work either as they use the same DAC API

rodneyviana avatar May 26 '22 21:05 rodneyviana

I get the following results when run !eeheap

image

Regular commands work fine, e.g. !dumpheap -stat, !do 00007ff976e22660, but commands specific to the extension do not work, e.g. !wdo 00007ff976e22660

acherkashin avatar May 27 '22 15:05 acherkashin

I get the following results when run !eeheap

image

Regular commands work fine, e.g. !dumpheap -stat, !do 00007ff976e22660, but commands specific to the extension do not work, e.g. !wdo 00007ff976e22660

I would need to analyze the dump to see what’s happening.

rodneyviana avatar May 27 '22 16:05 rodneyviana

I guess the problem is not in the dump, I have dump that I could analyze previously and currently it doesn't work for some reason.

acherkashin avatar Jun 14 '22 15:06 acherkashin