Skip to content

wine-preloader segment fault during start .exe on arm64 #188

@lu-ping

Description

@lu-ping

I tried both released version and build version by myself, result is same.
wine /path/to/app.exe lead to segment fault immediately. after some investigation I found it is because wine-preloader can't allocate virtual memory, due to arm64 host virtual memory address range allowed to be allocated is < 0x7fffffffff, which is kernel 512G VA address limit for arm64 host. however wine-preloader trying to locate itself to 0x7d7d00000000, which is around 128T offset. how do you handle this?
I tried to move text segment within < 0x7fffffffff by changing ld flag for wine-preloader, I can make it pass through, however, the app stop running shortly after startup, I see memory mmap error, it trying to allocate big VA space start from 0x11000000000 & 0x8000000000, of course, it will fail due to va limit. here is the full output from console, any idea why it stop running?

$ wine 'c:\users\daniel\AppData\Local\infinity.exe'
0054:err:sync:RtlpWaitForCriticalSection section 0000007FFFF90278 "../dlls/ntdll/loader.c: loader_section" wait timed out in thread 0054, blocked by 0060, retrying (60 sec)
003c:err:service:process_send_start_message service L"PlugPlay" failed to start
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 1053
006c:err:system:find_monitor_from_path Failed to find monitor with path "DISPLAY\Default_Monitor\0000&0000"
006c:err:ole:start_rpcss Failed to start RpcSs service
006c:err:ole:start_rpcss Failed to start RpcSs service
00c8:err:sync:RtlpWaitForCriticalSection section 0000007FFFF90278 "../dlls/ntdll/loader.c: loader_section" wait timed out in thread 00c8, blocked by 00c0, retrying (60 sec)
003c:err:service:process_send_command receiving command result timed out
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"winebus" failed to start: 1053
0024:err:environ:init_peb starting L"C:\users\daniel\AppData\Local\infinity.exe" in experimental ARM64EC mode
starting FEX (Hangover 10.6.1) based libarm64ecfex.dll
00f4:err:system:find_monitor_from_path Failed to find monitor with path "DISPLAY\Default_Monitor\0000&0000"
0024:err:system:find_monitor_from_path Failed to find monitor with path "DISPLAY\Default_Monitor\0000&0000"
0024:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,0000007FBD59FE60,0000007FBD59FE58) stub!
0024:fixme:uxtheme:SetPreferredAppMode 1: stub
0024:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented!
0024:fixme:uxtheme:SetPreferredAppMode 1: stub
0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 0000007800234F30, 16) stub
0024:fixme:winstation:GetUserObjectSecurity (000000000000005C 0000007FBD59F6DC 0000000000000000 len=0 0000007FBD59F6D8),stub!
0024:fixme:winstation:GetUserObjectSecurity (000000000000005C 0000007FBD59F6DC 0000007EBC064470 len=40 0000007FBD59F6D8),stub!
0024:fixme:winstation:GetUserObjectSecurity (0000000000000060 0000007FBD59F65C 0000000000000000 len=0 0000007FBD59F658),stub!
0024:fixme:winstation:GetUserObjectSecurity (0000000000000060 0000007FBD59F65C 0000007EBC064470 len=40 0000007FBD59F658),stub!
0024:fixme:winstation:GetUserObjectSecurity (00000000000000F4 0000007FBD59F50C 0000000000000000 len=0 0000007FBD59F508),stub!
0024:fixme:winstation:GetUserObjectSecurity (00000000000000F4 0000007FBD59F50C 0000007EBC064470 len=40 0000007FBD59F508),stub!
0024:fixme:advapi:SetSecurityInfo unimplemented type 7, returning success
0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0000007FBD59F67C, 0000000000000000 0000007FBD59F678
0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x804 0000007FBD59F67C 0000000000000000 0000007FBD59F678) returning a dummy value (current locale)
0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0000007FBD59F67C, 0000007FBD59F662 0000007FBD59F678
0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x804 0000007FBD59F67C 0000007FBD59F662 0000007FBD59F678) returning a dummy value (current locale)
0144:fixme:thread:NtSetInformationThread ThreadPowerThrottling stub!
0024:fixme:win:RegisterSuspendResumeNotification 0000000000010062, 0: stub.
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0024:fixme:process:GetProcessMitigationPolicy (FFFFFFFFFFFFFFFF, 4, 0000007FBD59F470, 4): stub
0024:fixme:thread:NtSetInformationThread ThreadPowerThrottling stub!
015c:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000007E0B5DFF80
0024:err:virtual:map_view anon mmap error Cannot allocate memory, size 0x11000010000, unix_prot 0
0024:err:virtual:allocate_virtual_memory out of memory for allocation, base (nil) size 11000000000
0024:err:virtual:map_view anon mmap error Cannot allocate memoryOB, size 0x8000010000, unix_prot 0
0024:err:virtual:allocate_virtual_memory out of memory for allocation, base (nil) size 8000000000
0024:fixme:ver:GetPackageFamilyName (FFFFFFFFFFFFFFFF 0000007FBD59F10C 0000007FBD59F110): stub
0170:err:environ:init_peb starting L"C:\windows\system32\cmd.exe" in experimental ARM64EC mode
starting FEX (Hangover 10.6.1) based libarm64ecfex.dll
0024:fixme:iphlpapi:GetBestRoute2 (00000024030AC0E0, 0, 0000000000000000, 00000024030AC410, 0x00000000, 0000007FBD59A330, 0000007FBD59A450): stub
0190:err:environ:init_peb starting L"C:\users\daniel\AppData\Local\infinity.exe" in experimental ARM64EC mode
starting FEX (Hangover 10.6.1) based libarm64ecfex.dll
0190:err:system:find_monitor_from_path Failed to find monitor with path "DISPLAY\Default_Monitor\0000&0000"
0190:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,0000007FAD14FE60,0000007FAD14FE58) stub!
0190:fixme:process:SetProcessShutdownParameters (00000100, 00000001): partial stub.
019c:fixme:file:NtLockFile I/O completion on lock not implemented yet
0024:fixme:file:NtLockFile I/O completion on lock not implemented yet
0024:fixme:shcore:SetCurrentProcessExplicitAppUserModelID L"infinity.1.25.198": stub
0024:fixme:wbemprox:client_security_SetBlanket 0000007FE6B21DC0, 0000007EBC142200, 10, 0, (null), 3, 3, 0000000000000000, 0
0024:fixme:wbemprox:client_security_Release 0000007FE6B21DC0
Loading inversify singleton [0] Type.SettingsService: 613.56ms
Ignore RUN_ABOVE_NORMAL
LoggerBrokerMain connect: logPath=C:\users\daniel\AppData\Local\infinity.20250522.045934.p32, traceLevel=2, maxSize=10485760
LoggerBrokerMain is connected
Loading inversify singleton [1] Type.OAuthManager: 1.512s
Loading inversify singleton [1] Type.HeartbeatManager: 548.338ms
Loading inversify singleton [0] Type.Auth: 5.762s
Loading inversify singleton [0] Type.UsageTrackingService: 212.368ms
Loading inversify singleton [0] Type.UsageTrackingServiceV3: 398.288ms
Loading inversify singleton [0] Type.AddinManager: 1.002s
[USB] LOADING usb
01c4:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000007E60FEFF80
01a4:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
01a4:fixme:process:NtQueryInformationProcess ProcessHandleCount (0x11c,0x7ea6aaf500,0x00000004,(nil)) stub
0190:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 0000007FAD14FEB0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions