ptitSeb / box86

Box86 - Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices
https://box86.org
MIT License
3.28k stars 226 forks source link

dotnet35sp1 application crashes - Winlink (RMS Express, versions <1.5.41.0) #217

Closed WheezyE closed 2 years ago

WheezyE commented 3 years ago

Seb, thank you again for all your hard work with this finicky program. The commits from today (commits near c7a4dbe I think?) are getting RMS Express to open (and connect to Telnet!) with mono - which is farther than ExaGear got using mono.

I did some analysis today using mono vs using dotnet35sp1+vcrun2015 (from my pre-loaded dotnet35sp1+vcrun2015 wineprefix from my Debian 10 x86 VMWare virtual computer on my Windows laptop copied to my Pi --- vcrun2015 and dotnet35sp1 still crash when trying to install in box86 on the Pi).

Total packages needed for RMS Express and VARA to work (as learned from a functioning/clunky wine+ExaGear install) are: winetricks -q corefonts dotnet35sp1 vb6run vcrun2015 sound=alsa win7 # VARA also needs an old WinNT4.0 pdh.dll

EDIT 8/1/2021: More testing has revealed that these are the only packages needed for each program ... BOX86_NOBANNER=1 winetricks -q dotnet35sp1 win7 sound=alsa # for RMS Express (corefonts & vcrun2015 appear to be optional) BOX86_NOBANNER=1 winetricks -q vb6run pdh_nt4 win7 sound=alsa # for VARA

Overview

With mono (not dotnet35sp1) installed, RMS Express opens(!) and the ARDOP and WINMOR modems open. But ARDOP and WINMOR don't function correctly (I learned from ExaGear that they need dotnet35sp1 to function correctly, VARA needs vcrun2015). With dotnet35sp1 installed (instead of mono), I get SIGSEGV's running RMS Express, ARDOP, WINMOR, and VARA. VARA installs, but doesn't run with mono nor with dotnet35sp1.

RMS Express

RMS Express w/ mono: Runs!!! No problems! Telnet works! modems don't work though

RMS Express w/ dotnet35sp1: ``` Using native(wrapped) libtinfo.so.6 0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Using emulated /home/pi/wine/lib/wine/advapi32.dll.so Using emulated /home/pi/wine/lib/wine/sechost.dll.so Using emulated /home/pi/wine/lib/wine/ucrtbase.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-core-synch-l1-2-0.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-core-fibers-l1-1-1.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-core-localization-l1-2-1.dll.so 0024:fixme:ntdll:EtwEventRegister ({319dc449-ada5-50f7-428e-957db6791668}, 109BA1A0, 10A12460, 10A12478) stub. 0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 10993241, 28) stub Using emulated /home/pi/wine/lib/wine/shlwapi.dll.so Using emulated /home/pi/wine/lib/wine/shcore.dll.so Using emulated /home/pi/wine/lib/wine/user32.dll.so Using emulated /home/pi/wine/lib/wine/setupapi.dll.so Using emulated /home/pi/wine/lib/wine/version.dll.so Using emulated /home/pi/wine/lib/wine/rpcrt4.dll.so Using emulated /home/pi/wine/lib/wine/gdi32.dll.so Using emulated /home/pi/wine/lib/wine/ole32.dll.so Using native(wrapped) libfreetype.so.6 Using native(wrapped) libfontconfig.so.1 Using emulated /home/pi/wine/lib/wine/imm32.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-appmodel-runtime-l1-1-2.dll.so 0024:fixme:ntdll:EtwEventRegister ({319dc449-ada5-50f7-428e-957db6791668}, 10C1B8F0, 11161058, 11161070) stub. 0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 10A309AD, 28) stub Using emulated /home/pi/wine/lib/wine/api-ms-win-core-quirks-l1-1-0.dll.so 0024:fixme:kernelbase:QuirkIsEnabled3 (1020F4E0, FFFFFFFF) stub! 0024:fixme:heap:GetNumaHighestNodeNumber semi-stub: 1020FC14 0024:fixme:ntdll:EtwEventRegister ({e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 10D54330, 11161100, 1116C108) stub. 0024:fixme:ntdll:EtwEventRegister ({763fd754-7086-4dfe-95eb-c01a46faf4ca}, 10D54330, 11162258, 111622C8) stub. 0024:fixme:ntdll:EtwEventRegister ({a669021c-c450-4609-a035-5af59af4df18}, 10D54330, 1116AC30, 1116C118) stub. 0024:fixme:ntdll:EtwEventRegister ({cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 10D54330, 11161220, 11161288) stub. Using emulated /home/pi/wine/lib/wine/combase.dll.so 0024:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscordacwks.dll", 10A20000) stub 23702|SIGSEGV @0x7cc5c264 (???) (x86pc=0x10bd0e63/???:"???"), for accessing 0x13640004 (code=2), db=0x59bf3f0(0x10bd0e63/???) Warning, context has been changed in Sigactionhanlder (EIP changed) 23702|Double SIGSEGV! Segmentation fault pi@raspberrypi:~/.wine/drive_c/RMS Express $ 00a0:err:rpc:I_RpcReceive we got fault packet with status 0x1c010003 ```
RMS Express w/ dotnet35sp1+vcrun2015: ``` 00b8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 00c4:fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub. Using emulated /home/pi/wine/lib/wine/kernel32.dll.so Using emulated /home/pi/wine/lib/wine/kernelbase.dll.so Using emulated /home/pi/wine/lib/wine/mscoree.dll.so Using emulated /home/pi/wine/lib/wine/dbghelp.dll.so Using emulated /home/pi/wine/lib/wine/ucrtbase.dll.so Using emulated /home/pi/wine/lib/wine/shell32.dll.so Using emulated /home/pi/wine/lib/wine/shlwapi.dll.so Using emulated /home/pi/wine/lib/wine/shcore.dll.so Using emulated /home/pi/wine/lib/wine/user32.dll.so Using emulated /home/pi/wine/lib/wine/setupapi.dll.so Using emulated /home/pi/wine/lib/wine/version.dll.so Using emulated /home/pi/wine/lib/wine/advapi32.dll.so Using emulated /home/pi/wine/lib/wine/sechost.dll.so Using emulated /home/pi/wine/lib/wine/rpcrt4.dll.so Using emulated /home/pi/wine/lib/wine/gdi32.dll.so Using emulated /home/pi/wine/lib/wine/ole32.dll.so Using native(wrapped) libncurses.so.6 Using native(wrapped) libtinfo.so.6 0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Using native(wrapped) libfreetype.so.6 Using native(wrapped) libfontconfig.so.1 Using emulated /home/pi/wine/lib/wine/imm32.dll.so Using emulated /home/pi/wine/lib/wine/mscorwks.dll.so Using emulated /home/pi/wine/lib/wine/msvcr80.dll.so 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A03261A, 1090D0C0, {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 14, 7A3BEE40, (null), (null), 7A3BDC70): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {044973cd-251f-4dff-a3e9-9d6307286b05} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {3044f61a-99b0-4c21-b203-d39423c73b00} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {d00792da-07b7-40f5-97eb-5d974e054740} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {cfc4ba53-fb42-4757-8b70-5f5d51fee2f4} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {efdf1eac-1d5d-4e84-893a-19b80f692176} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c71408de-42cc-4f81-9c93-b8912abf2a0f} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {840c8456-6457-4eb7-9cd0-d28f01c64f5e} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c424b3e3-2ae0-416e-a039-410c5d8e5f14} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {300ce105-86d1-41f8-b9d2-83fcbff32d99} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {561410f5-a138-4ab3-945e-516483cddfbc} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {15447a14-b523-46ae-b75b-023f900b4393} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {b17304d9-5afa-4da6-9f7b-5a4fa73129b6} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {02d08a4f-fd01-4538-989b-03e437b950f4} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {861f5339-19d6-4873-b350-7b03228bda7c} 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 1090D0C0, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} 23988|SIGSEGV @0x7c11bd58 (???) (x86pc=0x79f0a4f0/???:"???"), for accessing 0x12c30008 (code=2), db=0x4891230(0x79f0a4f0/???) Warning, context has been changed in Sigactionhanlder (EIP changed) 23988|Double SIGSEGV! Segmentation fault ```

VARA

VARA install (still needs vcrun2015): ``` DYNAREC=0 wine VARA\ setup\ \(Run\ as\ Administrator\).exe BOX86_DYNAREC=0 BOX86_NOSIGSEGV=1 winetricks msxml3 BOX86_DYNAREC=0 winetricks -q vb6run BOX86_DYNAREC=0 wine ~/.wine/drive_c/VARA/VARA\ Install.exe #seems(?) to install mswinsck.ocx with a sigsegv #note: I think vcrun2015 is also a requirement for VARA but vcrun2015 doesn't install with box86 yet. BOX86_DYNAREC=0 wine ~/.wine/drive_c/VARA/VARA.exe # crashes with or without DYNAREC enabled ```
VARA (with and without Dynarec) w/ mono (no vcrun2015): ``` Using emulated /home/pi/wine/lib/wine/sxs.dll.so 0024:fixme:olepicture:OleLoadPictureEx (10CB0DD4,7366,0,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=0,y=0,f=0,1020FAB0), partially implemented. Using emulated /home/pi/wine/lib/wine/usp10.dll.so Using emulated /home/pi/wine/lib/wine/wsock32.dll.so Using emulated /home/pi/wine/lib/wine/ws2_32.dll.so Using emulated /home/pi/wine/lib/wine/iphlpapi.dll.so Using native(wrapped) libresolv.so.2 23790|SIGSEGV @0xb5b4370c (???) (x86pc=0x7b630df0//home/pi/wine/lib/wine/kernel32.dll.so:"/home/pi/wine/lib/wine/ntdll.dll.so/wcslen"), for accessing (nil) (code=1), db=0x3d611e0(0x7bc88ce0//home/pi/wine/lib/wine/ntdll.dll.so/wcslen) Warning, context has been changed in Sigactionhanlder (EIP changed) 23790|Double SIGSEGV! Segmentation fault ```
VARA (with and without dynarec) w/ dotnet35sp1 (no vcrun2015): ``` Using emulated /home/pi/wine/lib/wine/sxs.dll.so 0024:fixme:olepicture:OleLoadPictureEx (10CB0DD4,7366,0,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=0,y=0,f=0,1020FAB0), partially implemented. Using emulated /home/pi/wine/lib/wine/usp10.dll.so Using emulated /home/pi/wine/lib/wine/wsock32.dll.so Using emulated /home/pi/wine/lib/wine/ws2_32.dll.so Using emulated /home/pi/wine/lib/wine/iphlpapi.dll.so Using native(wrapped) libresolv.so.2 23644|SIGSEGV @0x284fb74 (???) (x86pc=0xffffffff/???:"???"), for accessing (nil) (code=1), db=(nil)((nil)/???) Warning, context has been changed in Sigactionhanlder (EIP changed) 23644|Double SIGSEGV! Segmentation fault ```
VARA (with and without dynarec) w/ dotnet35sp1+vcrun2015: ``` Using emulated /home/pi/wine/lib/wine/sxs.dll.so 0024:fixme:olepicture:OleLoadPictureEx (10CB0DD4,7366,0,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=0,y=0,f=0,1020FAB0), partially implemented. Using emulated /home/pi/wine/lib/wine/usp10.dll.so Using emulated /home/pi/wine/lib/wine/wsock32.dll.so Using emulated /home/pi/wine/lib/wine/ws2_32.dll.so Using emulated /home/pi/wine/lib/wine/iphlpapi.dll.so Using native(wrapped) libresolv.so.2 24059|SIGSEGV @0xb5bad70c (???) (x86pc=0x7b630df0//home/pi/wine/lib/wine/kernel32.dll.so:"/home/pi/wine/lib/wine/ntdll.dll.so/wcslen"), for accessing (nil) (code=1), db=0x4af4218(0x7bc88ce0//home/pi/wine/lib/wine/ntdll.dll.so/wcslen) Warning, context has been changed in Sigactionhanlder (EIP changed) 24059|Double SIGSEGV! Segmentation fault pi@raspberrypi:~/.wine/drive_c/VARA $ 009c:err:rpc:I_RpcReceive we got fault packet with status 0x1c010003 00c4:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime Optimization Service"): stub 00c4:fixme:advapi:DeregisterEventSource (0xcafe4242) stub 00b8:fixme:msvcrt:__clean_type_info_names_internal (0x64082a5c) stub ```

WINMOR (EDIT 8/1/2021: WINMOR has been discontinued)

