https://bugs.winehq.org/show_bug.cgi?id=49254
Bug ID: 49254 Summary: Firefox 76.0 for win64-aarch64 crashes on startup (unwinding for "set thread name" MSVC exception 0x406D1388 fails) Product: Wine Version: 5.9 Hardware: aarch64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
as it says.
Download:
https://web.archive.org/web/20200526201306/https://archive.mozilla.org/pub/f...
--- snip --- $ WINEDEBUG=+seh,+relay,+ntdll,+module wine64 ./firefox.exe >>log.txt 2>&1 ... 00f8:Starting thread proc 0x4c6ceb0 (arg=0x12e1d100) 00f8:Call ntdll.RtlAcquireSRWLockExclusive(12e1d110) ret=04c6ced4 00f8:Ret ntdll.RtlAcquireSRWLockExclusive() retval=12e1d110 ret=04c6ced4 00f8:Call ntdll.RtlReleaseSRWLockExclusive(12e1d110) ret=04c6cee4 00f8:Ret ntdll.RtlReleaseSRWLockExclusive() retval=12e1d110 ret=04c6cee4 00f8:Call ntdll.NtCurrentTeb() ret=7fbe306220 00f8:Ret ntdll.NtCurrentTeb() retval=7ff9c000 ret=7fbe306220 00f8:Call KERNEL32.RaiseException(406d1388,00000000,00000003,14ebfe08) ret=04bb70f4 00f8:Call kernelbase.RaiseException(406d1388,00000000,00000003,14ebfe08) ret=7fbea40780 00f8:Call ntdll.memcpy(14ebfc38,14ebfe08,00000018) ret=7fbe21bc40 00f8:Ret ntdll.memcpy() retval=14ebfc38 ret=7fbe21bc40 00f8:trace:seh:raise_exception code=406d1388 flags=0 addr=0x7fbea55ff8 pc=7fbea55ff8 tid=00f8 00f8:trace:seh:raise_exception info[0]=0000000000001000 00f8:trace:seh:raise_exception info[1]=0000000007011630 00f8:trace:seh:raise_exception info[2]=00000000000000f8 00f8:trace:seh:raise_exception x0=ffffff80ffffffc8 x1=0000000000000002 x2=0000000000000000 x3=0000000000000000 00f8:trace:seh:raise_exception x4=0000000014edf2e8 x5=0000000014edf0e0 x6=0000000014edf0e0 x7=70636d656d2e6c6c 00f8:trace:seh:raise_exception x8=0000000000000000 x9=0000007fbea55fdc x10=3d6c617674657220 x11=3833636662653431 00f8:trace:seh:raise_exception x12=6266373d74657220 x13=0a30346362313265 x14=0000000000000032 x15=0000000000000000 00f8:trace:seh:raise_exception x16=0000007fbeaed0f0 x17=0000007fbec7f978 x18=000000007ff9c000 x19=0000000014ebfc18 00f8:trace:seh:raise_exception x20=0000000014ebfd40 x21=0000000000220367 x22=0000007fbe2a92c0 x23=0000000000000000 00f8:trace:seh:raise_exception x24=0000000000000000 x25=0000000000000000 x26=0000000000000000 x27=0000000000000000 00f8:trace:seh:raise_exception x28=0000000000000000 fp=0000000014ebfc00 lr=0000007fbea55ff8 sp=0000000014ebfc10 00f8:trace:seh:call_vectored_handlers calling handler at 0x59c24e0 code=406d1388 flags=0 00f8:trace:seh:call_vectored_handlers handler at 0x59c24e0 returned 0 00f8:trace:seh:libunwind_virtual_unwind ip 0x7fbea55ff8 function 0x7fbea55fdc-0x7fbea56024 personality 0 lsda 0 fde 0 00f8:trace:seh:libunwind_virtual_unwind next function pc=0000007fbe21bc50 00f8:trace:seh:libunwind_virtual_unwind x0=ffffff80ffffffc8 x1=0000000000000002 x2=0000000000000000 x3=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x4=0000000014edf2e8 x5=0000000014edf0e0 x6=0000000014edf0e0 x7=70636d656d2e6c6c 00f8:trace:seh:libunwind_virtual_unwind x8=0000000000000000 x9=0000007fbea55fdc x10=3d6c617674657220 x11=3833636662653431 00f8:trace:seh:libunwind_virtual_unwind x12=6266373d74657220 x13=0a30346362313265 x14=0000000000000032 x15=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x16=0000007fbeaed0f0 x17=0000007fbec7f978 x18=000000007ff9c000 x19=0000000014ebfd40 00f8:trace:seh:libunwind_virtual_unwind x20=0000000014ebfd40 x21=0000000000220367 x22=0000007fbe2a92c0 x23=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x24=0000000000000000 x25=0000000000000000 x26=0000000000000000 x27=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x28=0000000000000000 fp=0000000014ebfcb0 lr=0000007fbe21bc50 sp=0000000014ebfc10 00f8:trace:seh:libunwind_virtual_unwind ip 0x7fbe21bc50 function 0x7fbe21bbf4-0x7fbe21bc5c personality 0 lsda 0 fde 0 00f8:trace:seh:libunwind_virtual_unwind next function pc=0000007fbea40780 00f8:trace:seh:libunwind_virtual_unwind x0=ffffff80ffffffc8 x1=0000000000000002 x2=0000000000000000 x3=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x4=0000000014edf2e8 x5=0000000014edf0e0 x6=0000000014edf0e0 x7=70636d656d2e6c6c 00f8:trace:seh:libunwind_virtual_unwind x8=0000000000000000 x9=0000007fbea55fdc x10=3d6c617674657220 x11=3833636662653431 00f8:trace:seh:libunwind_virtual_unwind x12=6266373d74657220 x13=0a30346362313265 x14=0000000000000032 x15=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x16=0000007fbeaed0f0 x17=0000007fbec7f978 x18=000000007ff9c000 x19=0000000014ebfd40 00f8:trace:seh:libunwind_virtual_unwind x20=0000000014ebfd40 x21=0000000000220367 x22=0000007fbe2a92c0 x23=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x24=0000000000000000 x25=0000000000000000 x26=0000000000000000 x27=0000000000000000 00f8:trace:seh:libunwind_virtual_unwind x28=0000000000000000 fp=0000000014ebfcc0 lr=0000007fbea40780 sp=0000000014ebfcc0 00f8:trace:seh:libunwind_virtual_unwind no info found for 7fbea40780 ip 7fbe21bbf4-7fbe21bc5c, assuming leaf function 00f8:trace:seh:libunwind_virtual_unwind no info found for 7fbea40780 ip 7fbe21bbf4-7fbe21bc5c, assuming leaf function ... 00f8:trace:seh:libunwind_virtual_unwind no info found for 7fbea40780 ip 7fbe21bbf4-7fbe21bc5c, assuming leaf function 00f8:trace:seh:call_function_handlers found wine frame 0x14ebfee0 rsp 14ebfee8 handler 0x7fbea70e40 00f8:trace:seh:call_teb_handler calling TEB handler 0x7fbea70e40 (rec=0x14ebfc18, frame=0x14ebfee0 context=0x14ebec40, dispatch=0x14ebeb00) 00f8:Call kernelbase.UnhandledExceptionFilter(14ebeac0) ret=7fbea13d78 00f8:Call ntdll.NtCurrentTeb() ret=7fbe21c04c 00f8:Ret ntdll.NtCurrentTeb() retval=7ff9c000 ret=7fbe21c04c 00f8:Call ntdll.RtlEnterCriticalSection(0766b490) ret=04a4a9e4 00f8:Ret ntdll.RtlEnterCriticalSection() retval=00000000 ret=04a4a9e4 00f8:Call KERNEL32.SetUnhandledExceptionFilter(14003ec30) ret=04a3f89c 00f8:Call kernelbase.SetUnhandledExceptionFilter(14003ec30) ret=7fbea40780 00f8:Ret kernelbase.SetUnhandledExceptionFilter() retval=04a4a1b0 ret=7fbea40780 00f8:Ret KERNEL32.SetUnhandledExceptionFilter() retval=04a4a1b0 ret=04a3f89c 00f8:Call ucrtbase._set_invalid_parameter_handler(00000000) ret=04a4aa40 00f8:Ret ucrtbase._set_invalid_parameter_handler() retval=04a4a2e0 ret=04a4aa40 00f8:Call ucrtbase._set_purecall_handler(00000000) ret=04a4aa4c 00f8:Ret ucrtbase._set_purecall_handler() retval=04a4a490 ret=04a4aa4c --- snip ---
The Firefox executable contains PE exception/unwind information. The problem seems rather with libunwind and builtins. Didn't look further yet tho.
Wine was built with Clang C/C++ cross compiler, integrated with a custom/self-built Yocto/Poky distro for HiKey960 platform, producing traditional ELF executables (no llvm-mingw/PE).
--- snip --- $ $CLANGCC -v
clang version 7.0.0 (https://github.com/llvm-mirror/clang.git 0513b409d5e34b2d2a28ae21b6d620cc52de0e57) (https://github.com/llvm-mirror/llvm.git 65ce2e56889af84e8be8e311f484a4dfe4b62d7a) Target: aarch64-poky-linux Thread model: posix InstalledDir: /home/focht/projects/poky/sdk-install/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux Found candidate GCC installation: /home/focht/projects/poky/sdk-install/sysroots/aarch64-poky-linux/usr/lib64//aarch64-poky-linux/8.2.0 Found candidate GCC installation: /home/focht/projects/poky/sdk-install/sysroots/aarch64-poky-linux/usr/lib64/gcc/aarch64-poky-linux/8.2.0 Selected GCC installation: /home/focht/projects/poky/sdk-install/sysroots/aarch64-poky-linux/usr/lib64//aarch64-poky-linux/8.2.0 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 --- snip ---
Note: The "bootstrapper" installer from the website is win64-aarch64. When run on target hw, it unwraps another installer which is x86 and tries to start it. This obviously can't work on aarch64 Linux / Wine. You can just unpack the bootstrapper and run win64-aarch64 Firefox directly, bypassing the intermediate x86 installer.
--- snip --- $ 7z l Firefox\ Setup\ 76.0.exe
Scanning the drive for archives: 1 file, 77689880 bytes (75 MiB)
Listing archive: Firefox Setup 76.0.exe
-- Path = Firefox Setup 76.0.exe Type = PE Physical Size = 77689880 CPU = 0xAA64 64-bit = + Characteristics = Executable LargeAddress Created = 2019-09-23 20:08:10 Headers Size = 1024 Checksum = 77712930 Name = 7zSD.sfx Image Size = 360448 Section Alignment = 4096 File Alignment = 512 Code Size = 181760 Initialized Data Size = 166912 Uninitialized Data Size = 0 Linker Version = 14.22 OS Version = 6.2 Image Version = 0.0 Subsystem Version = 6.2 Subsystem = Windows GUI DLL Characteristics = Relocated NX-Compatible TerminalServerAware 0x20 Stack Reserve = 1048576 Stack Commit = 4096 Heap Reserve = 1048576 Heap Commit = 4096 Image Base = 5368709120 Comment = FileVersion: 18.5.0.0 FileVersion: 18.05 ProductVersion: 18.5.0.0 ProductVersion: 18.05 CompanyName: Mozilla FileDescription: Firefox InternalName: 7zSD.sfx LegalCopyright: Mozilla OriginalFilename: 7zSD.sfx ProductName: Firefox ---- Path = [0] Size = 77345104 Packed Size = 77345104 Virtual Size = 77345104 Offset = 335872 -- Path = [0] Type = 7z Offset = 81 Physical Size = 77345022 Tail Size = 1 Headers Size = 1387 Method = LZMA:25 BCJ2 Solid = + Blocks = 1
Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ ------------------------ 2020-04-29 22:42:06 ....A 2312 77343635 core/precomplete 2020-04-29 22:42:07 ....A 16 core/removed-files 2020-04-29 22:42:06 ....A 23037 core/browser/VisualElements/VisualElements_150.png 2020-04-29 22:42:06 ....A 8763 core/browser/VisualElements/VisualElements_70.png 2020-04-29 22:42:06 ....A 58010 core/browser/features/doh-rollout@mozilla.org.xpi 2020-04-29 22:42:06 ....A 639608 core/browser/features/formautofill@mozilla.org.xpi 2020-04-29 22:42:06 ....A 340280 core/browser/features/screenshots@mozilla.org.xpi 2020-04-29 22:42:06 ....A 26397 core/browser/features/webcompat-reporter@mozilla.org.xpi 2020-04-29 22:42:06 ....A 110202 core/browser/features/webcompat@mozilla.org.xpi 2020-04-29 22:42:07 ....A 557 core/firefox.VisualElementsManifest.xml 2020-04-29 22:42:06 ....A 429 core/defaults/pref/channel-prefs.js 2020-04-29 22:42:07 ....A 887 core/application.ini 2020-04-29 22:42:06 ....A 787 core/browser/crashreporter-override.ini 2020-04-29 22:42:06 ....A 4003 core/crashreporter.ini 2020-04-29 22:42:07 ....A 164 core/platform.ini 2020-04-29 22:42:07 ....A 132 core/update-settings.ini 2020-04-29 22:42:06 ....A 1245 core/updater.ini 2020-04-29 22:42:06 ....A 1244336 core/fonts/TwemojiMozilla.ttf 2020-04-29 22:42:06 ....A 239816 core/crashreporter.exe 2020-04-29 22:42:06 ....A 120008 core/default-browser-agent.exe 2020-04-29 22:42:06 ....A 547016 core/firefox.exe 2020-04-29 22:42:07 ....A 957640 core/uninstall/helper.exe 2020-04-29 22:42:07 ....A 234696 core/maintenanceservice.exe 2020-04-29 22:42:06 ....A 162536 core/maintenanceservice_installer.exe 2020-04-29 22:42:06 ....A 698568 core/minidump-analyzer.exe 2020-04-29 22:42:06 ....A 74440 core/pingsender.exe ... 2020-04-29 22:42:06 D.... 0 0 core/browser/VisualElements 2020-04-29 22:42:06 D.... 0 0 core/browser/features 2020-04-29 22:42:06 D.... 0 0 core/browser 2020-04-29 22:42:07 D.... 0 0 core ------------------- ----- ------------ ------------ ------------------------ 2020-04-29 22:42:07 289972447 77343635 69 files, 13 folders --- snip ---
$ sha1sum Firefox\ Setup\ 76.0.exe 27c4abd83cf6bd20e0fe1982709c3a35902cad1a Firefox Setup 76.0.exe
$ du -sh Firefox\ Setup\ 76.0.exe 75M Firefox Setup 76.0.exe
$ wine --version wine-5.9
Regards
https://bugs.winehq.org/show_bug.cgi?id=49254
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://web.archive.org/web | |/20200526201306/https://arc | |hive.mozilla.org/pub/firefo | |x/releases/76.0/win64-aarch | |64/en-US/Firefox%20Setup%20 | |76.0.exe
https://bugs.winehq.org/show_bug.cgi?id=49254
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=49254
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
recent commits from Martin to address unwinding for aarch64:
--- snip --- $ git log --pretty=format:"%n%h %s" --author "Martin Storsjo" --since "2020-05-27" --until "2020-06-01"
264bd4fc84 wine/asm.h: Don't define __ASM_CFI when using clang as cross compiler.
e0c8c4c3cd ntdll: Implement RtlRaiseException in assembly to fix continuing from exceptions.
763f15ccde ntdll: Fix unwinding through raise_generic_exception.
a8a944c220 ntdll: Keep the previous iteration of NonVolatileRegisters in call_function_handlers.
6c11d1d745 ntdll: Implement RtlRestoreContext.
c22e8645b0 wine/asm.h: Use __ASM_CFI on clang too, despite not defining __GCC_HAVE_DWARF2_CFI_ASM.
babbf352b6 ntdll: Fix unwinding functions that end with a branch instruction.
42a5885669 ntdll: Store the real stack pointer in RtlCaptureContext.
8e4f0b2a15 ntdll: Pass a nonnull handler_data in when continuing after a collided unwind.
d6e9795223 ntdll: Fix byte vs register units in unwind_packed_data.
8477f61b9f ntdll: Fix handling of the save_lrpair unwind opcode.
ad7fcd2c40 configure: Pass -fasynchronous-unwind-tables to the compiler. --- snip ---
Current state:
--- snip --- $ WINEDEBUG=+seh,+loaddll wine64 ./firefox.exe >>log.txt 2>&1 ... 01c8:trace:seh:raise_exception code=406d1388 flags=0 addr=0x7f851f0d18 pc=7f851f0d18 tid=01c8 01c8:trace:seh:raise_exception info[0]=0000000000001000 01c8:trace:seh:raise_exception info[1]=0000000007011630 01c8:trace:seh:raise_exception info[2]=00000000000001c8 01c8:trace:seh:raise_exception x0=000000001575fd58 x1=000000001575fe08 x2=0000000000000018 x3=000000001575fe08 01c8:trace:seh:raise_exception x4=000000001575fe20 x5=000000001575fd90 x6=0000000000001000 x7=0000000007011630 01c8:trace:seh:raise_exception x8=0000000000000003 x9=0000007f85b355e0 x10=0000000000000000 x11=0000000000000000 01c8:trace:seh:raise_exception x12=0000000007011630 x13=00000000000001c8 x14=0000000000000017 x15=0000000000000000 01c8:trace:seh:raise_exception x16=0000007f85b96008 x17=0000007f85c68dc0 x18=000000007ff88000 x19=0000000012c059f8 01c8:trace:seh:raise_exception x20=0000000012c1d250 x21=000000001575fee0 x22=0000000000000000 x23=0000000000000000 01c8:trace:seh:raise_exception x24=0000000000000000 x25=0000000000000000 x26=0000000000000000 x27=0000000000000000 01c8:trace:seh:raise_exception x28=0000000000000000 fp=000000001575fdf0 lr=0000007f851f0d18 sp=000000001575fd50 01c8:trace:seh:call_vectored_handlers calling handler at 0x59c24e0 code=406d1388 flags=0 01c8:trace:seh:call_vectored_handlers handler at 0x59c24e0 returned 0 01c8:trace:seh:libunwind_virtual_unwind ip 0x7f851f0d18 function 0x7f851f0cbc-0x7f851f0d24 personality 0 lsda 0 fde 0 01c8:trace:seh:libunwind_virtual_unwind next function pc=0000000004bb70f4 01c8:trace:seh:libunwind_virtual_unwind x0=000000001575fd58 x1=000000001575fe08 x2=0000000000000018 x3=000000001575fe08 01c8:trace:seh:libunwind_virtual_unwind x4=000000001575fe20 x5=000000001575fd90 x6=0000000000001000 x7=0000000007011630 01c8:trace:seh:libunwind_virtual_unwind x8=0000000000000003 x9=0000007f85b355e0 x10=0000000000000000 x11=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x12=0000000007011630 x13=00000000000001c8 x14=0000000000000017 x15=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x16=0000007f85b96008 x17=0000007f85c68dc0 x18=000000007ff88000 x19=0000000012c059f8 01c8:trace:seh:libunwind_virtual_unwind x20=0000000012c1d250 x21=000000001575fee0 x22=0000000000000000 x23=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x24=0000000000000000 x25=0000000000000000 x26=0000000000000000 x27=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x28=0000000000000000 fp=000000001575fe20 lr=0000000004bb70f4 sp=000000001575fe00 01c8:trace:seh:RtlVirtualUnwind type 1 pc 4bb70f4 sp 1575fe00 func 4bb70a0 01c8:trace:seh:unwind_full_data function 4bb70a0-4bb7128: len=0x22 ver=0 X=1 E=0 epilogs=1 codes=8 01c8:trace:seh:RtlVirtualUnwind ret: lr=4c499a0 sp=1575fe30 handler=(nil) 01c8:trace:seh:RtlVirtualUnwind type 1 pc 4c499a0 sp 1575fe30 func 4c49960 01c8:trace:seh:unwind_full_data function 4c49960-4c49d38: len=0xf6 ver=0 X=0 E=0 epilogs=1 codes=32 01c8:trace:seh:RtlVirtualUnwind ret: lr=4c6ceec sp=1575fec0 handler=(nil) 01c8:trace:seh:RtlVirtualUnwind type 1 pc 4c6ceec sp 1575fec0 func 4c6ceb0 01c8:trace:seh:unwind_full_data function 4c6ceb0-4c6cf20: len=0x1c ver=0 X=0 E=0 epilogs=1 codes=12 01c8:trace:seh:RtlVirtualUnwind ret: lr=7f85b3a7a0 sp=1575fee0 handler=(nil) 01c8:trace:seh:libunwind_virtual_unwind ip 0x7f85b3a7a0 function 0x7f85b3a704-0x7f85b3a7b8 personality 0 lsda 0 fde 0 01c8:trace:seh:libunwind_virtual_unwind next function pc=0000000000000000 (last frame) 01c8:trace:seh:libunwind_virtual_unwind x0=000000001575fd58 x1=000000001575fe08 x2=0000000000000018 x3=000000001575fe08 01c8:trace:seh:libunwind_virtual_unwind x4=000000001575fe20 x5=000000001575fd90 x6=0000000000001000 x7=0000000007011630 01c8:trace:seh:libunwind_virtual_unwind x8=0000000000000003 x9=0000007f85b355e0 x10=0000000000000000 x11=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x12=0000000007011630 x13=00000000000001c8 x14=0000000000000017 x15=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x16=0000007f85b96008 x17=0000007f85c68dc0 x18=000000007ff88000 x19=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x20=0000000000000000 x21=0000000000000000 x22=0000000000000000 x23=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x24=0000000000000000 x25=0000000000000000 x26=0000000000000000 x27=0000000000000000 01c8:trace:seh:libunwind_virtual_unwind x28=0000000000000000 fp=0000000000000000 lr=0000000000000000 sp=0000000015760000 01c8:trace:seh:call_function_handlers found wine frame 0x1575fee0 rsp 15760000 handler 0x7f85b557c0 01c8:trace:seh:call_teb_handler calling TEB handler 0x7f85b557c0 (rec=0x1575fd58, frame=0x1575fee0 context=0x1575ed80, dispatch=0x1575ec40) wine: Unhandled exception 0x406d1388 in thread 1c8 at address 0000007F851F0D18 (thread 01c8), starting debugger... 01c8:trace:seh:start_debugger Starting debugger L"winedbg --auto 372 404" --- snip ---
$ wine --version wine-5.9-240-g2a535f829f
Regards
https://bugs.winehq.org/show_bug.cgi?id=49254
Neko-san nekoNexus@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nekoNexus@protonmail.ch