wine can not run self contained dotnet7 HelloWorld exe

Bug #2024673 reported by Dominik Viererbe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dotnet7 (Ubuntu)
Confirmed
Low
Unassigned
Jammy
Confirmed
Low
Unassigned

Bug Description

The autopkgtests currently fail on jammy for dotnet7 (https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/amd64/d/dotnet7/20230621_162829_4e7f6@/log.gz) but not for dotnet6.
The failing test creates a self contained windows .exe and tries to run it with wine.

Steps to reproduce:
apt install wine dotnet7
dotnet new console --name HelloWorld
cd HelloWorld
dotnet publish -c Release -r win-x64 --self-contained
wine64 bin/release/net7.0/win-x64/HelloWorld.exe

Error Output:
==============
Unhandled exception: page fault on read access to 0x0000000c in 64-bit code (0x000000000093a154).
 Register dump:
  rip:000000000093a154 rsp:000000000029d190 rbp:000000000029efa0 eflags:00010206 ( R- -- I - -P- )
  rax:0000000000026f30 rbx:000000000029d1e0 rcx:0000000000000130 rdx:0000000000000000
  rsi:000000000029ee70 rdi:000000000029dbe0 r8:00000000000003df r9:0000000019930520 r10:0000000000000005
  r11:000000000029d500 r12:0000000000000000 r13:000000000029d308 r14:000000000029fea0 r15:000000000029dd48
 Stack dump:
 0x000000000029d190: 000000000029dd48 000000000029fea0
 0x000000000029d1a0: 0000000000a45e40 000000007b070687
 0x000000000029d1b0: 000000000029f030 0000000000b37ff3
 0x000000000029d1c0: 0000000000000004 000000000029d490
 0x000000000029d1d0: 000000000029ee70 0000000000d78f50
 0x000000000029d1e0: 0000000000000000 0000000000a44978
 0x000000000029d1f0: 0000000000000000 0000000000a61602
 0x000000000029d200: 0000000000000000 0000000000d78f50
 0x000000000029d210: 000000000029dbe0 0000000000a448b9
 0x000000000029d220: 000000000029d308 000000000029ee70
 0x000000000029d230: 000000000029d320 000000000029d490
 0x000000000029d240: 000000000029e970 0000000000a46e10
 Backtrace:
 =>0 0x000000000093a154 EntryPoint+0xffffffffffffffff() in coreclr (0x000000000029efa0)
   1 0x0000000000b37ff3 EntryPoint+0xf5ac2() in coreclr (0x000000000029efa0)
   2 0x0000000000a61602 EntryPoint+0x1f0d1() in coreclr (0x000000000029efa0)
   3 0x0000000000a46e10 EntryPoint+0x48df() in coreclr (0x000000000029d490)
   4 0x0000000000a45f55 EntryPoint+0x3a24() in coreclr (0x000000000029d490)
   5 0x000000007bc525a5 EntryPoint+0xffffffffffffffff() in ntdll (0x000000000029d490)
   6 0x0000000000955e96 EntryPoint+0xffffffffffffffff() in coreclr (0x000000000029f331)
   7 0x000000007b63f000 EntryPoint+0xd08f() in kernel32 (0x000000000029f331)
   8 0x000000007bc3078a EntryPoint+0xffffffffffffffff() in ntdll (0x000000000029f331)
 0x000000000093a154 EntryPoint+0xffffffffffffffff in coreclr: movl 0x000000000000000c(%rdx),%eax
 Modules:
 Module Address Debug info Name (57 modules)
 PE 870000- 8d3000 Deferred hostpolicy
 PE 8e0000- dda000 Export coreclr
 PE 7b000000- 7b3fd000 Deferred kernelbase
 PE 7b600000- 7b969000 Dwarf kernel32
 PE 7bc00000- 7bf3c000 Dwarf ntdll
 ELF 7d000000- 7d005000 Deferred <wine-loader>
 PE 140000000- 14002a000 Deferred helloworld
 PE 180000000- 180061000 Deferred hostfxr
 PE 1c8db0000- 1c9097000 Deferred msvcrt
 PE 1cd860000- 1cd86f000 Deferred api-ms-win-crt-utility-l1-1-0
 PE 1d97a0000- 1d97ae000 Deferred api-ms-win-core-fibers-l1-1-1
 PE 21a7e0000- 21a9ce000 Deferred setupapi
 PE 231ae0000- 231d60000 Deferred rpcrt4
 PE 23d820000- 23dfc2000 Deferred user32
 PE 241850000- 24185e000 Deferred api-ms-win-crt-environment-l1-1-0
 PE 262250000- 262260000 Deferred api-ms-win-crt-runtime-l1-1-0
 PE 26b4c0000- 26bbb9000 Deferred gdi32
 PE 2739c0000- 273ec9000 Deferred oleaut32
 PE 28ba60000- 28ba6e000 Deferred api-ms-win-crt-time-l1-1-0
 PE 2e3540000- 2e364f000 Deferred shlwapi
 PE 2e8f10000- 2e948f000 Deferred ole32
 PE 2f1fa0000- 2f1fbe000 Deferred version
 PE 30a2c0000- 30a2d0000 Deferred api-ms-win-crt-stdio-l1-1-0
 PE 30c980000- 30c98f000 Deferred api-ms-win-core-synch-l1-2-0
 PE 3126f0000- 312744000 Deferred shcore
 PE 327020000- 3271a4000 Deferred combase
 PE 32a700000- 32a7bc000 Deferred sechost
 PE 330260000- 330387000 Deferred advapi32
 PE 33ea00000- 33ea10000 Deferred api-ms-win-crt-string-l1-1-0
 PE 344840000- 34484f000 Deferred api-ms-win-crt-filesystem-l1-1-0
 PE 350a30000- 350a40000 Deferred api-ms-win-crt-convert-l1-1-0
 PE 355100000- 35510f000 Deferred api-ms-win-crt-locale-l1-1-0
 PE 360a80000- 360a91000 Deferred api-ms-win-crt-math-l1-1-0
 PE 39b510000- 39b51f000 Deferred api-ms-win-crt-heap-l1-1-0
 PE 3af670000- 3af9dd000 Deferred ucrtbase
 PE 3afd00000- 3afd62000 Deferred imm32
 ELF 7fc76483a000- 7fc764843000 Deferred libuuid.so.1
 ELF 7fc764843000- 7fc764874000 Deferred libexpat.so.1
 ELF 7fc764874000- 7fc7648be000 Deferred libfontconfig.so.1
 ELF 7fc7648be000- 7fc7648e1000 Deferred libbrotlicommon.so.1
 ELF 7fc7648e1000- 7fc7648ef000 Deferred libbrotlidec.so.1
 ELF 7fc7648ef000- 7fc76490b000 Deferred libz.so.1
 ELF 7fc76490b000- 7fc764946000 Deferred libpng16.so.16
 ELF 7fc764946000- 7fc764a0e000 Deferred libfreetype.so.6
 ELF 7fc764b14000- 7fc76553d000 Deferred shell32<elf>
   \-PE 7fc764b30000- 7fc76553d000 \ shell32
 ELF 7fc76553d000- 7fc76556c000 Deferred gdi32.so
 ELF 7fc76556c000- 7fc76558a000 Deferred ucrtbase.so
 ELF 7fc76558a000- 7fc7655a8000 Deferred msvcrt.so
 ELF 7fc7656a8000- 7fc7656bf000 Deferred user32.so
 ELF 7fc7658bf000- 7fc765a35000 Dwarf libwine.so.1
 ELF 7fc765f80000- 7fc765fab000 Deferred liblzma.so.5
 ELF 7fc765fab000- 7fc766092000 Deferred libm.so.6
 ELF 7fc766092000- 7fc7660ad000 Deferred libunwind.so.8
 ELF 7fc7660ad000- 7fc766149000 Deferred ntdll.so
 ELF 7fc76614c000- 7fc766374000 Deferred libc.so.6
 ELF 7fc76637c000- 7fc7663b8000 Deferred ld-linux-x86-64.so.2
 Threads:
 process tid prio (all id:s are in hex)
 00000020 (D) Z:\tmp\autopkgtest.bXT7Ot\autopkgtest_tmp\HelloWorld\bin\Release\net7.0\win-x64\HelloWorld.exe
  00000024 0 <==
  000000e8 0
 00000030 services.exe
  00000034 0
  00000038 0
  00000058 0
  00000080 0
  00000084 0
  00000090 0
  000000c8 0
  000000d4 0
 00000044 explorer.exe
  00000048 0
 00000078 winedevice.exe
  0000007c 0
  00000088 0
  0000008c 0
  00000094 0
 000000c0 winedevice.exe
  000000c4 0
  000000cc 0
  000000d0 0
  000000d8 0
  000000dc 0
 System information:
     Wine build: wine-6.0.3 (Ubuntu 6.0.3~repack-1)
     Platform: x86_64
     Version: Windows 7
     Host system: Linux
     Host version: 5.15.0-75-generic

Revision history for this message
Dominik Viererbe (dviererbe) wrote (last edit ):

I could confirm the problem in my local jammy schroot. The produced exe is executable on an actual Windows 10 System. So the impact is quite low.

Here is also the STDERR of my local test run (because the autopkgtest does not display the standard error output):
=====================
wine: created the configuration directory '/home/dviererbe/.wine'
0050:err:system:ChangeDisplaySettingsExW Changing L"\\\\.\\DISPLAY1" display settings returned -2.
0050:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY1".
0050:err:system:ChangeDisplaySettingsExW Changing L"\\\\.\\DISPLAY2" display settings returned -2.
0050:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY2".
0050:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0050:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0050:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0048:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0048:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0048:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0048:err:ole:start_rpcss Failed to open RpcSs service
0040:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 <email address hidden>,-1" -> L"C:\\windows\\inf\\wineusb.inf"
Could not find Wine Gecko. HTML rendering will be disabled.
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
Could not find Wine Gecko. HTML rendering will be disabled.
wine: configuration in L"/home/dviererbe/.wine" has been updated.
0024:fixme:heap:GetNumaHighestNodeNumber semi-stub: 000000000029EFD8
wine: Call from 000000007BC2ED58 to unimplemented function KERNEL32.dll.GetProcessGroupAffinity, aborting
wine: Unhandled page fault on read access to 000000000000000C at address 000000000093A154 (thread 0024), starting debugger...
Unhandled exception: page fault on read access to 0x0000000c in 64-bit code (0x000000000093a154).
00e8:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 0
00e8:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 0