WINMOR w/ mono: Runs! Doesn't function correctly: wine WINMOR\ TNC.exe #w/ dotnet35sp1 ``` 0024:fixme:ntdll:EtwEventRegister ({319dc449-ada5-50f7-428e-957db6791668}, 10C1B8F0, 11161058, 11161070) stub. 0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 10A309AD, 28) stub Using emulated /home/pi/wine/lib/wine/api-ms-win-core-quirks-l1-1-0.dll.so 0024:fixme:kernelbase:QuirkIsEnabled3 (1020F4E0, FFFFFFFF) stub! 0024:fixme:heap:GetNumaHighestNodeNumber semi-stub: 1020FC14 0024:fixme:ntdll:EtwEventRegister ({e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 10D54330, 11161100, 1116C108) stub. 0024:fixme:ntdll:EtwEventRegister ({763fd754-7086-4dfe-95eb-c01a46faf4ca}, 10D54330, 11162258, 111622C8) stub. 0024:fixme:ntdll:EtwEventRegister ({a669021c-c450-4609-a035-5af59af4df18}, 10D54330, 1116AC30, 1116C118) stub. 0024:fixme:ntdll:EtwEventRegister ({cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 10D54330, 11161220, 11161288) stub. Using emulated /home/pi/wine/lib/wine/combase.dll.so 0024:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscordacwks.dll", 10A20000) stub 20973|SIGSEGV @0x7cc5d064 (???) (x86pc=0x10bd0e63/???:"???"), for accessing 0x13640004 (code=2), db=0x4a23428(0x10bd0e63/???) Warning, context has been changed in Sigactionhanlder (EIP changed) 20973|Double SIGSEGV! Segmentation fault ```
WINMOR w/ dotnet35sp1+vcrun2015 (WINMOR doesn't need vcrun2015 to function though): ``` 00b8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 00c4:fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub. Using emulated /home/pi/wine/lib/wine/kernel32.dll.so Using emulated /home/pi/wine/lib/wine/kernelbase.dll.so Using emulated /home/pi/wine/lib/wine/mscoree.dll.so Using emulated /home/pi/wine/lib/wine/dbghelp.dll.so Using emulated /home/pi/wine/lib/wine/ucrtbase.dll.so Using emulated /home/pi/wine/lib/wine/shell32.dll.so Using emulated /home/pi/wine/lib/wine/shlwapi.dll.so Using emulated /home/pi/wine/lib/wine/shcore.dll.so Using emulated /home/pi/wine/lib/wine/user32.dll.so Using emulated /home/pi/wine/lib/wine/setupapi.dll.so Using emulated /home/pi/wine/lib/wine/version.dll.so Using emulated /home/pi/wine/lib/wine/advapi32.dll.so Using emulated /home/pi/wine/lib/wine/sechost.dll.so Using emulated /home/pi/wine/lib/wine/rpcrt4.dll.so Using emulated /home/pi/wine/lib/wine/gdi32.dll.so Using emulated /home/pi/wine/lib/wine/ole32.dll.so Using native(wrapped) libncurses.so.6 Using native(wrapped) libtinfo.so.6 0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Using native(wrapped) libfreetype.so.6 Using native(wrapped) libfontconfig.so.1 Using emulated /home/pi/wine/lib/wine/imm32.dll.so Using emulated /home/pi/wine/lib/wine/mscorwks.dll.so Using emulated /home/pi/wine/lib/wine/msvcr80.dll.so 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A03261A, 1090D070, {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 14, 7A3BEE40, (null), (null), 7A3BDC70): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {044973cd-251f-4dff-a3e9-9d6307286b05} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {3044f61a-99b0-4c21-b203-d39423c73b00} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {d00792da-07b7-40f5-97eb-5d974e054740} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {cfc4ba53-fb42-4757-8b70-5f5d51fee2f4} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {efdf1eac-1d5d-4e84-893a-19b80f692176} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c71408de-42cc-4f81-9c93-b8912abf2a0f} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {840c8456-6457-4eb7-9cd0-d28f01c64f5e} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c424b3e3-2ae0-416e-a039-410c5d8e5f14} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {300ce105-86d1-41f8-b9d2-83fcbff32d99} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {561410f5-a138-4ab3-945e-516483cddfbc} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {15447a14-b523-46ae-b75b-023f900b4393} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {b17304d9-5afa-4da6-9f7b-5a4fa73129b6} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {02d08a4f-fd01-4538-989b-03e437b950f4} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {861f5339-19d6-4873-b350-7b03228bda7c} 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 1090D070, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} 24177|SIGSEGV @0x7c11e458 (???) (x86pc=0x79f0a4f0/???:"???"), for accessing 0x12c30008 (code=2), db=0x4f0d7b8(0x79f0a4f0/???) Warning, context has been changed in Sigactionhanlder (EIP changed) 24177|Double SIGSEGV! Segmentation fault pi@raspberrypi:~/.wine/drive_c/RMS Express $ 00b8:fixme:msvcrt:__clean_type_info_names_internal (0x64082a5c) stub ```

ARDOP

ARDOP w/ mono: Runs! Doesn't function correctly: wine ARDOP_Win.exe #w/ dotnet35sp1 ``` 0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Using emulated /home/pi/wine/lib/wine/advapi32.dll.so Using emulated /home/pi/wine/lib/wine/sechost.dll.so Using emulated /home/pi/wine/lib/wine/ucrtbase.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-core-synch-l1-2-0.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-core-fibers-l1-1-1.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-core-localization-l1-2-1.dll.so 0024:fixme:ntdll:EtwEventRegister ({319dc449-ada5-50f7-428e-957db6791668}, 109BA1A0, 10A12460, 10A12478) stub. 0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 10993241, 28) stub Using emulated /home/pi/wine/lib/wine/shlwapi.dll.so Using emulated /home/pi/wine/lib/wine/shcore.dll.so Using emulated /home/pi/wine/lib/wine/user32.dll.so Using emulated /home/pi/wine/lib/wine/setupapi.dll.so Using emulated /home/pi/wine/lib/wine/version.dll.so Using emulated /home/pi/wine/lib/wine/rpcrt4.dll.so Using emulated /home/pi/wine/lib/wine/gdi32.dll.so Using emulated /home/pi/wine/lib/wine/ole32.dll.so Using native(wrapped) libfreetype.so.6 Using native(wrapped) libfontconfig.so.1 Using emulated /home/pi/wine/lib/wine/imm32.dll.so Using emulated /home/pi/wine/lib/wine/api-ms-win-appmodel-runtime-l1-1-2.dll.so 0024:fixme:ntdll:EtwEventRegister ({319dc449-ada5-50f7-428e-957db6791668}, 10C1B8F0, 11161058, 11161070) stub. 0024:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 10A309AD, 28) stub Using emulated /home/pi/wine/lib/wine/api-ms-win-core-quirks-l1-1-0.dll.so 0024:fixme:kernelbase:QuirkIsEnabled3 (1020F4E0, FFFFFFFF) stub! 0024:fixme:heap:GetNumaHighestNodeNumber semi-stub: 1020FC14 0024:fixme:ntdll:EtwEventRegister ({e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 10D54330, 11161100, 1116C108) stub. 0024:fixme:ntdll:EtwEventRegister ({763fd754-7086-4dfe-95eb-c01a46faf4ca}, 10D54330, 11162258, 111622C8) stub. 0024:fixme:ntdll:EtwEventRegister ({a669021c-c450-4609-a035-5af59af4df18}, 10D54330, 1116AC30, 1116C118) stub. 0024:fixme:ntdll:EtwEventRegister ({cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 10D54330, 11161220, 11161288) stub. Using emulated /home/pi/wine/lib/wine/combase.dll.so 0024:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscordacwks.dll", 10A20000) stub 21051|SIGSEGV @0x7cc59b64 (???) (x86pc=0x10bd0e63/???:"???"), for accessing 0x13640004 (code=2), db=0x51a7df0(0x10bd0e63/???) Warning, context has been changed in Sigactionhanlder (EIP changed) 21051|Double SIGSEGV! Segmentation fault pi@raspberrypi:~/.wine/drive_c/RMS Express $ 009c:err:rpc:I_RpcReceive we got fault packet with status 0x1c010003 ```
WheezyE commented 3 years ago

Just wanted to update this ticket and say thanks for the d0ac1e6 and 664dab7 commits you made to get us farther on this. We're getting close! It's awesome getting to work with you on the discord.

WheezyE commented 3 years ago

Found a bug in RMS Express after commit 549ff980 (that was done to help get VARA running). I just wanted to report it here to help debug. I don't think this was here before:

The "HF Channel Selector" in RMS Express crashes and doesn't leave a wine debugger log: Running w/ box86 549ff980 using `winetricks -q corefonts vb6run` & mono (wine-devel=5.18, Pi 4). Note: wine-devel=5.18 opens RMS Express with just mono on x86 Linux The HF Channel Selector has to run before RMS Express will allow a user to select a channel and send a radio signal. ![image](https://user-images.githubusercontent.com/29649598/95663386-1c6eec80-0afc-11eb-8681-5bf7c2ee938b.png) ``` pi@raspberrypi:~/.wine/drive_c/RMS Express $ BOX86_DYNAREC=0 wine RMS\ Express.exe Box86 with Dynarec v0.1.3 549ff980 built on Oct 10 2020 06:52:04 Box86 with Dynarec v0.1.3 549ff980 built on Oct 10 2020 06:52:04 Box86 with Dynarec v0.1.3 549ff980 built on Oct 10 2020 06:52:04 0060:err:vulkan:wine_vk_init Failed to load libvulkan.so.1. 0060:err:ole:start_rpcss Failed to start RpcSs service Box86 with Dynarec v0.1.3 549ff980 built on Oct 10 2020 06:52:04 0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0024:err:module:dlopen_unix_dll module 0x6ed00000 already has a Unix module that's not "/home/pi/wine/lib/wine/user32.so" 0024:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 1020E518, 10071298, 1020E51C, 1020E510 0024:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 1020E518, 10071298, 1020E51C, 1020E510 0024:err:module:dlopen_unix_dll module 0x6ed00000 already has a Unix module that's not "/home/pi/wine/lib/wine/user32.so" 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:ntdll:EtwEventRegister ({c651f5f6-1c0d-492e-8ae1-b4efd7c9d503}, 14751EE8, 00000000, 113CBAE0) stub. 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0114:fixme:uiautomation:UiaReturnRawElementProvider (000100E8, 0, 0, 00000000) stub! 0114:fixme:uiautomation:UiaReturnRawElementProvider (000100EA, 0, 0, 00000000) stub! 0114:fixme:uiautomation:UiaReturnRawElementProvider (000100EC, 0, 0, 00000000) stub! 0114:fixme:uiautomation:UiaReturnRawElementProvider (000100EE, 0, 0, 00000000) stub! 0114:fixme:uiautomation:UiaReturnRawElementProvider (000100F0, 0, 0, 00000000) stub! 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:uiautomation:UiaClientsAreListening () 0024:fixme:thread:GetThreadUILanguage : stub, returning default language. 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 1020B258, 00000000 1020B280 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 1020B258 00000000 1020B280) returning a dummy value (current locale) 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 1020B258, 1ABF3350 1020B280 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 1020B258 1ABF3350 1020B280) returning a dummy value (current locale) ================================================================= Native Crash Reporting ================================================================= Got a UNKNOWN while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= wine: Unhandled exception 0x0eedfade in thread 24 at address 7B00F969 (thread 0024), starting debugger... ```
WheezyE commented 3 years ago

New opcode request for VARA after compiling Box86 2375d707

0308:fixme:olepicture:OleLoadPictureEx (10CB0E04,7366,0,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=0,y=0,f=0,1020FB10), partially implemented.
9173|SIGSEGV @0xb5d88a04 (???) (x86pc=0x7bc5f880/???:"???"), for accessing (nil) (code=1), db=0x4967a28(0x7bc5f880/???)
9173|0x6640accc: Unimplemented Opcode 0F 01 4C 24 4A 0F B7 54
WheezyE commented 3 years ago

Not sure when this cropped up because I haven’t tried to run the Winlink installer in a while, but I just tried to run Winlink installer with Box86 eaf7d0a2 (box86 version w signal handling for dotnet30) and got these new errors:

errors: ``` pi@raspberrypi:~/Downloads/WinlinkExpressInstaller $ wine Winlink_Express_install.exe Box86 with Dynarec v0.1.5 eaf7d0a2 built on Nov 21 2020 04:33:05 Box86 with Dynarec v0.1.5 eaf7d0a2 built on Nov 21 2020 04:33:05 Box86 with Dynarec v0.1.5 eaf7d0a2 built on Nov 21 2020 04:33:05 002c:err:wineboot:main Cannot set the dir to L"C:\\windows" (2) 002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2). 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"spupdsvc" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"winebus" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"clr_optimization_v2.0.50727_32" failed to start: 2 002c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 002c:err:winediag:nodrv_CreateWindow The explorer process failed to start. 0048:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0048:err:winediag:nodrv_CreateWindow The explorer process failed to start. ^C0024:err:seh:NtRaiseException Unhandled exception code c000013a flags 0 addr 0x6320c39f ```
Updating to Box86 e449a4e2 I get ``` pi@raspberrypi:~/Downloads/WinlinkExpressInstaller $ wine Winlink_Express_install.exe Box86 with Dynarec v0.1.5 e449a4e2 built on Nov 22 2020 04:51:02 Box86 with Dynarec v0.1.5 e449a4e2 built on Nov 22 2020 04:51:02 Box86 with Dynarec v0.1.5 e449a4e2 built on Nov 22 2020 04:51:02 002c:err:wineboot:main Cannot set the dir to L"C:\\windows" (2) 002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2). 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"spupdsvc" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"winebus" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 2 0034:fixme:service:scmdatabase_autostart_services Auto-start service L"clr_optimization_v2.0.50727_32" failed to start: 2 002c:err:shell:SHGetFolderPathAndSubDirW Failed to create directory L"C:\\users\\pi\\Application Data". 002c:err:shell:SHGetFolderPathAndSubDirW Failed to create directory L"C:\\users\\pi". 002c:err:shell:SHGetFolderPathAndSubDirW Failed to create directory L"C:\\users\\pi\\Local Settings\\Application Data". 0024:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0) Box86 with Dynarec v0.1.5 e449a4e2 built on Nov 22 2020 04:51:02 0024:fixme:process:SetProcessDEPPolicy (1): stub 0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0024:err:winediag:nodrv_CreateWindow The explorer process failed to start. pi@raspberrypi:~/Downloads/WinlinkExpressInstaller $ ```

This all be a bit moot anyway though until signal handling works for dotnet35sp1 since dotnet35sp1 is a pre-requisite for Winlink, but just wanted to post this error here for future debugging

WheezyE commented 3 years ago

Nice :) with 269bc9e28901e67a3a8a8a6d72b0903bccf1e153 (I believe), the Winlink installer runs again.

