https://bugs.winehq.org/show_bug.cgi?id=56223
Bug ID: 56223 Summary: winedbg: crashes after loading gecko debug information Product: Wine Version: 9.0 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: dbghelp Assignee: wine-bugs@winehq.org Reporter: bernhardu@mailbox.org Distribution: ---
Created attachment 75929 --> https://bugs.winehq.org/attachment.cgi?id=75929 stdout of application and winedbg, backtrace for handled and unhandled SIGSEGV
Looking at 56213 gives a crash ending in xul.dll. Therefore I put the xul.pdb from wine-gecko-2.47.4-x86-pdb.tar.xz into the directory of xul.dll.
This leads to a crashing winedbg.exe. I think the address space gets exhausted, because the xul.pdb is 500 MB, and htop shows for a crashing winedbg.exe VIRT=4072M RES=1588M.
This comes with a few of following lines: err:virtual:allocate_virtual_memory out of memory for allocation, base (nil) size 003f4000
But also this line is visible: err:dbghelp_msc:pe_load_debug_directory Got a page fault while loading symbols
So the loading of the big pdb file is protected by an exception handler in pe_load_debug_directory.
But afterwards dbghelp.dll tries to work with this partially loaded debug information and gets a second SIGSEGV, this time unhandled and unfortunately without any message.
https://bugs.winehq.org/show_bug.cgi?id=56223
--- Comment #1 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 75930 --> https://bugs.winehq.org/attachment.cgi?id=75930 stdout of application and winedbg, backtrace for handled and unhandled SIGSEGV
stdout and backtraces
https://bugs.winehq.org/show_bug.cgi?id=56223
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #75930|0 |1 is obsolete| |
https://bugs.winehq.org/show_bug.cgi?id=56223
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #75930|1 |0 is obsolete| |
https://bugs.winehq.org/show_bug.cgi?id=56223
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #75929|0 |1 is obsolete| |
--- Comment #2 from Bernhard Übelacker bernhardu@mailbox.org --- Comment on attachment 75929 --> https://bugs.winehq.org/attachment.cgi?id=75929 stdout of application and winedbg, backtrace for handled and unhandled SIGSEGV
Sorry, had issues attaching while creating the bug. Both attachements are the same.
Creating merge request: https://gitlab.winehq.org/wine/wine/-/merge_requests/4890
With it winedbg is able to show a backtrace, even while in this low memory situation.
https://bugs.winehq.org/show_bug.cgi?id=56223
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- Maybe it does not need to be loaded at all.
https://bugs.winehq.org/show_bug.cgi?id=56223
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- Or not in full.
https://bugs.winehq.org/show_bug.cgi?id=56223
--- Comment #5 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 75931 --> https://bugs.winehq.org/attachment.cgi?id=75931 stdout of application and winedbg with MR4890
Maybe it does not need to be loaded at all. Or not in full.
With MR4890 stdout and the backtrace looks like attached.
Without the pdb in place it does show all 5 frames in xul.dll without further information.
With pdb and MR4890 it shows the first 3 frames with line information, and only the frames 3 to 6 without.
I assume if the address space exhaustion would not happen it would be able to show also debug information for the other frames.
https://bugs.winehq.org/show_bug.cgi?id=56223
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- I'm sure it's useful to display debug information, what I mean is you don't always need to load everything in memory.
https://bugs.winehq.org/show_bug.cgi?id=56223
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com
--- Comment #7 from Eric Pouech eric.pouech@gmail.com --- (In reply to Nikolay Sivov from comment #6)
I'm sure it's useful to display debug information, what I mean is you don't always need to load everything in memory.
Yes, that's something that has been inherited (for various historical reasons) from stabs parsing. Currently, when a single bit of information is needed within a given module, all debug information for that module is first loaded into an internal format. That can consume of lots of RAM (and processing). I have on my todo list a major rewrite of dbghelp (at least for pdb and dwarf debug format) that would only load the needed bits of debug information. Note also, that even the proposed patch won't ensure that a decent backtrace is displayed as we end up with a partial loading of information.
https://bugs.winehq.org/show_bug.cgi?id=56223
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |c3ef1a6c67673b846dabed4c5e9 | |c0b4f25b5849e
--- Comment #8 from Bernhard Übelacker bernhardu@mailbox.org --- Merge request got committed: https://gitlab.winehq.org/wine/wine/-/commit/c3ef1a6c67673b846dabed4c5e9c0b4...
I think this bug can therefore changed to resolved fixed. Thanks for looking at it.
https://bugs.winehq.org/show_bug.cgi?id=56223
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.1.
https://bugs.winehq.org/show_bug.cgi?id=56223
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0.x