Revision history for this message
Dominik Viererbe (dviererbe) wrote :

Here is the succeeding STDOUT & STDERR output of dotnet6
=========================
0050:err:system:ChangeDisplaySettingsExW Changing L"\\\\.\\DISPLAY1" display settings returned -2.
0050:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY1".
0050:err:system:ChangeDisplaySettingsExW Changing L"\\\\.\\DISPLAY2" display settings returned -2.
0050:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY2".
0024:fixme:heap:GetNumaHighestNodeNumber semi-stub: 000000000029EFDC
0024:fixme:ntdll:EtwEventRegister ({e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 0000000000BA5870, 0000000000D78080, 0000000000D78080) stub.
0024:fixme:ntdll:EtwEventRegister ({763fd754-7086-4dfe-95eb-c01a46faf4ca}, 0000000000BA5870, 0000000000D780D0, 0000000000D780D0) stub.
0024:fixme:ntdll:EtwEventRegister ({a669021c-c450-4609-a035-5af59af4df18}, 0000000000BA5870, 0000000000D78120, 0000000000D78120) stub.
0024:fixme:seh:WerRegisterRuntimeExceptionModule (L"Z:\\home\\dviererbe\\HelloWorld\\bin\\Release\\net6.0\\win-x64\\mscordaccore.dll", 00000000008E0000) stub
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0024:fixme:ntdll:EtwEventRegister ({49592c0f-5a05-516d-aa4b-a64e02026c89}, 0000000000F93024, 0000000000000000, 000000000142A5A8) stub.
0024:fixme:ntdll:EtwEventRegister ({e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 0000000000F93064, 0000000000000000, 000000000142A8A0) stub.
0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 0000000021CD10B8, 34) stub
0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 0000000021CC8970, 17) stub
Hello, World!
00fc:fixme:ntdll:EtwEventUnregister (deadbeef) stub.
00fc:fixme:ntdll:EtwEventUnregister (deadbeef) stub.

Changed in dotnet7 (Ubuntu):
status: New → Confirmed
Changed in dotnet7 (Ubuntu Jammy):
status: New → Confirmed
importance: Undecided → Low
Changed in dotnet7 (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.