WheezyE commented 3 years ago

With dotnet35sp1 now installing in box86 (#227), I'm looking at Winlink again.

I'm getting some sigsegv's when trying to run it with just dotnet35sp1 installed. I've logged them with log1 here: log1.log

I also tried updating box86 with today's commits, then installing some of the other components that VARA needs (winetricks -q corefonts dotnet35sp1 vb6run vcrun2015 win7) and logged again here: morecomponents_log1.log

Log2 looks like this: morecomponents_log2.log.zip

WheezyE commented 3 years ago

Thanks for the updated signal handling for dotnet!

I’m getting these errors now when running RMS Express (dotnet35sp1) and WinRPR (dotnet40): ``` 8044|SIGSEGV @0x4299dbdc (???(0x4299dbdc)) (x86pc=0x791f6d14/???:"???", esp=0x31ed68), for accessing 0x1413000 (code=2/prot=1), db=0x42a18938(0x4299d8cc:0x4299deb4/0x791f6c5d:0x791f6db5/???) Error: Unsupported libc Syscall 0x13E (318) Stop waiting for remaining thread 8094 Stop waiting for remaining thread 8095 8095|SIGSEGV @0x62868e78 (???(/usr/local/bin/box86/0x62868e78)) (x86pc=0x63f6d23a/???:"???", esp=0x357f0ac), for accessing 0x40b84f70 (code=1/prot=7), db=(nil)((nil):(nil)/(nil):(nil)/???) 8095|SIGSEGV @0x62868e78 (???(/usr/local/bin/box86/0x62868e78)) (x86pc=0x63f6d23a/???:"???", esp=0x357f0ac), for accessing 0x40b838d0 (code=1/prot=7), db=(nil)((nil):(nil)/(nil):(nil)/???) 8095|Double SIGSEGV! ```

RMSlog1.log

WheezyE commented 3 years ago

Getting even farther with eca39e6a ! With a fresh wineprefix, new dotnet35sp1 install, I run RMS Express and get Winlink Express dialogue box telling me an error happened in kernelbase32.dll. Here's the log1: log1file.log

WheezyE commented 3 years ago

Log2 here: log2file (copy 1).log.zip :)

WheezyE commented 3 years ago

We're getting so close now that .net is functioning.

Winlink appears to error every OTHER time it opens (how odd), but not every time it opens.

I'm still suspicious of ngen. A winlink error dialog box pops up whenever ngen appears in the terminal (".NET Runtime version 2.0.50727.3053").

Screenshot: ![image](https://user-images.githubusercontent.com/29649598/106063280-2ae61180-60b5-11eb-9561-847eb37ca2a6.png)
With log1 I get: ``` Warning: Cannot dlopen("/home/pi/wine/lib/wine/iphlpapi.so"/0x4a560118, 2) 9202|SIGSEGV @0x43f4b288 (???(0x43f4b288)) (x86pc=0x79fc8582/???:"???", esp=0x851e78c), for accessing 0x8412754 (code=2/prot=7), db=0x679d5618(0x43f4b284:0x43f4b2c4/0x79fc857f:0x79fc8594/???:clean) 010c:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub 9138|SIGSEGV @0x6286b9b4 (???(/usr/local/bin/box86/0x6286b9b4)) (x86pc=0x8410851/???:"???", esp=0x31edd4), for accessing (nil) (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean) 010c:fixme:advapi:ReportEventW (CAFE4242,0x0001,0x0000,0x000003ff,00000000,0x0001,0x00000000,0851DDC4,00000000): stub 010c:err:eventlog:ReportEventW L".NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A097706) (80131506)" 010c:fixme:advapi:DeregisterEventSource (CAFE4242) stub ```

Trying to install (and override in winecfg) any version of a native iphlpapi.dll from online that I can find gives me a bunch of new errors.

I know ngen tries to do some kind of compiling thing on files so that they run faster the next time they're loaded. Maybe it's caching things (that are broken), crashing when it tries to load its cached files, then just rebuilding from scratch on the next run of the program.

I'm still working on figuring out the best installation conditions, but so far I have: BOX86_NOBANNER=1 winetricks corefonts dotnet35sp1 vb6run win7 riched30 richtx32

I'm also currently experimenting with other winetricks packages (any related to dll warnings I've seen in the log1 output) to see if any help. So far, I'm trying winetricks comctl32 comctl32ocx comdlg32ocx usp10 gdiplus wininet winhttp secur32 vb6run vcrun2005 (as well as ole32 crypt32 msvcrt40 after renaming the downloaded windowsxp-kb936929...exe to the filename that winetricks is actually looking for - which is also pictured above in the lower terminal window), but I've been getting less stability this way so far.

WheezyE commented 3 years ago

wtf. It appears to not be erroring anymore. Sorry, this whole process is confusing. After installing all those winetricks packages, I was switching them off/on (by commenting in/out the dll overrides) in ~/.wine/user.reg

Screenshot: ![image](https://user-images.githubusercontent.com/29649598/106066381-f759b600-60b9-11eb-8f06-aaf15f2731d0.png)
With this combo of overrides (ie with this combo of winetricks package installs) I'm not getting that crash anymore (and ngen isn't complaining). ``` [Software\\Wine\\DllOverrides] 1611783084 #time=1d6f4f3c3529214 "*atl80"="native,builtin" "*comctl32"="native,builtin" "*crypt32"="native" #"*gdiplus"="native" #"*iertutil"="native,builtin" #"*msvcm80"="native,builtin" #"*msvcp80"="native,builtin" #"*msvcr80"="native,builtin" #"*msvcrt40"="native,builtin" #"*ole32"="native,builtin" "*riched20"="native,builtin" #"*secur32"="native,builtin" #"*usp10"="native,builtin" #"*vcomp"="native,builtin" #"*winhttp"="native,builtin" #"*wininet"="native,builtin" ``` So I guess just install whichever packages include the following dll files that I didn't comment out here with `#`

I'll try to figure out which packages those are exactly

WheezyE commented 3 years ago

(Sorry to spam - just kinda excited) I think I narrowed this ngen crash down to wine just missing winetricks crypt32. Maybe we just need to wrap crypt32.so?

