.NET 8 console issues

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
vaspian
Level 1
Level 1
Posts: 5
Joined: Thu Jun 20, 2024 10:21 am

.NET 8 console issues

Post by vaspian »

Hello,

Using wine 9.11 in a container (in fact this has been happening since wine 9.0 allowed to run smoothly .net core),

I can install without problems the sdk executable.
Many applications works without issues. I can manage to do many dotnet msbuild operations.

But simply a "wine dotnet --version" fails with the text below.
Any clues? Or is this a wine "bug"

-----------------------------------------------------------------------------------------------------------------


wine: configuration in L"/wineprefix" has been updated.
014c:fixme:process:GetProcessGroupAffinity (FFFFFFFFFFFFFFFF,00007FFFFE27EEF4,0000000000000000): stub
014c:fixme:heap:GetNumaHighestNodeNumber semi-stub: 00007FFFFE27EE90
014c:fixme:process:GetProcessGroupAffinity (FFFFFFFFFFFFFFFF,00007FFFFE27EE90,0000000000000000): stub
014c:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.6\\mscordaccore.dll", 00006FFFFC390000) stub
014c:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
014c:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00000001801C5B68, 34) stub
014c:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00000001801B9BD0, 17) stub
Unhandled exception. 014c:fixme:nls:get_dummy_preferred_ui_language (0x8 0x409 00007FFFFE27BF70 0000000000000000 00007FFFFE27BF68) returning a dummy value (current locale)
014c:fixme:nls:get_dummy_preferred_ui_language (0x8 0x409 00007FFFFE27BF70 00007FFFFE27BEC0 00007FFFFE27BF68) returning a dummy value (current locale)
System.IO.IOException: Invalid access.
at System.ConsolePal.SetConsoleOutputEncoding(Encoding enc)
at System.Console.set_OutputEncoding(Encoding value)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
014c:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
014c:fixme:advapi:ReportEventW (00000000CAFE4242,0x0001,0x0000,0x00000402,0000000000000000,0x0001,0x00000000,00007FFFFE27C710,0000000000000000): stub
014c:err:eventlog:ReportEventW L"Application: dotnet.exe\n"
014c:err:eventlog:ReportEventW L"CoreCLR Version: 8.0.624.26715\n"
014c:err:eventlog:ReportEventW L".NET Version: 8.0.6\n"
014c:err:eventlog:ReportEventW L"Description: The process was terminated due to an unhandled exception.\n"
014c:err:eventlog:ReportEventW L"Exception Info: System.IO.IOException: Invalid access.\r\n"
014c:err:eventlog:ReportEventW L" at System.ConsolePal.SetConsoleOutputEncoding(Encoding enc)\r\n"
014c:err:eventlog:ReportEventW L" at System.Console.set_OutputEncoding(Encoding value)\r\n"
014c:err:eventlog:ReportEventW L" at Microsoft.DotNet.Cli.Program.Main(String[] args)\n"
014c:fixme:advapi:DeregisterEventSource (00000000CAFE4242) stub
wine: Unhandled exception 0xe0434352 in thread 14c at address 00006FFFFF473DE7 (thread 014c), starting debugger...
WineDbg attached to pid 0000
0168:fixme:dbghelp:elf_search_auxv can't find symbol in module
Unhandled exception: 0xe0434352 in 64-bit code (0x006fffff473de7).
0168:fixme:dbghelp:elf_search_auxv can't find symbol in module
Register dump:
rip:00006fffff473de7 rsp:00007ffffe27e690 rbp:00007ffffe27ea60 eflags:00000206 ( - -- I - -P- )
rax:00007ffffe27e6f0 rbx:00007f715d00c178 rcx:00007ffffe27e6b0 rdx:0000000000000000
rsi:0000000000000005 rdi:00007ffffe27e818 r8:00006ffffc390000 r9:00007ffffe27e838 r10:0000000000000005
r11:00007ffffe27e758 r12:0000000000004000 r13:0000000000000004 r14:0000000000000001 r15:00000000e0434352
Stack dump:
0x007ffffe27e690: 00007ffffe27e6b0 00006fff9ca8fe48
0x007ffffe27e6a0: 00006fff9ca8fea8 000000018021b840
0x007ffffe27e6b0: 00000001e0434352 0000000000000000
0x007ffffe27e6c0: 00006fffff473de7 00006fff00000005
0x007ffffe27e6d0: ffffffff8007000c 0000000000000000
0x007ffffe27e6e0: 0000000000000000 0000000000000000
0x007ffffe27e6f0: 00006ffffc390000 00007ffffe2a8680
0x007ffffe27e700: 0000000000000000 00006ffffc7533c8
0x007ffffe27e710: 00006fff9cab04e0 0000000000000006
0x007ffffe27e720: 00007f7100000000 0000000000000000
0x007ffffe27e730: 00007fffff24b930 00007ffffe27e8d8
0x007ffffe27e740: 0000000000000001 00006fff9caa0b00
Backtrace:
=>0 0x006fffff473de7 in kernelbase (+0x13de7) (0x007ffffe27ea60)
1 0x006ffffc44b3e3 in coreclr (+0xbb3e3) (0x007ffffe27ea60)
2 0x006ffffc44ad89 in coreclr (+0xbad89) (0x007ffffe27ea60)
3 0x007fffffd4a57e in system.console (+0xa57e) (0x007ffffe27ea60)
4 0x007fffffd48355 in system.console (+0x8355) (0x007ffffe27ea60)
5 0x000001002ee5a6 in dotnet (+0xee5a6) (0x007ffffe27eaf0)
6 0x006ffffc4eb9e3 in coreclr (+0x15b9e3) (0x007ffffe27eb20)
7 0x006ffffc420b59 in coreclr (+0x90b59) (0x007ffffe27ebd0)
8 0x006ffffc41d70c in coreclr (+0x8d70c) (0x007ffffe27ed39)
9 0x006ffffc443006 in coreclr (+0xb3006) (0x007ffffe27ef50)
10 0x006ffffc44333b in coreclr (+0xb333b) (0x007ffffe27ef50)
11 0x006ffffc399141 in coreclr (+0x9141) (0x007ffffe27f300)
12 0x006ffffc4ae9e8 in coreclr (+0x11e9e8) (0x007ffffe27f300)
13 0x006ffffc8b2b76 in hostpolicy (+0x22b76) (0x007ffffe27f430)
14 0x006ffffc8b2e5c in hostpolicy (+0x22e5c) (0x007ffffe27f599)
15 0x006ffffc8b379a in hostpolicy (+0x2379a) (0x007ffffe27f599)
16 0x006ffffc91b5c9 in hostfxr (+0xb5c9) (0x007ffffe27f699)
17 0x006ffffc91e066 in hostfxr (+0xe066) (0x007ffffe27f7a9)
18 0x006ffffc9202ec in hostfxr (+0x102ec) (0x00000000000003)
19 0x006ffffc9207c8 in hostfxr (+0x107c8) (0x007ffffe27f9a0)
20 0x006ffffc91e2ea in hostfxr (+0xe2ea) (0x007ffffe27fba1)
21 0x006ffffc9185a0 in hostfxr (+0x85a0) (0x00000000000002)
22 0x00000140008a3b in dotnet (+0x8a3b) (0x007ffffe27fdf0)
23 0x00000140008ece in dotnet (+0x8ece) (0x00000000000002)
24 0x000001400097d8 in dotnet (+0x97d8) (0000000000000000)
25 0x006fffffaa8cd9 BaseThreadInitThunk+0x9(unknown=<internal error>, entry=<internal error>, arg=<internal error>) [/usr/src/packages/BUILD/dlls/kernel32/thread.c:61] in kernel32 (0000000000000000)
26 0x006fffffca564b in ntdll (+0x5564b) (0000000000000000)
0x006fffff473de7 kernelbase+0x13de7: add $0xc8, %rsp
Modules:
Module Address Debug info Name (53 modules, 2 for wow64 not listed)
PE 100200000- 100468000 --none-- dotnet
PE 100470000- 100485000 Deferred system.runtime.interopservices
PE 100490000- 100499000 Deferred system.diagnostics.stacktrace
PE 1004a0000- 1005ae000 Deferred system.reflection.metadata
PE 1005b0000- 10067a000 Deferred system.collections.immutable
PE 100680000- 1006a4000 Deferred system.memory
PE 140000000- 140026000 --none-- dotnet
PE 180000000- 180c8d000 Deferred system.private.corelib
PE-Wine 6ffffafc0000- 6ffffb2b8000 Deferred dbghelp
PE 6ffffb2d0000- 6ffffb489000 Deferred clrjit
PE-Wine 6ffffb840000- 6ffffb8be000 Deferred imm32
PE-Wine 6ffffbea0000- 6ffffc1ed000 Deferred oleaut32
PE-Wine 6ffffc250000- 6ffffc270000 Deferred version
PE-Wine 6ffffc280000- 6ffffc375000 Deferred mscoree
PE 6ffffc390000- 6ffffc876000 --none-- coreclr
PE 6ffffc890000- 6ffffc8f4000 --none-- hostpolicy
PE 6ffffc910000- 6ffffc969000 --none-- hostfxr
PE-Wine 6ffffc980000- 6ffffc9d3000 Deferred shcore
PE-Wine 6ffffc9f0000- 6ffffcb04000 Deferred shlwapi
PE-Wine 6ffffcb20000- 6ffffd8af000 Deferred shell32
PE-Wine 6ffffd8c0000- 6ffffd90c000 Deferred coml2
PE-Wine 6ffffd920000- 6ffffdbab000 Deferred rpcrt4
PE-Wine 6ffffdbc0000- 6ffffdbff000 Deferred win32u
PE-Wine 6ffffdc10000- 6ffffe1ec000 Deferred user32
PE-Wine 6ffffe200000- 6ffffe4c9000 Deferred gdi32
PE-Wine 6ffffe4e0000- 6ffffe669000 Deferred combase
PE-Wine 6ffffe680000- 6ffffea3b000 Deferred ole32
PE-Wine 6ffffeb10000- 6ffffeefb000 Deferred ucrtbase
PE-Wine 6ffffef10000- 6ffffef99000 Deferred sechost
PE-Wine 6ffffefb0000- 6fffff30c000 Deferred msvcrt
PE-Wine 6fffff320000- 6fffff44a000 Deferred advapi32
PE-Wine 6fffff460000- 6fffffa63000 Dwarf-4 kernelbase
PE-Wine 6fffffa80000- 6fffffc35000 Dwarf-4 kernel32
PE-Wine 6fffffc50000- 6fffffff0000 Dwarf-4 ntdll
ELF 7fb15a631000- 7fb15a65e000 Deferred libgcc_s.so.1
ELF 7fb15a711000- 7fb15a73c000 Deferred libexpat.so.1
ELF 7fb15a73c000- 7fb15a789000 Deferred libfontconfig.so.1
ELF 7fb15a789000- 7fb15a7ac000 Deferred libbrotlicommon.so.1
ELF 7fb15a7ac000- 7fb15a879000 Deferred libfreetype.so.6
ELF 7fb15a879000- 7fb15a95b000 Deferred libm.so.6
ELF 7fb15a95b000- 7fb15ab00000 Deferred win32u.so
ELF 7fb15b10b000- 7fb15b119000 Deferred libbrotlidec.so.1
ELF 7fb15b119000- 7fb15b14f000 Deferred libpng16.so.16
ELF 7fb15b14f000- 7fb15b162000 Deferred libbz2.so.1.0
ELF 7fb15b162000- 7fb15b181000 Deferred libz.so.1
ELF 7fb15b281000- 7fb15b2b1000 Deferred liblzma.so.5
ELF 7fb15b2b1000- 7fb15b2cd000 Deferred libunwind.so.8
ELF 7fb15b2cd000- 7fb15b38a000 Export ntdll.so
ELF 7fb15b38d000- 7fb15b572000 Deferred libc.so.6
ELF 7fb15b582000- 7fb15b5b6000 Deferred ld-linux-x86-64.so.2
ELF 7fb15b5b6000- 7fb15b5bb000 Deferred <wine-loader>
PE 7fffffd40000- 7fffffd68000 --none-- system.console
PE 7fffffd70000- 7fffffd82000 Deferred system.threading
Threads:
process tid prio name (all IDs are in hex)
00000020 start.exe
00000024 0
00000038 services.exe
0000003c 0
00000040 0 wine_rpcrt4_server
0000004c 0 wine_rpcrt4_io
00000070 0 wine_rpcrt4_io
00000098 0 wine_rpcrt4_io
000000ac 0 wine_rpcrt4_io
000000c4 0 wine_rpcrt4_io
000000d8 0
000000f0 0 wine_rpcrt4_io
000000fc 0 wine_rpcrt4_io
00000044 winedevice.exe
00000048 0
00000054 0
00000058 0 wine_sechost_service
0000005c 0
00000060 0
000000d0 0
000000d4 0
00000068 winedevice.exe
0000006c 0
00000074 0
00000078 0 wine_sechost_service
0000007c 0
00000080 0
00000088 0
0000009c 0
000000a0 0
00000090 explorer.exe
00000094 0
000000e8 0 wine_explorer_display_settings_restorer
000000ec 0 wine_rpcrt4_server
000000a4 plugplay.exe
000000a8 0
000000b0 0
000000b4 0 wine_sechost_service
000000b8 0 wine_rpcrt4_server
000000bc svchost.exe
000000c0 0
000000c8 0
000000cc 0 wine_sechost_service
000000f4 rpcss.exe
000000f8 0
00000104 0
00000108 0 wine_sechost_service
0000010c 0 wine_rpcrt4_server
00000110 0 wine_rpcrt4_server
00000114 0 wine_rpcrt4_io
00000148 (D) C:\Program Files\dotnet\dotnet.exe
0000014c 0 <==
00000150 0 .NET EventPipe
00000154 0 .NET Debugger
00000158 2 .NET Finalizer
0000015c 0 .NET Tiered Compilation Worker
0000016c 0
System information:
Wine build: wine-9.11
Platform: x86_64 (guest: i386)
Version: Windows 10
Host system: Linux
Host version: 6.8.12-amd64
Fatal error. Internal CLR error. (0x80131506)
at System.ConsolePal.SetConsoleOutputEncoding(System.Text.Encoding)
at System.Console.set_OutputEncoding(System.Text.Encoding)
at Microsoft.DotNet.Cli.Program.Main(System.String[])
014c:fixme:seh:RaiseFailFastException (00007FFFFE27E1A0, 00007FFFFE27E240, 0) stub
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: .NET 8 console issues

Post by DarkShadow44 »

I tried dotnet-sdk-8.0.302-win-x64.exe with wine-9.11, and it works fine for me. What exactly did you do?
vaspian
Level 1
Level 1
Posts: 5
Joined: Thu Jun 20, 2024 10:21 am

Re: .NET 8 console issues

Post by vaspian »

Installing dotnet-sdk-8.0.302-win-x64.exe works, and I can run some applications, and run different dotnet commands, but this fails

dotnet --version (wine dotnet --version)


I have seen this same issue other commands, but this was the simplest one to reproduce, install the sdk, and run "dotnet --version"
dotnet is raising a "System.IO.IOException: Invalid access."

There is the line "0168:fixme:dbghelp:elf_search_auxv can't find symbol in module" but I think it is not relevant,

One line of thought, could be the UTF behaviour of .NET8.
Following .net tickets in github, it seems that how .net 8 is initializing the console to enforce utf8 was heavily modified.
https://learn.microsoft.com/en-us/dotne ... e-encoding
But if I try to set DOTNET_CLI_FORCE_UTF8_ENCODING=true, I get similar logs,....

00:04:11 0140:fixme:file:server_get_file_info Unsupported info class e
00:04:11 0140:fixme:file:server_get_file_info Unsupported info class e
00:04:11 014c:fixme:file:server_get_file_info Unsupported info class e
00:04:11 0150:fixme:file:server_get_file_info Unsupported info class e
00:04:11 0148:fixme:process:GetProcessGroupAffinity (FFFFFFFFFFFFFFFF,00007FFFFE27EEF4,0000000000000000): stub
00:04:11 0148:fixme:heap:GetNumaHighestNodeNumber semi-stub: 00007FFFFE27EE90
00:04:11 0148:fixme:process:GetProcessGroupAffinity (FFFFFFFFFFFFFFFF,00007FFFFE27EE90,0000000000000000): stub
00:04:11 0148:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.6\\mscordaccore.dll", 00006FFFFAF20000) stub
00:04:11 0148:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00:04:11 0148:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00000001801C5B68, 34) stub
00:04:11 0148:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00000001801B9BD0, 17) stub
00:04:11 0148:fixme:nls:get_dummy_preferred_ui_language (0x8 0x409 00007FFFFE27BF70 0000000000000000 00007FFFFE27BF68) returning a dummy value (current locale)
00:04:11 0148:fixme:nls:get_dummy_preferred_ui_language (0x8 0x409 00007FFFFE27BF70 00007FFFFE27BEC0 00007FFFFE27BF68) returning a dummy value (current locale)
00:04:11 0148:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
00:04:11 0148:fixme:advapi:ReportEventW (00000000CAFE4242,0x0001,0x0000,0x00000402,0000000000000000,0x0001,0x00000000,00007FFFFE27C710,0000000000000000): stub
00:04:11 0148:err:eventlog:ReportEventW L"Application: dotnet.exe\n"
00:04:11 0148:err:eventlog:ReportEventW L"CoreCLR Version: 8.0.624.26715\n"
00:04:11 0148:err:eventlog:ReportEventW L".NET Version: 8.0.6\n"
00:04:11 0148:err:eventlog:ReportEventW L"Description: The process was terminated due to an unhandled exception.\n"
00:04:11 0148:err:eventlog:ReportEventW L"Exception Info: System.IO.IOException: Invalid access.\r\n"
00:04:11 0148:err:eventlog:ReportEventW L" at System.ConsolePal.SetConsoleOutputEncoding(Encoding enc)\r\n"
00:04:11 0148:err:eventlog:ReportEventW L" at System.Console.set_OutputEncoding(Encoding value)\r\n"
00:04:11 0148:err:eventlog:ReportEventW L" at Microsoft.DotNet.Cli.Program.Main(String[] args)\n"
00:04:11 0148:fixme:advapi:DeregisterEventSource (00000000CAFE4242) stub
00:04:11 wine: Unhandled exception 0xe0434352 in thread 148 at address 00006FFFFF473DE7 (thread 0148), starting debugger...
00:04:11 016c:fixme:dbghelp:elf_search_auxv can't find symbol in module
00:04:12 016c:fixme:dbghelp:elf_search_auxv can't find symbol in module
00:04:12 0148:fixme:seh:RaiseFailFastException (00007FFFFE27E1A0, 00007FFFFE27E240, 0) stub
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: .NET 8 console issues

Post by DarkShadow44 »

No, I mean, I installed the sdk in a clean WINEPREFIX and "wine dotnet --version" works just fine. Did you try a clean WINEPREFIX?
vaspian
Level 1
Level 1
Posts: 5
Joined: Thu Jun 20, 2024 10:21 am

Re: .NET 8 console issues

Post by vaspian »

I am using the latest wine 9.12
and I now can only reproduce the issue in very specific settings...

So I will assume there is no wine issue,
Although I hope I can find someday what is happening
vaspian
Level 1
Level 1
Posts: 5
Joined: Thu Jun 20, 2024 10:21 am

Re: .NET 8 console issues

Post by vaspian »

I have been able to dig deeper into this... and "wine dotnet --version" requires a tty

ssh user@localhost wine dotnet --version ---> fails
ssh -t user@localhost wine dotnet --version ---> works

So what I am doing is wrap the wine command with an script -e -q -c "wine ..... " /dev/null to workaround the situation

ssh user@localhost script -e -q -c \"wine dotnet --version\" /dev/null


This is only an example, I need to do some complex things, but maybe someone has the same situation I had and this message could be useful.
vaspian
Level 1
Level 1
Posts: 5
Joined: Thu Jun 20, 2024 10:21 am

Re: .NET 8 console issues

Post by vaspian »

If i run ssh on a windows machine both ssh calls work
ssh user@localhost dotnet --version
ssh -t user@localhost dotnet --version

I do not know what should be the correct behaviour of wine
Locked