https://bugs.winehq.org/show_bug.cgi?id=55560
Bug ID: 55560 Summary: The 64-bit dbghelp:dbghelp times out in Wine Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: dbghelp Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
The 64-bit dbghelp:dbghelp times out in Wine:
dbghelp.c:106: Test failed: got bad return address 17000ecf4 dbghelp:dbghelp:0688 done (258) in 120s 62B
See https://test.winehq.org/data/patterns.html#dbghelp:dbghelp
The timeouts are systematic and started on 2023-09-07. A bisect shows that this failure started with the commit below:
commit 425bd55b02e375b9ac8f79b254ce3ca5c9e72719 Author: Alexandre Julliard julliard@winehq.org Date: Thu Sep 7 16:02:12 2023 +0200
winegcc: Don't disable unwind tables for PE targets.
https://bugs.winehq.org/show_bug.cgi?id=55560
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |425bd55b02e375b9ac8f79b254c | |e3ca5c9e72719 Keywords| |regression, source, | |testcase
https://bugs.winehq.org/show_bug.cgi?id=55560
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com See Also| |https://sourceware.org/bugz | |illa/show_bug.cgi?id=30853
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- got a look at it...
it times out because the dwarf unwinder in dbghelp returns success but doesn't get an update of RIP in context... so it keeps on calling the unwinder, staying at same address
the offending function (in ntdll) is one of the syscall thunk generated by winebuild
very strangely, it uses this CIE (from dwarfdump) 00000000 0000000000000014 ffffffff CIE Version: 1 Augmentation: "" Code alignment factor: 1 Data alignment factor: -8 Return address column: 32
DW_CFA_def_cfa: r7 (rsp) ofs 8 DW_CFA_offset: r32 (xmm15) at cfa-8 DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop
so, xmm15 instead of rip gets updated by the dwarf unwinder. Note its cross-assembler that generates that buggy information (local as gives the expected one).
I filled a bug report to binutils (and perhaps its already fixed)
I see two workarounds: - check in stack unwinding that Rip has been changed (if not). that works (could be a good idea anyway to prevent infinite loops for any reasons). - force in winebuild the correct register information for each .cfi_startproc directive. that works too (even we pile up register info in CIE) 00000000 0000000000000018 00000000 CIE Version: 1 Augmentation: "zR" Code alignment factor: 1 Data alignment factor: -8 Return address column: 32 Augmentation data: 1b DW_CFA_def_cfa: r7 (rsp) ofs 8 DW_CFA_offset: r32 (xmm15) at cfa-8 DW_CFA_def_cfa: r7 (rsp) ofs 8 DW_CFA_offset: r16 (rip) at cfa-8 DW_CFA_nop
https://bugs.winehq.org/show_bug.cgi?id=55560
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard@winehq.org
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- and in the list of possible workarounds: - remove the .cfi start/end proc directives for the thunks in winegcc (they are not that useful, any default unwinder will do the job, and they were not activated without -fasynchronous-unwind-tables)
adding Alexandre in CC
https://bugs.winehq.org/show_bug.cgi?id=55560
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Yes, I think it would be OK to remove them. In general we probably want to switch to .seh directives for PE targets.
https://bugs.winehq.org/show_bug.cgi?id=55560
--- Comment #4 from Eric Pouech eric.pouech@gmail.com --- should be fixed by e3aa775a63e82dc04df4fa206961957f77fa4cab (and 9a28dbfb272491d584d5485c5eae44746b36c7bd prevents it also from happening)
https://bugs.winehq.org/show_bug.cgi?id=55560
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e3aa775a63e82dc04df4fa20696 | |1957f77fa4cab Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #5 from François Gouget fgouget@codeweavers.com --- Indeed this got fixed on 2023-09-18. Thanks!
https://bugs.winehq.org/show_bug.cgi?id=55560
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.19.