EDIT: I found out that if I decide to install vb6run (so that winlink's internet works), then I needed to install these two things too winetricks comctl32ocx comdlg32ocx (maybe I just need one of them?)

I do still have all the other dll files in place in my wine system32 folder, so I'll try to see if it's truly just this dll or if Winlink/ngen need others too, but this is pretty exciting to think that ngen woes might just be from missing this crypt32.dll

(ps I'm running Box86 dd733c41, wine_5.21-devel, TwisterOS)


Another edit: I just tried some other combinations of things and wanted to post them here too.

Packages recommended by K6ETA: `winetricks -q corefonts win7 sound=alsa dotnet35sp1 vb6run` # for winlink (I think vb6run is needed for internet) `winetricks -q vcrun2015` # vcrun2015 (vc 14.0) and pdh for VARA (but I can't get vcrun2015, vcrun2010, to install)
Tried: (sideloaded prefix means a wineprefix where dotnet35sp1 was installed using wine on x86 Linux and the wineprefix was transferred to the RPi4) sideloaded prefix + winlink (works but crashes every-other time it's loaded) sideloaded prefix + crypt32 + winlink (WORKS! - initial error box but then no errors, no internet) sideloaded prefix + crypt32 + vb6run + winlink (crashes) sideloaded prefix + crypt32 + vb6run + comctl32ocx + comdlg32ocx + winlink (works and internet works - initial error box but then no errors) sideloaded prefix + crypt32 + vb6run + comctl32ocx + comdlg32ocx + vcrun2008 + pdh (custom) + winlink (works - vara freezes?) that last combo but with `sound=alsa` and sound card configured in VARA (works, VARA has graphical issues if run through Winlink but otherwise seems to function perfectly)
Try next: dotnet35sp1 installer w/ crypt32 on older box86 builds which had crashes in the installer before vcrun2015 as loaded from a previous version of box86 (there seems to have been a regression in vcrun2015 at some point)
WheezyE commented 3 years ago

With box86 9c5a9ebb when I try to run RMS Express, the program seems to freeze now when trying to open. Log 1 shows this: Warning: Cannot dlopen("/home/pi/wine/lib/wine/shell32.so"/0x7db9d178, 2) at the freeze.

I’ll try to bisect and find the commit. Maybe this is related to the new crashes in ngen/dotnet?

WheezyE commented 3 years ago

That error appears to be a separate issue. I went back to the commit that has libcrypt wrapping and it appears that the wrapping isn’t playing nice with ngen. I’ll bisect that and log1 soon

WheezyE commented 3 years ago

I’m having some trouble today pinning down which commit causes RMS Express to not open anymore. Part of my problem is that I broke test.sh somehow (I think by experimenting with RAM stuff). The other half of my problem is that RMS Express still has that initial crash that pops up and I’m having trouble sorting out maybe two different crashes. I’ll probably focus on dotnet35sp1 installer first and come back to this issue after that’s resolved

WheezyE commented 3 years ago

Just wanted to say I’m excited to have put up a GitHub page to host an install script and hopefully make install easy for the hams I know: https://github.com/WheezyE/Winelink

I’m so excited that VARA runs and am really looking forward to ironing out even more bugs and streamlining the dotnet install process. I’ve been trying to do this for two years and it wouldn’t have been possible to do it open-source without box86 and your help. Lots of work still to be done with Winlink on box86, but this is a pretty amazing proof of concept.

I’ll keep looking for bugs 🙂

WheezyE commented 3 years ago

These crashes took a while to track down since they happen inconsistently (and I got kind of busy this month + side-tracked working on my Winelink script)

RMS Express crashes happen whenever ngen crashes appear in the terminal (when running RMS Express): 0274:err:eventlog:ReportEventW L".NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A097706) (80131506)"

The .NET ngen.exe that RMS Express relies on is located here: ~/.wine/drive_c/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe

After installing dotnet35sp1 (commit db5efa89085a085d733c859662799ebcf4e5c3c2 works to install dotnet35sp1), I believe we can test ngen alone by telling it to create a native image of any exe:

cd ~/.wine/drive_c/windows/Microsoft.NET/Framework/v2.0.50727 # must be in this directory to run ngen manually w wine?
wine ngen.exe vbc.exe

ngen stores the native images that it creates in ~/.wine/drive_c/windows/assembly/NativeImages_v2.0.50727_32


RMS Express testing notes (set up with my "Winelink" script, then removed native crypt32 from winecfg): ``` NOTE: RMS Express must be loaded about 4-5 times to get a successful launch. NOTE: RMS Express crashes happen whenever ngen crashes happen `0274:err:eventlog:ReportEventW L".NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A097706) (80131506)"` test.sh ( commit ) Feb 3 (6a498c37) RMS Express works (w/ or w/o native crypt32, must load over and over for RMS Express to work on 1 out of 5 launches even if running wineserver -k) Feb 8 (0ffc8682) RMS Express works (must load over and over for it to work just sometimes) (internet works) xxxxx (4837797f) RMS Express works (must load over and over for it to work just sometimes) (internet works) 0178:fixme:crypt:CertAddCertificateLinkToStore (0x1cd618, 0x1d4d2c, 00000004, (nil)): semi-stub 0174:fixme:path:parse_url failed to parse L"System.ServiceModel.Web" 0174:fixme:path:parse_url failed to parse L"System.Runtime.Serialization" 0174:fixme:path:parse_url failed to parse L"System.ServiceModel" 0174:fixme:path:parse_url failed to parse L"SMDiagnostics" 0194:fixme:path:parse_url failed to parse L"nsoftware.IPWorks" 0144:fixme:path:parse_url failed to parse L"RMS Express.resources" 0144:fixme:path:parse_url failed to parse L"RMS Express.resources" 0144:fixme:virtual:NtFlushProcessWriteBuffers stub 0144:fixme:gdiplus:GdipCreateHalftonePalette stub 0194:fixme:path:parse_url failed to parse L"System.Web" 0144:fixme:path:parse_url failed to parse L"nsoftware.IPWorks.System" 01b0:fixme:bcrypt:BCryptGetFipsAlgorithmMode 0910EB9C - semi-stub 01b0:fixme:bcrypt:BCryptGetFipsAlgorithmMode 0910E61C - semi-stub 01a0:fixme:seh:NtQueryInformationThread ThreadIsIoPending info class not supported yet xxxxx (aeab3c81) RMS Express works (must load over and over for it to work just sometimes) (internet works) (try ctrl-c after a crash, then re-load. then no ngen errors should pop up in terminal on RMS express load) xxxxx (6409f5d4) RMS Express works (must load over and over for it to work just sometimes) (internet works) (try ctrl-c after a crash, then re-load. then no ngen errors should pop up in terminal on RMS express load) xxxxx (d3d431d5) RMS Express never opens (`ctrl-c` and `wineserver -k` tricks don't work here) 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00125610, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} # terminal is stuck here Feb 9+ (xxxxxxxx) The above error persists for the rest of the box86 builds to current (be82ccb) ```
ptitSeb commented 3 years ago

Ok! So commit "d3d431d5" introduced some mutex mecanism, so I assume there is a deadlock happening here. I tried to reproduce on my Pandora (can't try on my Pi for now) but I don't get any lock, so it maybe sensitive to timming.

If you can reproduce on your side (with latest box86 sources): once it's stuck, open another terminal, and with ps -A find the pid of "RMS Express.exe" (I assume the deadlock is in there), then attach a gdb to it using gdb -pid PID (with PID the pid number of the process). In gdb use thread apply all bt to get the back trace in all thread: I need that output. (you can then kill the app with k and quit gdb with q)

(in the mean time, I'll try to think of what could go wrong, but the backtrace would certainly help)

WheezyE commented 3 years ago

Awesome, alright here's the backtrace of RMS Express with box86 be82ccb. ngen wasn't in the PID list.

backtrace: ``` pi@raspberrypi:~/box86 $ ps -A PID TTY TIME CMD ... 17795 pts/2 00:00:24 RMS Express.exe ... pi@raspberrypi:~/box86 $ gdb -pid 17795 ... (gdb) thread apply all bt Thread 2 (Thread 0x468aa2f0 (LWP 17842)): #0 __libc_read (nbytes=16, buf=0x163f270, fd=14) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=14, buf=buf@entry=0x163f270, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d72b4 in my_read (fd=14, buf=0x163f270, count=16) at /home/pi/Downloads/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8ee4 in iFipu (emu=0x649be6b8, fcn=1653437076) at /home/pi/Downloads/box86/src/wrapped/generated/wrapper.c:2316 #4 0x628a4918 in x86Int3 (emu=0x649be6b8) at /home/pi/Downloads/box86/src/emu/x86int3.c:298 #5 0x41b190ac in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0x40064ff0 (LWP 17795)): #0 my_box86signalhandler (sig=11, info=0xbed54a68, ucntx=0xbed54ae8) at /home/pi/Downloads/box86/src/libtools/signals.c:594 #1 #2 0x46c95f80 in ?? () #3 0x0000002a in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) ```

The terminal running RMS Express (frozen) reads:

...
0024:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {861f5339-19d6-4873-b350-7b03228bda7c}
0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 001255C8, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub
0024:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {ea40c74d-4f65-4561-bb26-656231c8967f}
# stuck here
WheezyE commented 3 years ago

Thanks for the update! Hm the freeze seems to still be happening at the same spot.


0024:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {861f5339-19d6-4873-b350-7b03228bda7c}
0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00125610, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub
0024:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {ea40c74d-4f65-4561-bb26-656231c8967f}

I never thought to try this till now, but I turned off dynarec and that got past the freeze in the latest commit (c254dc31) and in the Feb 9 (a062a8ef) commit (though in both cases after turning off Dynarec, after Winlink loads it then has internet errors and always crashes w ngen problems - though these are probably separate issues).

WheezyE commented 3 years ago

Thank you again for your work on this error. The freeze is unfortunately still persisting.

Freeze happens here in the terminal ``` 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00125610, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} ```
Log1 ``` 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00125610, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} Using emulated /home/pi/wine/lib/wine/shell32.dll.so Warning: Cannot dlopen("/home/pi/wine/lib/wine/shell32.so"/0x643ca730, 2) ```
Backtrace: ``` pi@raspberrypi:~/box86 $ gdb -pid 6190 GNU gdb (Raspbian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 6190 [New LWP 6238] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". Thread 1 "RMS Express.exe" received signal SIGSEGV, Segmentation fault. 0x46b961a8 in ?? () (gdb) thread apply all bt Thread 2 (Thread 0x468c32f0 (LWP 6238)): #0 __libc_read (nbytes=16, buf=0x165f270, fd=14) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=14, buf=buf@entry=0x165f270, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d73bc in my_read (fd=14, buf=0x165f270, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8fec in iFipu (emu=0x6369e6b8, fcn=1653437340) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2316 #4 0x628a4a20 in x86Int3 (emu=0x6369e6b8) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x41b31774 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0x400ffff0 (LWP 6190)): #0 0x46b961a8 in ?? () #1 0x0000002a in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) ```
With dynarec off the program opens: ``` 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00125610, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} 00d8:err:ole:CoGetContextToken apartment not initialised 0024:fixme:path:parse_url failed to parse L"Microsoft.VisualBasic" #keeps going ```
ptitSeb commented 3 years ago

well, it seem the deadlock doesn't happens on main "RMS Express.exe" program, as it is waiting for an answer from another program. Maybe wineserver, maybe another, I cann't tell, be if it was a deadlock, you would see some thread of the backtrace waiting on nanosleep or pthread_mutex_lock.

WheezyE commented 3 years ago

I will say, with dynarec off and with these patches, the other RMS Express crashes seem to be gone now and the internet works again

ptitSeb commented 3 years ago

At least something progress in the right direction! :)

WheezyE commented 3 years ago

I thought maybe I should post a log1 and backtrace of ngen too since .NET's ngen freezes in the same spot as RMS Express in the terminal (I believe RMS Express invokes ngen while opening).

Not sure if any of this helps, but here's Log1: ``` pi@raspberrypi:~/.wine/drive_c/windows/Microsoft.NET/Framework/v2.0.50727 $ BOX86_LOG=1 wine ngen.exe vbc.exe Debug level is 1 Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096 Box86 with Dynarec v0.2.1 638b341b built on Mar 18 2021 07:49:49 BOX86: Wine detected, WINEPRELOADRESERVE="" Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/ Using default BOX86_PATH: ./:bin/ Counted 46 Env var Looking for /home/pi/wine/bin/wine argv[1]="ngen.exe" argv[2]="vbc.exe" Using native(wrapped) libpthread.so.0 Using native(wrapped) libdl.so.2 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux.so.2 Using native(wrapped) librt.so.1 Using emulated /home/pi/wine/bin/../lib/wine/ntdll.so Using native(wrapped) libm.so.6 Debug level is 1 Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096 Box86 with Dynarec v0.2.1 638b341b built on Mar 18 2021 07:49:49 BOX86: Wine detected, WINEPRELOADRESERVE="" Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/ Using default BOX86_PATH: ./:bin/ Counted 47 Env var Looking for /home/pi/wine/bin/wine argv[1]="ngen.exe" argv[2]="vbc.exe" Using native(wrapped) libpthread.so.0 Using native(wrapped) libdl.so.2 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux.so.2 Using native(wrapped) librt.so.1 Using emulated /home/pi/wine/bin/../lib/wine/ntdll.so Using native(wrapped) libm.so.6 Debug level is 1 Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096 Box86 with Dynarec v0.2.1 638b341b built on Mar 18 2021 07:49:49 Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/ Using default BOX86_PATH: ./:bin/ Counted 47 Env var Looking for /home/pi/wine/bin/wineserver Using native(wrapped) libdl.so.2 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux.so.2 Using native(wrapped) libpthread.so.0 Using native(wrapped) librt.so.1 Using emulated /home/pi/wine/lib/wine/../libwine.so.1 0050:err:ole:start_rpcss Failed to start RpcSs service 002c:fixme:ver:GetCurrentPackageId (0077FEA4 00000000): stub Warning: Cannot dlopen("/home/pi/wine/lib/wine/kernel32.so"/0x642ab750, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/kernelbase.so"/0x642b8898, 2) Using emulated /home/pi/wine/lib/wine/msvcrt.dll.so Warning: Cannot dlopen("/home/pi/wine/lib/wine/msvcrt.so"/0x642edbe0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/advapi32.so"/0x64309330, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/sechost.so"/0x64309330, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-string-l1-1-0.so"/0x643018e0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-errorhandling-l1-1-0.so"/0x643029d8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-timezone-l1-1-0.so"/0x64302c28, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-file-l1-1-0.so"/0x64302f48, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-namedpipe-l1-1-0.so"/0x64303308, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-handle-l1-1-0.so"/0x643034c8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-file-l2-1-0.so"/0x64303678, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-heap-l1-1-0.so"/0x64303a58, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-libraryloader-l1-1-0.so"/0x643040e8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-synch-l1-1-0.so"/0x64304190, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-processthreads-l1-1-0.so"/0x643046c0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-processenvironment-l1-1-0.so"/0x64304a50, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-datetime-l1-1-0.so"/0x64304da8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-localization-l1-2-0.so"/0x64305268, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-sysinfo-l1-1-0.so"/0x64305510, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-synch-l1-2-0.so"/0x64305628, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-console-l1-1-0.so"/0x643059e0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-debug-l1-1-0.so"/0x64305d40, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-processthreads-l1-1-1.so"/0x64306028, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-file-l1-2-0.so"/0x64306310, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-profile-l1-1-0.so"/0x643066c8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-memory-l1-1-0.so"/0x643067a8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-util-l1-1-0.so"/0x64306928, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-rtlsupport-l1-1-0.so"/0x64306eb0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-interlocked-l1-1-0.so"/0x64307060, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/oleaut32.so"/0x64307478, 2) Using emulated /home/pi/wine/lib/wine/gdi32.so Warning: Cannot dlopen("/home/pi/wine/lib/wine/ole32.so"/0x6430f1b8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/combase.so"/0x6430f580, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/rpcrt4.so"/0x6430fa58, 2) Using emulated /home/pi/wine/lib/wine/user32.so Warning: Cannot dlopen("/home/pi/wine/lib/wine/setupapi.so"/0x643105d8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/version.so"/0x643105d8, 2) Debug level is 1 Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096 Box86 with Dynarec v0.2.1 638b341b built on Mar 18 2021 07:49:49 BOX86: Wine detected, WINEPRELOADRESERVE="000400000-00048c000" Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/ Using default BOX86_PATH: ./:bin/ Counted 49 Env var Looking for /home/pi/wine/bin/wine argv[1]="C:\windows\system32\conhost.exe" argv[2]="--unix" argv[3]="--width" argv[4]="80" argv[5]="--height" argv[6]="24" argv[7]="--server" argv[8]="0x10" Using native(wrapped) libpthread.so.0 Using native(wrapped) libdl.so.2 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux.so.2 Using native(wrapped) librt.so.1 Using emulated /home/pi/wine/bin/../lib/wine/ntdll.so Using native(wrapped) libm.so.6 Using emulated /home/pi/wine/lib/wine/../libwine.so.1 Warning: Cannot dlopen("/home/pi/wine/lib/wine/kernel32.so"/0x64b0e3a8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/kernelbase.so"/0x64b18ed0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/conhost.so"/0x64b20b40, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/advapi32.so"/0x64b2bc18, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/sechost.so"/0x64b2bc18, 2) 0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-string-l1-1-0.so"/0x64b2da68, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-errorhandling-l1-1-0.so"/0x64b2ee80, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-timezone-l1-1-0.so"/0x64b2f5d8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-file-l1-1-0.so"/0x64b2f6b8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-namedpipe-l1-1-0.so"/0x64b2fab0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-handle-l1-1-0.so"/0x64b2fe10, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-file-l2-1-0.so"/0x64b2fd50, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-heap-l1-1-0.so"/0x64b2ffa8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-libraryloader-l1-1-0.so"/0x64b30370, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-synch-l1-1-0.so"/0x64b306d0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-processthreads-l1-1-0.so"/0x64b313b8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-processenvironment-l1-1-0.so"/0x64b31838, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-datetime-l1-1-0.so"/0x64b31bb8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-localization-l1-2-0.so"/0x64b32070, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-sysinfo-l1-1-0.so"/0x64b323d8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-synch-l1-2-0.so"/0x64b32560, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-console-l1-1-0.so"/0x64b32918, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-debug-l1-1-0.so"/0x64b32a78, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-processthreads-l1-1-1.so"/0x64b32e40, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-file-l1-2-0.so"/0x64b32e40, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-profile-l1-1-0.so"/0x64b334f8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-fibers-l1-1-1.so"/0x643a5d20, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-memory-l1-1-0.so"/0x64b33680, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-util-l1-1-0.so"/0x64b33800, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-rtlsupport-l1-1-0.so"/0x64b33900, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-localization-l1-2-1.so"/0x643aef18, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-interlocked-l1-1-0.so"/0x64b33f88, 2) Using emulated /home/pi/wine/lib/wine/gdi32.so Using emulated /home/pi/wine/lib/wine/user32.so Warning: Cannot dlopen("/home/pi/wine/lib/wine/setupapi.so"/0x64b3c0e0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/rpcrt4.so"/0x64b3c0e0, 2) Using native(wrapped) libfreetype.so.6 Warning: Cannot dlopen("/home/pi/wine/lib/wine/version.so"/0x64b3c0e0, 2) Using native(wrapped) libfontconfig.so.1 Warning: Cannot dlopen("/home/pi/wine/lib/wine/imm32.so"/0x6440f8f0, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-fibers-l1-1-1.so"/0x64b753f8, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/api-ms-win-core-localization-l1-2-1.so"/0x64b82358, 2) Using native(wrapped) libfreetype.so.6 Using native(wrapped) libfontconfig.so.1 Warning: Cannot dlopen("/home/pi/wine/lib/wine/imm32.so"/0x64be9b20, 2) Microsoft (R) CLR Native Image Generator - Version 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. Warning: Cannot dlopen("/home/pi/wine/lib/wine/shlwapi.so"/0x6444c400, 2) Warning: Cannot dlopen("/home/pi/wine/lib/wine/shcore.so"/0x6444c488, 2) 0024:fixme:service:QueryServiceConfig2W Level 6 not implemented Installing assembly C:\windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe 00e0:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Warning: Cannot dlopen("/home/pi/wine/lib/wine/actxprxy.so"/0x6451ec40, 2) 00e0:fixme:ntdll:EtwRegisterTraceGuidsW (7A03261A, 0013CAA0, {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 14, 7A3BEE40, (null), (null), 7A3BDC70): stub 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {044973cd-251f-4dff-a3e9-9d6307286b05} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {3044f61a-99b0-4c21-b203-d39423c73b00} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {d00792da-07b7-40f5-97eb-5d974e054740} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {cfc4ba53-fb42-4757-8b70-5f5d51fee2f4} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {efdf1eac-1d5d-4e84-893a-19b80f692176} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c71408de-42cc-4f81-9c93-b8912abf2a0f} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {840c8456-6457-4eb7-9cd0-d28f01c64f5e} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c424b3e3-2ae0-416e-a039-410c5d8e5f14} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {300ce105-86d1-41f8-b9d2-83fcbff32d99} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {561410f5-a138-4ab3-945e-516483cddfbc} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {15447a14-b523-46ae-b75b-023f900b4393} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {b17304d9-5afa-4da6-9f7b-5a4fa73129b6} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {02d08a4f-fd01-4538-989b-03e437b950f4} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {861f5339-19d6-4873-b350-7b03228bda7c} 00e0:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 0013CAA0, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 00e0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} ```
And backtrace: ``` pi@raspberrypi:~ $ gdb -pid 1001 GNU gdb (Raspbian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 1001 [New LWP 1070] [New LWP 1075] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". __libc_read (nbytes=16, buf=0x31d830, fd=7) at ../sysdeps/unix/sysv/linux/read.c:26 26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. (gdb) thread apply all bt Thread 3 (Thread 0x46c122f0 (LWP 1075)): #0 __libc_read (nbytes=16, buf=0x18ef2d0, fd=16) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=16, buf=buf@entry=0x18ef2d0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d73bc in my_read (fd=16, buf=0x18ef2d0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8fec in iFipu (emu=0x46a11368, fcn=1653437340) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2316 #4 0x628a4a20 in x86Int3 (emu=0x46a11368) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x41c4cd24 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 2 (Thread 0x463ee2f0 (LWP 1070)): #0 __libc_read (nbytes=16, buf=0x17cf060, fd=12) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=12, buf=buf@entry=0x17cf060, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d73bc in my_read (fd=12, buf=0x17cf060, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8fec in iFipu (emu=0x45ecb678, fcn=1653437340) --Type for more, q to quit, c to continue without paging-- at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2316 #4 0x628a4a20 in x86Int3 (emu=0x45ecb678) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x41c4cd24 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0x40116ff0 (LWP 1001)): #0 __libc_read (nbytes=16, buf=0x31d830, fd=7) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=7, buf=buf@entry=0x31d830, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d73bc in my_read (fd=7, buf=0x31d830, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8fec in iFipu (emu=0x6487d050, fcn=1653437340) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2316 #4 0x628a4a20 in x86Int3 (emu=0x6487d050) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x41c4cd24 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) k Kill the program being debugged? (y or n) y [Inferior 1 (process 1001) killed] (gdb) q pi@raspberrypi:~ $ ```
ngen doesn’t freeze with dynarec off: ``` ... 0154:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00136AB0, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0154:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} Error compiling C:\windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe: Bad forma t. (Exception from HRESULT: 0x8007000B) 0154:fixme:virtual:NtFlushProcessWriteBuffers stub Uninstalling assembly C:\windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe beca use of an error during compilation. 0154:err:ole:CoReleaseMarshalData StdMarshal ReleaseMarshalData failed with error 0x8001011d Bad format. (Exception from HRESULT: 0x8007000B) pi@raspberrypi:~/.wine/drive_c/windows/Microsoft.NET/Framework/v2.0.50727 $ ```
WheezyE commented 3 years ago

I gave gdb another shot today with the C freeze with box86 74d3bb76 and found a reference to "nanosleep" in winedevice.exe

I ran ngen again until freeze and then attached gdb to various processes and searched thread apply all bt. Then I copy-pasted the output into a text file and searched through there for "nanosleep", "pthread_mutex_lock", and "mutex".

Here's the backtrace of winedevice.exe (process 10979 in my instance): ``` pi@raspberrypi:~/box86 $ gdb -pid 10979 GNU gdb (Raspbian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 10979 [New LWP 10981] [New LWP 10982] [New LWP 10983] [New LWP 10986] [New LWP 10987] [New LWP 10988] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. (gdb) thread apply all bt Thread 7 (Thread 0x46bd52f0 (LWP 10988)): #0 __GI___poll (timeout=60000, nfds=2, fds=0x46c02f70) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x46c02f70, nfds=2, timeout=60000) at ../sysdeps/unix/sysv/linux/poll.c:26 Backtrace stopped: Cannot access memory at address 0x34 Thread 6 (Thread 0x469d12f0 (LWP 10987)): #0 __GI___poll (timeout=-1, nfds=2, fds=0x469d0ccc) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x469d0ccc, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26 #2 0x460b7a3c in ?? () from /lib/arm-linux-gnueabihf/libusb-1.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 5 (Thread 0x45edb2f0 (LWP 10986)): #0 __GI___nanosleep (remaining=0x45edaa0c, requested_time=0x45edaa14) at ../sysdeps/unix/sysv/linux/nanosleep.c:28 #1 __GI___nanosleep (requested_time=0x45edaa14, remaining=0x45edaa0c) at ../sysdeps/unix/sysv/linux/nanosleep.c:25 #2 0x45252ad8 in ?? () from /lib/arm-linux-gnueabihf/libSDL2-2.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) --Type for more, q to quit, c to continue without paging-- Thread 4 (Thread 0x44fd62f0 (LWP 10983)): #0 __libc_read (nbytes=16, buf=0x147f2c0, fd=19) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=19, buf=buf@entry=0x147f2c0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d6944 in my_read (fd=19, buf=0x147f2c0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8574 in iFipu (emu=0x444640a0, fcn=1653434660) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2317 #4 0x628a4a20 in x86Int3 (emu=0x444640a0) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43884bdc in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 3 (Thread 0x447032f0 (LWP 10982)): #0 __libc_read (nbytes=16, buf=0x109f0a0, fd=15) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=15, buf=buf@entry=0x109f0a0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d6944 in my_read (fd=15, buf=0x109f0a0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8574 in iFipu (emu=0x44408998, fcn=1653434660) --Type for more, q to quit, c to continue without paging-- at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2317 #4 0x628a4a20 in x86Int3 (emu=0x44408998) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43884bdc in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 2 (Thread 0x443482f0 (LWP 10981)): #0 __libc_read (nbytes=16, buf=0xe8f270, fd=11) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=11, buf=buf@entry=0xe8f270, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d6944 in my_read (fd=11, buf=0xe8f270, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8574 in iFipu (emu=0x63d98b48, fcn=1653434660) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2317 #4 0x628a4a20 in x86Int3 (emu=0x63d98b48) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43884bdc in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0x40043ff0 (LWP 10979)): #0 __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 --Type for more, q to quit, c to continue without paging-- #1 __libc_read (fd=fd@entry=6, buf=buf@entry=0x72f050, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d6944 in my_read (fd=6, buf=0x72f050, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b8574 in iFipu (emu=0x63c3b050, fcn=1653434660) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2317 #4 0x628a4a20 in x86Int3 (emu=0x63c3b050) at /home/pi/box86/box86/src/emu/x86int3.c:298 Backtrace stopped: Cannot access memory at address 0x16 (gdb) ```
I also searched these other processes but didn't find references to "nanosleep", "pthread_mutex_lock", or "mutex". ``` 462 ? 00:00:07 winbindd 559 ? 00:00:01 winbindd 686 ? 00:00:00 pulseaudio 8435 ? 00:00:00 cupsd 8436 ? 00:00:00 cups-browsed 10948 pts/0 00:00:00 wine 10949 pts/0 00:00:01 ngen.exe 10951 ? 00:00:04 box86 10957 ? 00:00:00 services.exe 10960 ? 00:00:00 winedevice.exe 10962 pts/0 00:00:01 explorer.exe 10969 ? 00:00:00 plugplay.exe 10979 ? 00:00:02 winedevice.exe 10990 ? 00:00:00 svchost.exe 10996 pts/0 00:00:00 conhost.exe 10997 ? 00:00:00 kworker/3:1H 11000 pts/0 00:06:50 mscorsvw.exe 11004 ? 00:00:00 rpcss.exe ```
These were the other processes in my instance (I thought these might not have as much of a chance to find anything interesting): ``` 1 ? 00:00:09 systemd 2 ? 00:00:00 kthreadd 3 ? 00:00:00 rcu_gp 4 ? 00:00:00 rcu_par_gp 8 ? 00:00:00 mm_percpu_wq 9 ? 00:00:01 ksoftirqd/0 10 ? 00:00:32 rcu_sched 11 ? 00:00:00 migration/0 12 ? 00:00:00 cpuhp/0 13 ? 00:00:00 cpuhp/1 14 ? 00:00:00 migration/1 15 ? 00:00:00 ksoftirqd/1 18 ? 00:00:00 cpuhp/2 19 ? 00:00:00 migration/2 20 ? 00:00:05 ksoftirqd/2 23 ? 00:00:00 cpuhp/3 24 ? 00:00:00 migration/3 25 ? 00:00:00 ksoftirqd/3 28 ? 00:00:00 kdevtmpfs 29 ? 00:00:00 netns 32 ? 00:00:00 kauditd 33 ? 00:00:00 khungtaskd 34 ? 00:00:00 oom_reaper 35 ? 00:00:00 writeback 36 ? 00:00:00 kcompactd0 54 ? 00:00:00 kblockd 55 ? 00:00:00 blkcg_punt_bio 56 ? 00:00:00 watchdogd 57 ? 00:00:00 rpciod 58 ? 00:00:00 kworker/u9:0-hci0 59 ? 00:00:00 xprtiod 60 ? 00:00:00 kswapd0 61 ? 00:00:00 nfsiod 62 ? 00:00:00 kthrotld 63 ? 00:00:00 irq/55-aerdrv 64 ? 00:00:00 iscsi_eh 69 ? 00:00:00 DWC Notificatio 70 ? 00:00:00 uas 72 ? 00:00:00 vchiq-slot/0 73 ? 00:00:00 vchiq-recy/0 74 ? 00:00:00 vchiq-sync/0 75 ? 00:00:00 vchiq-keep/0 76 ? 00:00:00 SMIO 78 ? 00:00:00 sdhci 79 ? 00:00:00 irq/40-mmc0 80 ? 00:00:00 mmc_complete 82 ? 00:00:02 jbd2/mmcblk0p2- 83 ? 00:00:00 ext4-rsv-conver 84 ? 00:00:01 kworker/1:1H-kblockd 86 ? 00:00:00 ipv6_addrconf 103 ? 00:00:02 kworker/2:2H-kblockd 104 ? 00:00:00 scsi_eh_0 105 ? 00:00:00 scsi_tmf_0 106 ? 00:00:14 usb-storage 112 ? 00:00:01 kworker/3:2H-kblockd 118 ? 00:00:03 systemd-journal 122 ? 00:00:03 kworker/0:2H-kblockd 154 ? 00:00:01 systemd-udevd 195 ? 00:00:00 SMIO 207 ? 00:00:00 mmal-vchiq 210 ? 00:00:00 mmal-vchiq 213 ? 00:00:00 mmal-vchiq 215 ? 00:00:00 mmal-vchiq 237 ? 00:00:03 v3d_bin 240 ? 00:00:05 v3d_render 242 ? 00:00:00 v3d_tfu 243 ? 00:00:00 v3d_csd 245 ? 00:00:00 v3d_cache_clean 262 ? 00:00:00 cfg80211 265 ? 00:00:00 brcmf_wq/mmc1:0 266 ? 00:00:05 brcmf_wdog/mmc1 329 ? 00:00:01 systemd-timesyn 366 ? 00:01:42 avahi-daemon 367 ? 00:00:01 udisksd 369 ? 00:00:01 systemd-logind 371 ? 00:00:00 dbus-daemon 376 ? 00:00:00 avahi-daemon 379 ? 00:00:00 cron 381 ? 00:00:00 alsactl 393 ? 00:00:00 rsyslogd 402 ? 00:00:15 rngd 412 ? 00:00:01 wpa_supplicant 413 ? 00:00:03 thd 445 ? 00:00:00 dhcpcd 478 ? 00:00:00 polkitd 490 ? 00:00:00 lightdm 505 ? 00:00:00 sshd 516 ? 00:01:59 wpa_supplicant 544 tty7 00:02:07 Xorg 546 tty1 00:00:00 login 565 ? 00:00:00 lightdm 570 ? 00:00:00 systemd 571 ? 00:00:00 (sd-pam) 581 ? 00:00:06 lxsession 589 ? 00:00:00 dbus-daemon 615 ? 00:00:01 ssh-agent 626 ? 00:00:00 gvfsd 631 ? 00:00:00 gvfsd-fuse 645 ? 00:00:00 openbox 647 ? 00:00:00 lxpolkit 650 ? 00:08:22 lxpanel 652 ? 00:00:02 pcmanfm 658 ? 00:00:00 cmstart.sh 661 ? 00:00:00 ssh-agent 667 ? 00:00:00 xcompmgr 681 ? 00:00:00 kworker/u9:1-hci0 682 ? 00:00:00 hciattach 685 ? 00:00:00 applet.py 702 ? 00:00:05 rtkit-daemon 724 tty1 00:00:00 bash 728 ? 00:00:02 vncserverui 749 ? 00:00:00 gvfs-udisks2-vo 753 ? 00:00:00 vncserverui 754 ? 00:00:00 gvfs-mtp-volume 760 ? 00:00:00 gvfs-gphoto2-vo 762 ? 00:00:00 menu-cached 769 ? 00:00:00 gvfs-goa-volume 773 ? 00:00:00 gvfs-afc-volume 779 ? 00:00:00 gvfsd-trash 791 ? 00:00:00 krfcommd 802 ? 00:00:00 gvfsd-metadata 937 ? 00:00:00 colord 964 ? 00:00:12 lxterminal 970 pts/0 00:00:00 bash 1049 pts/1 00:00:00 bash 8792 ? 00:00:00 kworker/3:1-events 9262 ? 00:00:00 kworker/u8:1-cfg80211 9265 ? 00:00:00 kworker/1:2-events_power_efficient 9283 ? 00:00:00 kworker/2:1-events 10656 ? 00:00:00 kworker/2:0H-kblockd 10866 ? 00:00:00 kworker/0:0-events 10868 ? 00:00:00 kworker/1:2H 10947 ? 00:00:00 kworker/3:0-mm_percpu_wq 11033 ? 00:00:00 kworker/1:0-mm_percpu_wq 11034 ? 00:00:00 kworker/2:0-mm_percpu_wq 11051 ? 00:00:00 kworker/0:1+events 11052 ? 00:00:00 kworker/u8:0-events_unbound 11061 ? 00:00:00 kworker/0:1H 11077 pts/1 00:00:01 gdb 11081 ? 00:00:00 kworker/1:1-events 11082 ? 00:00:00 kworker/2:2-events_power_efficient 11083 ? 00:00:00 kworker/0:2-events 11084 ? 00:00:00 kworker/3:2-mm_percpu_wq 11085 ? 00:00:04 mousepad 11093 ? 00:00:00 dconf-service 11100 pts/2 00:00:00 bash 11105 pts/2 00:00:00 ps ```
WheezyE commented 3 years ago

With 00ac8ec1aa12d8679a619f38c54dc880b504a597 , the freeze persists but nanosleep is gone from the backtrace of winedevice.exe. Nice work! I’ll look for more nanosleeps or mutex errors today in a bit

WheezyE commented 3 years ago

Oh, my mistake: two winedevice.exe processes were run by ngen.

The second one still has the nanosleep: ``` pi@raspberrypi:~/box86 $ gdb -pid 18950 GNU gdb (Raspbian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 18950 [New LWP 18952] [New LWP 18953] [New LWP 18954] [New LWP 18957] [New LWP 18958] [New LWP 18959] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. (gdb) thread apply all bt Thread 7 (Thread 0x46bd52f0 (LWP 18959)): #0 __GI___poll (timeout=60000, nfds=2, fds=0x46c02f70) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x46c02f70, nfds=2, timeout=60000) at ../sysdeps/unix/sysv/linux/poll.c:26 Backtrace stopped: Cannot access memory at address 0x34 Thread 6 (Thread 0x469d12f0 (LWP 18958)): #0 __GI___poll (timeout=-1, nfds=2, fds=0x469d0ccc) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x469d0ccc, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26 #2 0x460b7a3c in ?? () from /lib/arm-linux-gnueabihf/libusb-1.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 5 (Thread 0x45efe2f0 (LWP 18957)): #0 __GI___nanosleep (remaining=0x45efda0c, requested_time=0x45efda14) at ../sysdeps/unix/sysv/linux/nanosleep.c:28 #1 __GI___nanosleep (requested_time=0x45efda14, remaining=0x45efda0c) at ../sysdeps/unix/sysv/linux/nanosleep.c:25 #2 0x452d1ad8 in ?? () from /lib/arm-linux-gnueabihf/libSDL2-2.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) --Type for more, q to quit, c to continue without paging-- Thread 4 (Thread 0x4500a2f0 (LWP 18954)): #0 __libc_read (nbytes=16, buf=0x147f2c0, fd=19) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=19, buf=buf@entry=0x147f2c0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d69b4 in my_read (fd=19, buf=0x147f2c0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85cc in iFipu (emu=0x44363dc8, fcn=1653434772) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a78 in x86Int3 (emu=0x44363dc8) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43817bdc in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 3 (Thread 0x446032f0 (LWP 18953)): #0 __libc_read (nbytes=16, buf=0x109f0a0, fd=15) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=15, buf=buf@entry=0x109f0a0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d69b4 in my_read (fd=15, buf=0x109f0a0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85cc in iFipu (emu=0x44308a20, fcn=1653434772) --Type for more, q to quit, c to continue without paging-- at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a78 in x86Int3 (emu=0x44308a20) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43817bdc in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 2 (Thread 0x442db2f0 (LWP 18952)): #0 __libc_read (nbytes=16, buf=0xe8f270, fd=11) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=11, buf=buf@entry=0xe8f270, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d69b4 in my_read (fd=11, buf=0xe8f270, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85cc in iFipu (emu=0x63751a90, fcn=1653434772) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a78 in x86Int3 (emu=0x63751a90) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43817bdc in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0x40058ff0 (LWP 18950)): #0 __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 --Type for more, q to quit, c to continue without paging-- #1 __libc_read (fd=fd@entry=6, buf=buf@entry=0x72f050, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d69b4 in my_read (fd=6, buf=0x72f050, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85cc in iFipu (emu=0x635f4050, fcn=1653434772) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a78 in x86Int3 (emu=0x635f4050) at /home/pi/box86/box86/src/emu/x86int3.c:298 Backtrace stopped: Cannot access memory at address 0x16 (gdb) ```
ptitSeb commented 3 years ago

With commit 017d82d16e919acc9e57c35fe850a289ffe722d7 I have changed again the Memory Protection and Dynablock handling.

I think it should have improve the behaviour (both in term of speed and stability) for C# / Mono / Unity3D software, so i think it's worth giving it a new try.

WheezyE commented 3 years ago

Thank you again for the update. I’m unfortunately still seeing the freeze (and the backtrace in winedevice.exe still says nanosleep) with 017d82d1

This happens with ngen.exe and RMS Express: (I’ve tried restarting the Pi too just in case.) ``` pi@raspberrypi:~/box86 $ gdb -pid 22761 #the second winedevice.exe after running ngen GNU gdb (Raspbian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 22761 [New LWP 22763] [New LWP 22764] [New LWP 22765] [New LWP 22768] [New LWP 22769] [New LWP 22770] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. (gdb) thread apply all bt Thread 7 (Thread 0x46b942f0 (LWP 22770)): #0 __GI___poll (timeout=60000, nfds=2, fds=0x46c02f70) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x46c02f70, nfds=2, timeout=60000) at ../sysdeps/unix/sysv/linux/poll.c:26 Backtrace stopped: Cannot access memory at address 0x34 Thread 6 (Thread 0x469902f0 (LWP 22769)): #0 __GI___poll (timeout=-1, nfds=2, fds=0x4698fccc) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x4698fccc, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26 #2 0x46076a3c in ?? () from /lib/arm-linux-gnueabihf/libusb-1.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 5 (Thread 0x45eb82f0 (LWP 22768)): #0 __GI___nanosleep (remaining=0x45eb795c, requested_time=0x45eb7964) at ../sysdeps/unix/sysv/linux/nanosleep.c:28 #1 __GI___nanosleep (requested_time=0x45eb7964, remaining=0x45eb795c) at ../sysdeps/unix/sysv/linux/nanosleep.c:25 #2 0x452d1ad8 in ?? () from /lib/arm-linux-gnueabihf/libSDL2-2.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) --Type for more, q to quit, c to continue without paging-- Thread 4 (Thread 0x450572f0 (LWP 22765)): #0 __libc_read (nbytes=16, buf=0x147f2c0, fd=19) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=19, buf=buf@entry=0x147f2c0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=19, buf=0x147f2c0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x44460718, fcn=1653434748) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x44460718) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43f250e0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 3 (Thread 0x447032f0 (LWP 22764)): #0 __libc_read (nbytes=16, buf=0x109f0a0, fd=15) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=15, buf=buf@entry=0x109f0a0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=15, buf=0x109f0a0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x44408540, fcn=1653434748) --Type for more, q to quit, c to continue without paging-- 6/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x44408540) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43f250e0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 2 (Thread 0x443a02f0 (LWP 22763)): #0 __libc_read (nbytes=16, buf=0xe8f270, fd=11) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=11, buf=buf@entry=0xe8f270, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=11, buf=0xe8f270, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x64b104e8, fcn=1653434748) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x64b104e8) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43f250e0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0x4009bff0 (LWP 22761)): #0 __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 --Type for more, q to quit, c to continue without paging-- #1 __libc_read (fd=fd@entry=6, buf=buf@entry=0x72f050, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=6, buf=0x72f050, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x649bd050, fcn=1653434748) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x649bd050) at /home/pi/box86/box86/src/emu/x86int3.c:298 Backtrace stopped: Cannot access memory at address 0x16 (gdb) ```
Here’s the second winedevice.exe after running RMS Express: ``` pi@raspberrypi:~ $ gdb -pid 1010 GNU gdb (Raspbian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 1010 [New LWP 1014] [New LWP 1015] [New LWP 1019] [New LWP 1022] [New LWP 1023] [New LWP 1024] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. (gdb) thread apply all bt Thread 7 (Thread 0x46c532f0 (LWP 1024)): #0 __GI___poll (timeout=60000, nfds=2, fds=0x46d02f70) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x46d02f70, nfds=2, timeout=60000) at ../sysdeps/unix/sysv/linux/poll.c:26 Backtrace stopped: Cannot access memory at address 0x34 Thread 6 (Thread 0x46a4f2f0 (LWP 1023)): #0 __GI___poll (timeout=-1, nfds=2, fds=0x46a4eccc) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 __GI___poll (fds=0x46a4eccc, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26 #2 0x46135a3c in ?? () from /lib/arm-linux-gnueabihf/libusb-1.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 5 (Thread 0x45f742f0 (LWP 1022)): #0 __GI___nanosleep (remaining=0x45f7395c, requested_time=0x45f73964) at ../sysdeps/unix/sysv/linux/nanosleep.c:28 #1 __GI___nanosleep (requested_time=0x45f73964, remaining=0x45f7395c) at ../sysdeps/unix/sysv/linux/nanosleep.c:25 #2 0x453d1ad8 in ?? () from /lib/arm-linux-gnueabihf/libSDL2-2.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) --Type for more, q to quit, c to continue without paging-- Thread 4 (Thread 0x451572f0 (LWP 1019)): #0 __libc_read (nbytes=16, buf=0x147f2c0, fd=19) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=19, buf=buf@entry=0x147f2c0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=19, buf=0x147f2c0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x44560ae0, fcn=1653434748) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x44560ae0) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43fed20c in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 3 (Thread 0x448032f0 (LWP 1015)): #0 __libc_read (nbytes=16, buf=0x109f0a0, fd=15) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=15, buf=buf@entry=0x109f0a0, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=15, buf=0x109f0a0, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x44508748, fcn=1653434748) --Type for more, q to quit, c to continue without paging-- at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x44508748) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43fed20c in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 2 (Thread 0x444682f0 (LWP 1014)): #0 __libc_read (nbytes=16, buf=0xe8f270, fd=11) at ../sysdeps/unix/sysv/linux/read.c:26 #1 __libc_read (fd=fd@entry=11, buf=buf@entry=0xe8f270, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=11, buf=0xe8f270, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x6371c990, fcn=1653434748) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x6371c990) at /home/pi/box86/box86/src/emu/x86int3.c:298 #5 0x43fed20c in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 1 (Thread 0x400e1ff0 (LWP 1010)): #0 __libc_read (nbytes=16, buf=0x72f050, fd=6) at ../sysdeps/unix/sysv/linux/read.c:26 --Type for more, q to quit, c to continue without paging-- #1 __libc_read (fd=fd@entry=6, buf=buf@entry=0x72f050, nbytes=nbytes@entry=16) at ../sysdeps/unix/sysv/linux/read.c:24 #2 0x628d699c in my_read (fd=6, buf=0x72f050, count=16) at /home/pi/box86/box86/src/wrapped/wrappedlibc.c:1586 #3 0x628b85b0 in iFipu (emu=0x635c9050, fcn=1653434748) at /home/pi/box86/box86/src/wrapped/generated/wrapper.c:2323 #4 0x628a4a20 in x86Int3 (emu=0x635c9050) at /home/pi/box86/box86/src/emu/x86int3.c:298 Backtrace stopped: Cannot access memory at address 0x16 (gdb) ```
ptitSeb commented 3 years ago

I don't understand why it would freeze. It's probably not what I thought it was initialy.

Can you test something? In scr/tools/bridge.c, comment all the pthread_mutex_lock(...) and pthread_mutex_unlock(..) you see try again.

WheezyE commented 3 years ago

Thanks! I’ll try this out this afternoon (about 4:30pm MST) after I get back from work

On Sat, Mar 27, 2021 at 7:46 AM ptitSeb @.***> wrote:

I don't understand why it would freeze. It's probably not what I thought it was initialy.

Can you test something? In scr/tools/bridge.c, comment all the pthread_mutex_lock(...) and pthread_mutex_unlock(..) you see try again.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ptitSeb/box86/issues/217#issuecomment-808735477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHCGVPWZ3HN6ENCWQYPXGXLTFXOUHANCNFSM4SECK3RQ .

WheezyE commented 3 years ago

Alright, I made a fork of the box86 repo, commented out two lines, and did the box86 build instructions but with the fork under my github name. I'm still getting the freeze and same nanosleep backtrace in winedevice.exe.

I re-tested my commit bisect too just to make sure it's reproducible (6409f5d4 doesn't have the freeze, d3d431d5 still has the freeze). I also tested the latest 9bf5c20a9a2bb576f6436aee678c3c87768b992e and still had the freeze.

ptitSeb commented 3 years ago

What is strange is that commit d3d431d5b1cbe0fd051a9a2560ae75748a854ced basicaly added a mutex around Memory Protection access, and with commit 017d82d16e919acc9e57c35fe850a289ffe722d7 I completly removed it. So the freeze must be something else now.

WheezyE commented 3 years ago

I'll try to make another box86 fork and try going through different commits while patching out d3d431d on each commit along the way to see if that helps. I got kind of busy yesterday, but I'll see if I can work on this today and/or tomorrow

WheezyE commented 3 years ago

I guess I'm kinda stuck lol. I'll try to circle back around to this

WheezyE commented 3 years ago

Thanks again for trying to get this running. I really appreciate it! I built bd48cae19f32dc18b0c94b4af7a0bbd684bdef07 and ran it, restarted me pi, ran again, but still getting the same freeze in RMS Express and ngen.

I’ve been trying to fork and then branch box86 from the commit before d3d431d5b1cbe0fd051a9a2560ae75748a854ced to try to see if adding your code changes (not including d3d431d) would allow us to find which other commit might be causing the freeze in ngen, but I’ve been running into problems with just not knowing how to use GitHub correctly

bbbruni commented 3 years ago

Hello!

I had a similar problem with a hidden buggy commit in wine a few years ago. There was a game that had worked correctly before a wine developer introduced some regression. I created a bug report on wine bugzilla. On the bug report page, that developer said he had committed a fix before I created the report. Then, we found out that the fix had not solved the regression because there was another buggy commit between those two. There was another commit he had accidentally overlooked.

See https://bugs.winehq.org/show_bug.cgi?id=28491#c6 and below.

We determined the right buggy commit there eventually and the developer fixed the regression.

ptitSeb says that the problematic d3d431d5b1cbe0fd051a9a2560ae75748a854ced was cancelled by 017d82d16e919acc9e57c35fe850a289ffe722d7 here.

So you may try to do what we did on wine bugzilla.

Download box86 into a new location, then make sure you use fresh wine prefix and run:

git clone https://github.com/ptitSeb/box86

git checkout d3d431d5b1cbe0fd051a9a2560ae75748a854ced git cherry-pick 017d82d16e919acc9e57c35fe850a289ffe722d7

cd box86 mkdir build; cd build; cmake .. -DRPI4=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j4 sudo make install sudo systemctl restart systemd-binfmt

Say if you observe the freeze after that. Regards.

WheezyE commented 3 years ago

I super appreciate the help and advice. I'd heard of cherry-picking but wasn't really sure of the use-case for it. When I cherry pick in this case though, I'm running into some conflicts with the upstream "Removed lock on Memory Protection," commit (I'll see if I can resolve the conflicts, but I'm kind of a C noob). This gives me some ideas though for maybe trying other functions like revert?

EDIT: I tried deleting all my box86 build folders again (like you suggested to start from scratch) and now github is letting me build from my bugfinder branch of my box86 fork. Not sure why this is the case, but I've been able to patch out d3d431d and continue adding Seb's other commits sequentially. (My builds seem to not be freezing so far without d3d431d, but I'll keep adding commits to see if there's a second freeze point).

Thank you both again!

bbbruni commented 3 years ago

Do you have prior experience in bisecting git repos?

WheezyE commented 3 years ago

I've heard of the general process, though I haven't actually used git to do it. I usually "bisect" manually using sort of like a "method of limits" (for lack of a better term) by gradually decreasing my search range before and after a bug I've found.

etc generally narrowing my search down. I think this is what git does too though just with a script.

WheezyE commented 3 years ago

I've been adding old commits by hand one at a time to my fork/branch of box86 (my branch starts at 6409f5d40a26f115d2c0034f25d7b5cbb7131048 and doesn't have d3d431d, but has later commits), but I hit a roadblock with adding the 4e5473150a9e76d427c3946a115f8ede554579b5 commit (seems like I broke box86 somehow). I'll try to reconcile the differences, but I might be stuck again.

So far, I can say that Box86 loads RMS express if d3d431d is patched out of commits between d3d431d and 4e5473150a9e76d427c3946a115f8ede554579b5.

bbbruni commented 3 years ago

Okay. You had dynarec enabled all the way, right?

Then clean up wine and box86 and git directories (paths may vary):

cd box86 rm -rf .git rm -rf .wine cd .. && rm -rf box86

Then run:

git clone https://github.com/ptitSeb/box86

git checkout 4e54731 git cherry-pick c254dc3121dea773677d4fcbbe204a497a009aa5

cd box86 mkdir build; cd build; cmake .. -DRPI4=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j4 sudo make install sudo systemctl restart systemd-binfmt

Say if you observe a broken compilation or broken merge or freeze after that.

EDIT: MY BAD.

git clone https://github.com/ptitSeb/box86

git checkout 4e54731 git cherry-pick c254dc3121dea773677d4fcbbe204a497a009aa5

cd box86 mkdir build; cd build; cmake .. -DRPI4=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j4 sudo make install sudo systemctl restart systemd-binfmt

Say if you observe a broken compilation or broken merge or freeze after that.

Then

Then run:

git clone https://github.com/ptitSeb/box86

git checkout 4e54731 git cherry-pick c254dc3121dea773677d4fcbbe204a497a009aa5 git cherry-pick 017d82d

cd box86 mkdir build; cd build; cmake .. -DRPI4=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j4 sudo make install sudo systemctl restart systemd-binfmt

Say if you observe a broken compilation or broken merge or freeze after that.

If that doesn't help, we will try doing bisect.

You have to do two consequent test: 1st with one cherry-pick c254dc3121dea773677d4fcbbe204a497a009aa5

Then clean up all

2nd with two consequent cherry-picks cherry-pick c254dc3121dea773677d4fcbbe204a497a009aa5 && cherry-pick 017d82d

Please write if you understood it. Regards.

WheezyE commented 3 years ago

I never did try the cherry picks since my previous experience with them ran into ‘collisions’ with code and since I’d been kind of already doing my own version of cherry-picking with my own branch of box86, but I did appreciate the help and ideas with those. I kind of got frustrated and decided to take a break with Winlink for a bit. Thank you though for the suggestions

WheezyE commented 3 years ago

So, after seeing on the discord that people were installing .net 4+ successfully, I decided to reflash my Pi4 and start over in case my testing environment was borked somehow. I updated box86 and was successfully able to install dotnet35sp1 with no ngen errors!! I did have to turn off dynarec and install was 90+ minutes. I’m wondering if this had been fixed earlier and it was just errors I was encountering in my old wineprefix (I had installed dotnet with an older box86 commit and then upgraded to test to see if ngen would register files or if Winlink would run with newer box86 commits).

I can’t believe ngen isn’t hanging anymore. I am encountering some fresh errors though: A freeze happens with dynarec on.

With dynarec off and log=1 I get... ``` 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {861f5339-19d6-4873-b350-7b03228bda7c} 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00E1B440, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} 17625|SIGSEGV @0x62872294 (???(/usr/local/bin/box86/0x62872294)) (x86pc=0x79f0a502/???:"???", esp=0x31fce0, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fd04), for accessing 0x30a0008 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17625|SIGSEGV @0x62876544 (???(/usr/local/bin/box86/0x62876544)) (x86pc=0x79f9efd2/???:"???", esp=0x31fc00, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc1c), for accessing 0x10a0014 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17625|SIGSEGV @0x62876544 (???(/usr/local/bin/box86/0x62876544)) (x86pc=0x79f9efd2/???:"???", esp=0x31fbfc, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc18), for accessing 0x20a0014 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17625|SIGSEGV @0x62872294 (???(/usr/local/bin/box86/0x62872294)) (x86pc=0x79e8c8ec/???:"???", esp=0x31fc30, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc30), for accessing 0x10a1018 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17625|SIGSEGV @0x62872294 (???(/usr/local/bin/box86/0x62872294)) (x86pc=0x79e8c8ec/???:"???", esp=0x31fc30, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc30), for accessing 0x20a1000 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17625|SIGSEGV @0x62878230 (???(/usr/local/bin/box86/0x62878230)) (x86pc=0x79f9a320/???:"???", esp=0x31fb38, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fb64), for accessing 0x30f0060 (code=2/prot=5), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17625|Double SIGSEGV (code=2, pc=0x62878230, addr=0x30f0060)! Library libtinfo.so.6 (0x648bc140) needs 0x648b9d10, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x648fe2c0, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x648def68, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x648f5a60, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x648887e0, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x64869e00, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x648388d0, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x64835678, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x6481eee8, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x64819ff0, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x647f43c8, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x647c6a98, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x647bb928, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x647961a0, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x647511e8, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x64715008, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x64704be8, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x646e8308, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x64694660, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x64638488, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x6465d760, but it was not found. Ignoring. Library libm.so.6 (0x64641738) needs 0x6462d5a0, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x648fe2c0, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x648def68, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x648f5a60, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x648887e0, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x64869e00, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x648388d0, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x64835678, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x6481eee8, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x64819ff0, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x647f43c8, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x647c6a98, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x647bb928, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x647961a0, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x647511e8, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x64715008, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x64704be8, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x646e8308, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x64694660, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x64638488, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x6465d760, but it was not found. Ignoring. Library libc.so.6 (0x64635ad0) needs 0x6462d5a0, but it was not found. Ignoring. Library libwine.so.1 (0x64629660) needs 0x6462d5a0, but it was not found. Ignoring. Library libpthread.so.0 (0x64635db0) needs 0x6462d5a0, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x648fe2c0, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x64869e00, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x6481eee8, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x647c6a98, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x647511e8, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x64715008, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x64638488, but it was not found. Ignoring. Library libdl.so.2 (0x6462ca28) needs 0x6462d5a0, but it was not found. Ignoring. Stop waiting for remaining thread 17671 Stop waiting for remaining thread 17672 17671|SIGSEGV @0x62873bc4 (???(/usr/local/bin/box86/0x62873bc4)) (x86pc=0x405bc394/???:"???", esp=0x108dfd0, stack=0xf90000:0x1094000 own=(nil) fp=0x108dff8), for accessing 0x405bc394 (code=1/prot=7), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17671|SIGSEGV @0x6286dd70 (???(/usr/local/bin/box86/0x6286dd70)) (x86pc=0x405bf580/???:"???", esp=0x3fff7ca0, stack=0xf90000:0x1094000 own=(nil) fp=0x108dff8), for accessing 0x405bf580 (code=1/prot=7), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 17671|Double SIGSEGV (code=1, pc=0x6286dd70, addr=0x405bf580)! pi@raspberrypi:~/.wine/drive_c/RMS Express $ 00c4:fixme:service:QueryServiceConfig2W Level 6 not implemented 00c4:fixme:service:QueryServiceConfig2W Level 6 not implemented 00b8:fixme:msvcrt:__clean_type_info_names_internal (0x64082a5c) stub ```
ptitSeb commented 3 years ago

The "Library libXXXX needs YYYYY, but it was not found" is ok, that's part of the new "quit" protocol...

The SIGSEGV with code=2 and prot!=0 can be normal, especially with .NET stuff. A Double SIGSEGV should not happens, I'll check that. Can you do addr2line -e /usr/local/bin/box86 -a 0x62872294 with the same box86 build that was used with the trace?

WheezyE commented 3 years ago

Thank again you for looking into it. Here are those addresses


pi@raspberrypi:~/.wine/drive_c/RMS Express $ addr2line -e /usr/local/bin/box86 -a 0x62872294
0x62872294
/home/pi/box86/box86/src/emu/x86run.c:673 (discriminator 22)
pi@raspberrypi:~/.wine/drive_c/RMS Express $ addr2line -e /usr/local/bin/box86 -a 0x6286dd70                                     
0x6286dd70
/home/pi/box86/box86/src/emu/x86run.c:192
pi@raspberrypi:~/.wine/drive_c/RMS Express $ addr2line -e /usr/local/bin/box86 -a 0x62873bc4
0x62873bc4
/home/pi/box86/box86/src/emu/x86run.c:899
pi@raspberrypi:~/.wine/drive_c/RMS Express $ addr2line -e /usr/local/bin/box86 -a 0x62875330
0x62875330
/home/pi/box86/box86/src/emu/x86run.c:1570
WheezyE commented 3 years ago

In case it helps, I ran this again and got this this time:


Library libdl.so.2 (0x6396aa28) needs 0x6396b5a0, but it was not found. Ignoring.
Stop waiting for remaining thread 19896
Stop waiting for remaining thread 19897
19897|SIGSEGV @0x62875330 (???(/usr/local/bin/box86/0x62875330)) (x86pc=0x7bc8022f/�M�cp��c:"???", esp=0x323e840, stack=0x3140000:0x3244000 own=(nil) fp=0x323e858), for accessing 0x405b66a8 (code=1/prot=7), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0)
19896|SIGSEGV @0x62873bc4 (???(/usr/local/bin/box86/0x62873bc4)) (x86pc=0x40580394/???:"???", esp=0x108dfd0, stack=0xf90000:0x1094000 own=(nil) fp=0x108dff8), for accessing 0x40580394 (code=1/prot=7), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0)
19896|SIGSEGV @0x6286dd70 (???(/usr/local/bin/box86/0x6286dd70)) (x86pc=0x40583580/???:"???", esp=0x3fff7ca0, stack=0xf90000:0x1094000 own=(nil) fp=0x108dff8), for accessing 0x40583580 (code=1/prot=7), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0)
19896|Double SIGSEGV (code=1, pc=0x6286dd70, addr=0x40583580)!
WheezyE commented 3 years ago

Alright, new commits, more progress, another hurdle: Working from b588709ad; Methods and logs below.

I think that when dynarec is off and log level is 1, these parts of the dotnet35sp1 installer are probably ngen attempting to register "native images" of files: ``` 07a0:fixme:ntdll:EtwRegisterTraceGuidsW (7A03261A, 00A5D7D0, {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 14, 7A3BEE40, (null), (null), 7A3BDC70): stub 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {044973cd-251f-4dff-a3e9-9d6307286b05} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {3044f61a-99b0-4c21-b203-d39423c73b00} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {d00792da-07b7-40f5-97eb-5d974e054740} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {cfc4ba53-fb42-4757-8b70-5f5d51fee2f4} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {efdf1eac-1d5d-4e84-893a-19b80f692176} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c71408de-42cc-4f81-9c93-b8912abf2a0f} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {840c8456-6457-4eb7-9cd0-d28f01c64f5e} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c424b3e3-2ae0-416e-a039-410c5d8e5f14} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {300ce105-86d1-41f8-b9d2-83fcbff32d99} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {561410f5-a138-4ab3-945e-516483cddfbc} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {15447a14-b523-46ae-b75b-023f900b4393} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {b17304d9-5afa-4da6-9f7b-5a4fa73129b6} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {02d08a4f-fd01-4538-989b-03e437b950f4} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {861f5339-19d6-4873-b350-7b03228bda7c} 07a0:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00A5D7D0, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 07a0:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} 02c8:err:rpc:I_RpcReceive we got fault packet with status 0x80000101 046c:fixme:ole:NdrClearOutParameters (00DBF004,00A7B742,00DBF748): stub 046c:err:ole:ifproxy_release_public_refs IRemUnknown_RemRelease failed with error 0x800706be 046c:err:ole:ifproxy_release_public_refs IRemUnknown_RemRelease failed with error 0x800706ba 0808:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION ```
And these frozen parts of both RMS\ Express.exe & ngen.exe, which look very similar, might be .net's ngen crashing when it tries to register "native images": ``` ...(various loaded .so files)... 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A03261A, 00E19D20, {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}, 14, 7A3BEE40, (null), (null), 7A3BDC70): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {044973cd-251f-4dff-a3e9-9d6307286b05} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {3044f61a-99b0-4c21-b203-d39423c73b00} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {d00792da-07b7-40f5-97eb-5d974e054740} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {cfc4ba53-fb42-4757-8b70-5f5d51fee2f4} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {efdf1eac-1d5d-4e84-893a-19b80f692176} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c71408de-42cc-4f81-9c93-b8912abf2a0f} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {840c8456-6457-4eb7-9cd0-d28f01c64f5e} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {c424b3e3-2ae0-416e-a039-410c5d8e5f14} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {300ce105-86d1-41f8-b9d2-83fcbff32d99} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {561410f5-a138-4ab3-945e-516483cddfbc} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {15447a14-b523-46ae-b75b-023f900b4393} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {b17304d9-5afa-4da6-9f7b-5a4fa73129b6} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {02d08a4f-fd01-4538-989b-03e437b950f4} 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {861f5339-19d6-4873-b350-7b03228bda7c} 0024:fixme:ntdll:EtwRegisterTraceGuidsW (7A030638, 00E19D20, {cc2bcbba-16b6-4cf3-8990-d74c2e8af500}, 1, 7A3BEE38, (null), (null), 7A3BDC78): stub 0024:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {ea40c74d-4f65-4561-bb26-656231c8967f} Using emulated /home/pi/wine/lib/wine/shell32.dll.so 30614|SIGSEGV @0x62877234 (???(/usr/local/bin/box86/0x62877234)) (x86pc=0x79f0a502/???:"???", esp=0x31fce0, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fd04), for accessing 0x30a0008 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 30614|SIGSEGV @0x628715a0 (???(/usr/local/bin/box86/0x628715a0)) (x86pc=0x79f9efd2/???:"???", esp=0x31fc00, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc1c), for accessing 0x10a0014 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 30614|SIGSEGV @0x628715a0 (???(/usr/local/bin/box86/0x628715a0)) (x86pc=0x79f9efd2/???:"???", esp=0x31fbfc, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc18), for accessing 0x20a0014 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 30614|SIGSEGV @0x62877234 (???(/usr/local/bin/box86/0x62877234)) (x86pc=0x79e8c8ec/???:"???", esp=0x31fc30, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc30), for accessing 0x10a1018 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 30614|SIGSEGV @0x62877234 (???(/usr/local/bin/box86/0x62877234)) (x86pc=0x79e8c8ec/???:"???", esp=0x31fc30, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fc30), for accessing 0x20a1000 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 30614|SIGSEGV @0x62879d18 (???(/usr/local/bin/box86/0x62879d18)) (x86pc=0x79f9a320/???:"???", esp=0x31fb38, stack=0x40bed000:0x413ed000 own=(nil) fp=0x31fb64), for accessing 0x30f0060 (code=2/prot=5), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) 30614|Double SIGSEGV (code=2, pc=0x62879d18, addr=0x30f0060)! ```

dotnet35sp1 (fresh wineprefixes)

Winlink (using dotnet35sp1 successfully installed prefix above - no other winetricks components were installed) still freezing - I believe from ngen failing to register native images

v2 ngen.exe (using dotnet35sp1 successfully installed prefix above) - freezes

WheezyE commented 3 years ago

Ah the ngen.exe & winlink crashes both begin with 0x62877234 sigsegv's

pi@raspberrypi:~ $ addr2line -e /usr/local/bin/box86 -a 0x62877234
0x62877234
/home/pi/box86/box86/src/emu/x86run.c:673 (discriminator 22)
pi@raspberrypi:~ $