PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.59k stars 1.6k forks source link

[BUG]: can't load any ISO - assertion failed / Unhandled page fault @ 0xfffffff8 #5226

Closed SupervisedThinking closed 2 years ago

SupervisedThinking commented 2 years ago

Describe the Bug

After https://github.com/PCSX2/pcsx2/releases/tag/v1.7.2162 PCSX2 is broken for me and ends up with

/mnt/dev/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-9e705b2f530b44dbd36d08c50baa16c8a53bfd11/common/Linux/LnxHostSys.cpp(69) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t*, void*)
    Thread:    MTGS
    Condition: false
    Message:   Unhandled page fault @ 0xfffffff8

[00] wxInputStream::LastRead() const             
[01] 0x0x7fe9637bce20                            
[02] std::string::swap(std::string&)             
[03] wxDC::~wxDC()                               
[04] wxDC::~wxDC()                               
[05] wxDC::~wxDC()                               
[06] wxDC::~wxDC()                               
[07] wxDC::~wxDC()                               
[08] wxBufferedPaintDC::~wxBufferedPaintDC()     
[09] wxBufferedPaintDC::~wxBufferedPaintDC()     
[10] wxBufferedPaintDC::~wxBufferedPaintDC()     
[11] wxInputStream::LastRead() const             
[12] wxInputStream::LastRead() const             
[13] 0x0x7fe9637b2e0e                            
[14] clone                                       

full log

SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system

PCSX2 Nightly - v1.7.2180 Compiled on Dec 29 2021
Savestate version: 0x9a2b0000

Host Machine Init:
    Operating System =  
    Physical RAM     =  6806 MB
    CPU name         =  Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz
    Vendor/Model     =  GenuineIntel (stepping 03)
    CPU speed        =  3.692 ghz (4 logical threads)
    x86PType         =  Standard OEM
    x86Flags         =  bfebfbff 7ffafbbf
    x86EFlags        =  2c100800

x86 Features Detected:
    SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2.. AVX.. AVX2.. FMA
    Pcsx2 was compiled as 64-bits.

SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system
Installing POSIX SIGSEGV handler...
Reserving memory for recompilers...
HLE Host: Set 'host:' root path to: /

Patches: No CRC found, using 00000000 instead.
isoFile open ok: /storage/roms/ps2/game.iso
    Image type  = DVD
 * CDVD Disk Open: DVD, Single layer or unknown:
 * * Track 1: Data (Mode 1) (1844448 sectors)
Kbd Accelerator 'F11' is mapped to unknown command 'Sys_FreezeGS'
EGL Version: 1.5
EGL Extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_CHROMIUM_sync_control EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_swap_buffers_with_damage EGL_IMG_context_priority EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_NOK_texture_from_pixmap 
Trying version 4.6 (Core)
Got version 4.6 (Core)
Created a OpenGL context
GL_VENDOR: Intel
GL_RENDERER: Mesa Intel(R) HD Graphics 530 (SKL GT2)
GL_VERSION: 4.6 (Core Profile) Mesa 21.3.2
GL_SHADING_LANGUAGE_VERSION: 4.60
1 program binary formats supported by driver
Read 0 entries from '/storage/.config/PCSX2/cache/gl_programs.idx'
/mnt/dev/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-9e705b2f530b44dbd36d08c50baa16c8a53bfd11/common/Linux/LnxHostSys.cpp(69) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t*, void*)
    Thread:    MTGS
    Condition: false
    Message:   Unhandled page fault @ 0xfffffff8

[00] wxInputStream::LastRead() const             
[01] 0x0x7fe9637bce20                            
[02] std::string::swap(std::string&)             
[03] wxDC::~wxDC()                               
[04] wxDC::~wxDC()                               
[05] wxDC::~wxDC()                               
[06] wxDC::~wxDC()                               
[07] wxDC::~wxDC()                               
[08] wxBufferedPaintDC::~wxBufferedPaintDC()     
[09] wxBufferedPaintDC::~wxBufferedPaintDC()     
[10] wxBufferedPaintDC::~wxBufferedPaintDC()     
[11] wxInputStream::LastRead() const             
[12] wxInputStream::LastRead() const             
[13] 0x0x7fe9637b2e0e                            
[14] clone                                       

/mnt/dev/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-9e705b2f530b44dbd36d08c50baa16c8a53bfd11/common/Linux/LnxHostSys.cpp(69) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t*, void*)
    Thread:    MTGS
    Condition: false
    Message:   Unhandled page fault @ 0xfffffff8
(Cubeb) Using normal 2 speaker stereo output.
(Cubeb) Minimum latency: 25.00 ms (1200 audio frames)
(Cubeb) Minimum latency is above requested latency: 1200 vs 960, adjusting to compensate.
McdSlot 0 [File]: /storage/.config/PCSX2/memcards/Mcd001.ps2
McdSlot 1 [File]: /storage/.config/PCSX2/memcards/Mcd002.ps2
EE/iR5900-32 Recompiler Reset
    Bios Found: Europe  v02.30(20/02/2008)  Console
    BIOS rom1 module not found, skipping...
    BIOS rom2 module not found, skipping...
    BIOS erom module not found, skipping...
# Initialize memory (rev:4.00, ctm:196Mhz, cpuclk:147Mhz detected)
Current Renderer: OpenGL
INFO: GL_ARB_sparse_texture is NOT SUPPORTED
INFO: GL_ARB_sparse_texture2 is NOT SUPPORTED
INFO: GL_ARB_gpu_shader5 is available
INFO: GL_ARB_shader_image_load_store is available
INFO: GL_ARB_clear_texture is available
INFO: GL_ARB_direct_state_access is available
INFO: GL_ARB_texture_barrier is available

48000 SampleRate: 
# Total accessable memory size: 32 MB (B:2:8:0) (400:2:7c30)
# TLB spad=0 kernel=1:12 default=13:30 extended=31:38
# Initialize Start.
# Initialize GS ...
# Initialize INTC ...
# Initialize TIMER ...
# Initialize DMAC ...
# Initialize VU1 ...
# Initialize VIF1 ...
# Initialize GIF ...
# Initialize VU0 ...
# Initialize VIF0 ...
# Initialize IPU ...
# Initialize FPU ...
# Initialize User Memory ...

Reproduction Steps

build PCSX2 from source & and run it https://github.com/SupervisedThinking/LibreELEC-RR/blob/master-rr/packages/supervisedthinking/emulation/standalone/pcsx2/package.mk

Expected Behavior

it should start up the game

PCSX2 Revision

https://github.com/PCSX2/pcsx2/releases/tag/v1.7.2180

Operating System

Linux (64bit) - Specify Distro Below

If Linux - Specify Distro

LibreELEC

stenzek commented 2 years ago

Need an actual backtrace (run it in gdb). If the segfault happens in jit code, just continue until you hit the MTGS crash.

SupervisedThinking commented 2 years ago

log

SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system

PCSX2 Nightly - v1.7.2186 Compiled on Jan 13 2022
Savestate version: 0x9a2b0000

Host Machine Init:
    Operating System =  
    Physical RAM     =  6806 MB
    CPU name         =  Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz
    Vendor/Model     =  GenuineIntel (stepping 03)
    CPU speed        =  3.692 ghz (4 logical threads)
    x86PType         =  Standard OEM
    x86Flags         =  bfebfbff 7ffafbbf
    x86EFlags        =  2c100800

x86 Features Detected:
    SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2.. AVX.. AVX2.. FMA
    Pcsx2 was compiled as 64-bits.

SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system
Main Memory Manager              @ 0x0000000040000000 -> 0x0000000068000000 [640mb]
Installing POSIX SIGSEGV handler...
Mapping host memory for virtual systems...
    EE Main Memory                   @ 0x0000000040000000 -> 0x0000000042884000 [40mb]
    IOP Main Memory (2mb)            @ 0x0000000044000000 -> 0x0000000044211000 [2mb]
    VU0/1 on-chip memory             @ 0x0000000048000000 -> 0x000000004800A000 [40kb]
Reserving memory for recompilers...
    Micro VU0 Recompiler Cache       @ 0x000000005C000000 -> 0x0000000060000000 [64mb]
    Micro VU1 Recompiler Cache       @ 0x0000000060000000 -> 0x0000000064000000 [64mb]
    R5900-32 Recompiler Cache        @ 0x0000000050000000 -> 0x0000000054000000 [64mb]
    R3000A Recompiler Cache          @ 0x0000000054000000 -> 0x0000000056000000 [32mb]
    VIF0 Unpack Recompiler Cache     @ 0x0000000056000000 -> 0x0000000056800000 [8mb]
    VIF1 Unpack Recompiler Cache     @ 0x0000000058000000 -> 0x0000000058800000 [8mb]
(SysExecute) received.
HLE Host: Will load ELF: 

HLE Host: Set 'host:' root path to: /

DEV9: DEV9init
DEV9: DEV9init2
DEV9: DEV9init3
DEV9: DEV9init ok
DEV9: DEV9close
Patches: No CRC found, using 00000000 instead.
isoFile open ok: /storage/roms/ps2/game.iso
    Image type  = DVD
    blocks      = 1844448
    offset      = 0
    blocksize   = 2048
    blockoffset = 24
 * CDVD Disk Open: DVD, Single layer or unknown:
 * * Track 1: Data (Mode 1) (1844448 sectors)
(IsoFS) Block 0x10: Primary partition info.
(IsoFS) Filesystem is ISO9660
Open virtual disk tray
Simulating ejected media
Kbd Accelerator 'F11' is mapped to unknown command 'Sys_FreezeGS'
EGL Version: 1.5
EGL Extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_CHROMIUM_sync_control EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_swap_buffers_with_damage EGL_IMG_context_priority EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_NOK_texture_from_pixmap 
Trying version 4.6 (Core)
Got version 4.6 (Core)
Created a OpenGL context
GL_VENDOR: Intel
GL_RENDERER: Mesa Intel(R) HD Graphics 530 (SKL GT2)
GL_VERSION: 4.6 (Core Profile) Mesa 21.3.4
GL_SHADING_LANGUAGE_VERSION: 4.60
1 program binary formats supported by driver
Read 0 entries from '/storage/.config/PCSX2/cache/gl_programs.idx'
addr2line: DWARF error: could not find variable specification at offset 6345d
addr2line: DWARF error: could not find variable specification at offset 809ef
addr2line: DWARF error: could not find variable specification at offset 80988
addr2line: DWARF error: could not find variable specification at offset 80996
addr2line: DWARF error: could not find variable specification at offset 809fc
addr2line: DWARF error: could not find variable specification at offset 45441
addr2line: DWARF error: could not find variable specification at offset 4d5a9
addr2line: DWARF error: could not find variable specification at offset 578c3
addr2line: DWARF error: could not find variable specification at offset 2c65f
addr2line: DWARF error: could not find variable specification at offset 29dcc
addr2line: DWARF error: could not find variable specification at offset 28d38
addr2line: DWARF error: could not find variable specification at offset 2a40b
addr2line: DWARF error: could not find variable specification at offset 2775d
addr2line: DWARF error: could not find variable specification at offset 28bfc
addr2line: DWARF error: could not find variable specification at offset 32f0e
addr2line: DWARF error: could not find variable specification at offset 2c2c7
addr2line: DWARF error: could not find variable specification at offset 2a687
addr2line: DWARF error: could not find variable specification at offset 36307
addr2line: DWARF error: could not find variable specification at offset 41445
addr2line: DWARF error: could not find variable specification at offset 36541
addr2line: DWARF error: could not find variable specification at offset 3df07
addr2line: DWARF error: could not find variable specification at offset 372f7
addr2line: DWARF error: could not find variable specification at offset 292ca
addr2line: DWARF error: could not find variable specification at offset 2e92c
addr2line: DWARF error: could not find variable specification at offset 3a2bb
addr2line: DWARF error: could not find variable specification at offset 28ba9
addr2line: DWARF error: could not find variable specification at offset 285ea
addr2line: DWARF error: could not find variable specification at offset 257b1
addr2line: DWARF error: could not find variable specification at offset 26a00
addr2line: DWARF error: could not find variable specification at offset 29d39
addr2line: DWARF error: could not find variable specification at offset 28599
addr2line: DWARF error: could not find variable specification at offset 2daec
addr2line: DWARF error: could not find variable specification at offset 2cd30
addr2line: DWARF error: could not find variable specification at offset 26be7
addr2line: DWARF error: could not find variable specification at offset 26885
addr2line: DWARF error: could not find variable specification at offset 2a71c
addr2line: DWARF error: could not find variable specification at offset 2769a
addr2line: DWARF error: could not find variable specification at offset 2868e
addr2line: DWARF error: could not find variable specification at offset 2572b
addr2line: DWARF error: could not find variable specification at offset 26bf6
addr2line: DWARF error: could not find variable specification at offset 2c87f
addr2line: DWARF error: could not find variable specification at offset 38512
addr2line: DWARF error: could not find variable specification at offset 25739
addr2line: DWARF error: could not find variable specification at offset 2707b
addr2line: DWARF error: could not find variable specification at offset 2742b
addr2line: DWARF error: could not find variable specification at offset 275ab
addr2line: DWARF error: could not find variable specification at offset 272fb
addr2line: DWARF error: could not find variable specification at offset 270fe
addr2line: DWARF error: could not find variable specification at offset 3d5b7
addr2line: DWARF error: could not find variable specification at offset 2717b
addr2line: DWARF error: could not find variable specification at offset 3e9c8
addr2line: DWARF error: could not find variable specification at offset 282ed
addr2line: DWARF error: could not find variable specification at offset 26ead
addr2line: DWARF error: could not find variable specification at offset 26e50
addr2line: DWARF error: could not find variable specification at offset 26e50
addr2line: DWARF error: could not find variable specification at offset 26e3a
addr2line: DWARF error: could not find variable specification at offset 26e13
addr2line: DWARF error: could not find variable specification at offset 26e40
addr2line: DWARF error: could not find variable specification at offset 26e34
addr2line: DWARF error: could not find variable specification at offset 26e3a
addr2line: DWARF error: could not find variable specification at offset 26e4c
addr2line: DWARF error: could not find variable specification at offset 34e99
addr2line: DWARF error: could not find variable specification at offset 26eb7
addr2line: DWARF error: could not find variable specification at offset 26e37
addr2line: DWARF error: could not find variable specification at offset 26e67
addr2line: DWARF error: could not find variable specification at offset 35766
addr2line: DWARF error: could not find variable specification at offset 26ebb
addr2line: DWARF error: could not find variable specification at offset 24ba9
addr2line: DWARF error: could not find variable specification at offset 26e58
addr2line: DWARF error: could not find variable specification at offset 26e60
addr2line: DWARF error: could not find variable specification at offset 27060
addr2line: DWARF error: could not find variable specification at offset 2699a
addr2line: DWARF error: could not find variable specification at offset 26e24
addr2line: DWARF error: could not find variable specification at offset 25778
addr2line: DWARF error: could not find variable specification at offset 25801
addr2line: DWARF error: could not find variable specification at offset 28695
addr2line: DWARF error: could not find variable specification at offset 2b6df
addr2line: DWARF error: could not find variable specification at offset 27e06
addr2line: DWARF error: could not find variable specification at offset 26be0
addr2line: DWARF error: could not find variable specification at offset 27e02
addr2line: DWARF error: could not find variable specification at offset 26be3
addr2line: DWARF error: could not find variable specification at offset 27371
addr2line: DWARF error: could not find variable specification at offset 26c07
addr2line: DWARF error: could not find variable specification at offset 26c47
addr2line: DWARF error: could not find variable specification at offset 26c3a
addr2line: DWARF error: could not find variable specification at offset 28595
addr2line: DWARF error: could not find variable specification at offset 2857c
addr2line: DWARF error: could not find variable specification at offset 28575
addr2line: DWARF error: could not find variable specification at offset 26c0d
addr2line: DWARF error: could not find variable specification at offset 26c4f
addr2line: DWARF error: could not find variable specification at offset 27145
addr2line: DWARF error: could not find variable specification at offset 26905
addr2line: DWARF error: could not find variable specification at offset 26e4e
addr2line: DWARF error: could not find variable specification at offset 26909
addr2line: DWARF error: could not find variable specification at offset 25ba6
addr2line: DWARF error: could not find variable specification at offset 25e6c
addr2line: DWARF error: could not find variable specification at offset 2c8fa
addr2line: DWARF error: could not find variable specification at offset 2687e
addr2line: DWARF error: could not find variable specification at offset 268a0
addr2line: DWARF error: could not find variable specification at offset 26388
addr2line: DWARF error: could not find variable specification at offset 2574f
addr2line: DWARF error: could not find variable specification at offset 277f3
/build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/Linux/LnxHostSys.cpp(69) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t*, void*)
    Thread:    MTGS
    Condition: false
    Message:   Unhandled page fault @ 0xfffffff8

/build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/Linux/LnxHostSys.cpp(69) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t*, void*)
    Thread:    MTGS
    Condition: false
    Message:   Unhandled page fault @ 0xfffffff8
[00] SysPageFaultSignalFilter(int, siginfo_t*, void*) /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/Linux/LnxHostSys.cpp:69
[01] 0x0x7f21a44e7e20                            
[02] std::string::swap(std::string&)             
[03] GSDeviceOGL::Create(WindowInfo const&)       /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:371
[04] GSRenderer::CreateDevice(GSDevice*, WindowInfo const&) /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/Renderers/Common/GSRenderer.cpp:63
[05] GSRendererNew::CreateDevice(GSDevice*, WindowInfo const&) /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/Renderers/HW/GSRendererNew.cpp:38
[06] _GSopen(WindowInfo const&, char const*, GSRendererType, int) /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/GS.cpp:237
[07] GSopen2(WindowInfo const&, unsigned int)     /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/GS.cpp:303
[08] SysMtgsThread::OpenGS()                      /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/MTGS.cpp:244
[09] SysThreadBase::StateCheckInThread()          /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/System/SysThreadBase.cpp:369
[10] RingBufferLock::Acquire()                    /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/MTGS.cpp:274
[11] Threading::pxThread::_try_virtual_invoke(void (Threading::pxThread::*)()) /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/ThreadTools.cpp:616
[12] __pthread_cleanup_class::~__pthread_cleanup_class() /build.LibreELEC-x11.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/pthread.h:552
[13] Threading::pxThread::_internal_callback(void*) /build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/ThreadTools.cpp:710
[14] 0x0x7f21a44dde0e                            
[15] clone                                       

DEV9: DEV9open
DEV9: open r+: 
(Cubeb) Using normal 2 speaker stereo output.
(Cubeb) Minimum latency: 25.00 ms (1200 audio frames)
(Cubeb) Minimum latency is above requested latency: 1200 vs 960, adjusting to compensate.
(Cubeb): cubeb_pulse.c:889: Layout undefined, PulseAudio will use its default.

(Cubeb): cubeb_pulse.c:912: Requested buffer attributes maxlength 4294967295, tlength 4800, prebuf 4294967295, minreq 1200, fragsize 1200

(Cubeb): cubeb_pulse.c:1023: Output buffer attributes maxlength 4194304, tlength 21592, prebuf 20396, minreq 1200, fragsize 1200

(Cubeb): cubeb_pulse.c:1040: Cubeb stream (0x7f21640288a0) init successful.

(Cubeb): cubeb_pulse.c:1106: Cubeb stream (0x7f21640288a0) started successfully.

McdSlot 0 [File]: /storage/.config/PCSX2/memcards/Mcd001.ps2
McdSlot 1 [File]: /storage/.config/PCSX2/memcards/Mcd002.ps2
Allocating host memory for virtual systems...
EE/iR5900-32 Recompiler Reset
iR3000A Recompiler reset.
Resetting host memory for virtual systems...
    Bios Found: Europe  v02.30(20/02/2008)  Console
    BIOS rom1 module not found, skipping...
    BIOS rom2 module not found, skipping...
    BIOS erom module not found, skipping...
    IOP resetting main memory...
Generating SSE-optimized unpacking functions for VIF interpreters...
VIF SSE-optimized Unpacking Functions @ 0x0000000064800000 -> 0x0000000064810000 [64kb]
Unpack function generation complete.  Generated function statistics:
    Reserved buffer    : 65536 bytes @ 0x0000000064800000
    x86 code generated : 7934 bytes

Close virtual disk tray
Detecting media
# Initialize memory (rev:4.00, ctm:196Mhz, cpuclk:147Mhz detected)
Current Renderer: OpenGL
INFO: GL_ARB_sparse_texture is NOT SUPPORTED
INFO: GL_ARB_sparse_texture2 is NOT SUPPORTED
INFO: GL_ARB_gpu_shader5 is available
INFO: GL_ARB_shader_image_load_store is available
INFO: GL_ARB_clear_texture is available
INFO: GL_ARB_direct_state_access is available
INFO: GL_ARB_texture_barrier is available

48000 SampleRate: 
RegisterLibraryEntries: excepman version 1.01
RegisterLibraryEntries:  intrman version 1.02
RegisterLibraryEntries:   ssbusc version 1.01
RegisterLibraryEntries:  dmacman version 1.02
RegisterLibraryEntries:  timrman version 1.01
RegisterLibraryEntries:  sysclib version 1.01
RegisterLibraryEntries:    stdio version 1.01
RegisterLibraryEntries:  heaplib version 1.01
# Total accessable memory size: 32 MB (B:2:8:0) (400:2:7c30)
# TLB spad=0 kernel=1:12 default=13:30 extended=31:38
# Initialize Start.
# Initialize GS ...
# Initialize INTC ...
# Initialize TIMER ...
# Initialize DMAC ...
# Initialize VU1 ...
# Initialize VIF1 ...
# Initialize GIF ...
# Initialize VU0 ...
# Initialize VIF0 ...
# Initialize IPU ...
# Initialize FPU ...
# Initialize User Memory ...
RegisterLibraryEntries:   thbase version 1.01
RegisterLibraryEntries:  thevent version 1.01
RegisterLibraryEntries:  thsemap version 1.01
RegisterLibraryEntries:  thmsgbx version 1.01
RegisterLibraryEntries:  thfpool version 1.01
RegisterLibraryEntries:  thvpool version 1.01
SupervisedThinking commented 2 years ago

backtrace

GNU gdb (GDB) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-libreelec-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcsx2...
[?2004h(gdb) run
[?2004l
Starting program: /usr/bin/pcsx2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system
Command line parsing...
Command line parsed!
[New Thread 0x7fae3ce1e640 (LWP 6487)]
[New Thread 0x7fae37fff640 (LWP 6488)]
[New Thread 0x7fae377fe640 (LWP 6489)]
[New Thread 0x7fae36ffd640 (LWP 6490)]
[Thread 0x7fae36ffd640 (LWP 6490) exited]
[New Thread 0x7fae36ffd640 (LWP 6491)]
[New Thread 0x7fae367fc640 (LWP 6492)]
[Thread 0x7fae36ffd640 (LWP 6491) exited]
[Thread 0x7fae367fc640 (LWP 6492) exited]
[New Thread 0x7fae367fc640 (LWP 6493)]
[New Thread 0x7fae36ffd640 (LWP 6494)]
[Detaching after vfork from child process 6495]
[New Thread 0x7fae35ffb640 (LWP 6496)]
[New Thread 0x7fae357fa640 (LWP 6497)]
[New Thread 0x7fae34ff9640 (LWP 6498)]
[Thread 0x7fae357fa640 (LWP 6497) exited]
[Thread 0x7fae34ff9640 (LWP 6498) exited]
[New Thread 0x7fae34ff9640 (LWP 6499)]
[New Thread 0x7fae357fa640 (LWP 6500)]
[Thread 0x7fae34ff9640 (LWP 6499) exited]
[Thread 0x7fae357fa640 (LWP 6500) exited]
[New Thread 0x7fae357fa640 (LWP 6501)]
[New Thread 0x7fae34ff9640 (LWP 6502)]
[Thread 0x7fae357fa640 (LWP 6501) exited]
[Thread 0x7fae34ff9640 (LWP 6502) exited]
[New Thread 0x7fae34ff9640 (LWP 6503)]
[New Thread 0x7fae357fa640 (LWP 6504)]
[Thread 0x7fae34ff9640 (LWP 6503) exited]
[Thread 0x7fae357fa640 (LWP 6504) exited]
[New Thread 0x7fae357fa640 (LWP 6505)]
[New Thread 0x7fae34ff9640 (LWP 6506)]
[Thread 0x7fae357fa640 (LWP 6505) exited]
[Thread 0x7fae34ff9640 (LWP 6506) exited]
[New Thread 0x7fae34ff9640 (LWP 6507)]
[New Thread 0x7fae357fa640 (LWP 6508)]
[Thread 0x7fae34ff9640 (LWP 6507) exited]
[Thread 0x7fae357fa640 (LWP 6508) exited]
[New Thread 0x7fae357fa640 (LWP 6509)]
[New Thread 0x7fae34ff9640 (LWP 6510)]
[Thread 0x7fae357fa640 (LWP 6509) exited]
[Thread 0x7fae34ff9640 (LWP 6510) exited]
[New Thread 0x7fae34ff9640 (LWP 6511)]
[New Thread 0x7fae357fa640 (LWP 6512)]
[Thread 0x7fae34ff9640 (LWP 6511) exited]
[Thread 0x7fae357fa640 (LWP 6512) exited]
[New Thread 0x7fae357fa640 (LWP 6513)]
[New Thread 0x7fae34ff9640 (LWP 6514)]
[Thread 0x7fae357fa640 (LWP 6513) exited]
[Thread 0x7fae34ff9640 (LWP 6514) exited]
[New Thread 0x7fae34ff9640 (LWP 6515)]
[New Thread 0x7fae357fa640 (LWP 6516)]
[Thread 0x7fae34ff9640 (LWP 6515) exited]
[Thread 0x7fae357fa640 (LWP 6516) exited]
[New Thread 0x7fae357fa640 (LWP 6517)]
[New Thread 0x7fae34ff9640 (LWP 6518)]
[Thread 0x7fae357fa640 (LWP 6517) exited]
[Thread 0x7fae34ff9640 (LWP 6518) exited]
[New Thread 0x7fae34ff9640 (LWP 6519)]
[New Thread 0x7fae357fa640 (LWP 6520)]
[Thread 0x7fae34ff9640 (LWP 6519) exited]
[Thread 0x7fae357fa640 (LWP 6520) exited]
[New Thread 0x7fae357fa640 (LWP 6566)]
[New Thread 0x7fae34ff9640 (LWP 6567)]
[New Thread 0x7fae17fff640 (LWP 6568)]
[New Thread 0x7fae177fe640 (LWP 6569)]
[New Thread 0x7fae16ffd640 (LWP 6570)]
[New Thread 0x7fae167fc640 (LWP 6571)]
[New Thread 0x7fae15ffb640 (LWP 6572)]
[Thread 0x7fae167fc640 (LWP 6571) exited]
[Thread 0x7fae15ffb640 (LWP 6572) exited]
[Thread 0x7fae16ffd640 (LWP 6570) exited]
[Thread 0x7fae17fff640 (LWP 6568) exited]
[Thread 0x7fae177fe640 (LWP 6569) exited]
[Thread 0x7fae36ffd640 (LWP 6494) exited]
[New Thread 0x7fae177fe640 (LWP 6583)]
[New Thread 0x7fae36ffd640 (LWP 6584)]
[New Thread 0x7fae16ffd640 (LWP 6585)]
[New Thread 0x7fae17fff640 (LWP 6586)]
[New Thread 0x7fae06752640 (LWP 6587)]
[New Thread 0x7fae05f51640 (LWP 6588)]
[New Thread 0x7fae05750640 (LWP 6589)]

Thread 43 "MTGS" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fae36ffd640 (LWP 6584)]
0x00007fae40870813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
[?2004h[?2004l
[?2004h(gdb) backtrace full
backtrace full
[?2004l
#0  0x00007fae40870813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
No symbol table info available.
#1  0x0000000000510c29 in std::string::operator= (__str=..., this=0x7fae3c083340)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/10.3.0/bits/basic_string.h:3763
No locals.
#2  GSDeviceOGL::Create (this=0x7fae3c083040, wi=...)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:371
        gl_auto_pop = <optimized out>
        shader = {<std::_Optional_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, false>> = {<std::_Optional_base_impl<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Optional_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, false> >> = {<No data fields>}, 
            _M_payload = {<std::_Optional_payload<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, true, false, false>> = {<std::_Optional_payload_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {_M_payload = {_M_empty = {<No data fields>}, _M_value = {
                      static npos = 18446744073709551615, 
                      _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                        _M_p = 0x7fae201874b8 "//#version 420 // Keep it for editor detection\n\n\n#ifdef VERTEX_SHADER\n\nlayout(location = 0) in vec2 POSITION;\nlayout(location = 1) in vec2 TEXCOORD0;\nlayout(location = 7) in vec4 COLOR;\n\n// FIXME set "...}}}, 
                  _M_engaged = true}, <No data fields>}, <No data fields>}}, <std::_Enable_copy_move<true, true, true, true, std::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>}
        point = <optimized out>
        bilinear = <optimized out>
        gl_auto_pop = <optimized out>
        vram = {0, 0, 0, 0}
        tex_font = <optimized out>
#3  0x00000000004c3377 in GSRenderer::CreateDevice (this=this@entry=0x7fae2001ae60, dev=dev@entry=0x7fae3c083040, wi=...)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/Renderers/Common/GSRenderer.cpp:63
        __PRETTY_FUNCTION__ = "virtual bool GSRenderer::CreateDevice(GSDevice*, const WindowInfo&)"
#4  0x00000000004da0cf in GSRendererNew::CreateDevice (this=0x7fae2001ae60, dev=0x7fae3c083040, wi=...)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/Renderers/HW/GSRendererNew.cpp:38
No locals.
#5  0x0000000000497263 in _GSopen (wi=..., title=title@entry=0x7ea890 "", renderer=GSRendererType::OGL_HW, threads=2, threads@entry=-1)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/GS.cpp:237
        dev = 0x7fae3c083040
#6  0x00000000004973a8 in GSopen2 (wi=..., flags=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/GS/GS.cpp:301
        stored_toggle_state = false
        toggle_state = false
        current_renderer = <optimized out>
        retval = <optimized out>
#7  0x000000000063d963 in SysMtgsThread::OpenGS (this=0xa8194f0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/MTGS.cpp:244
        __PRETTY_FUNCTION__ = <optimized out>
#8  SysMtgsThread::OnResumeInThread (this=0xa8194f0 <mtgsThread>, 
    systemsToReinstate=(System_GS | System_SPU2 | System_PAD | System_FW | System_CDVD | System_USB | System_DEV9 | System_MCD))
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/MTGS.cpp:606
No locals.
#9  0x00000000005eb86a in SysThreadBase::StateCheckInThread (this=0xa8194f0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/System/SysThreadBase.cpp:367
        systemsToTearDown = <optimized out>
        __PRETTY_FUNCTION__ = "virtual bool SysThreadBase::StateCheckInThread()"
#10 0x000000000063ca32 in SysMtgsThread::ExecuteTaskInThread (this=0xa8194f0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/pcsx2/MTGS.cpp:314
        busy = {_vptr.RingBufferLock = 0xbc07d0 <vtable for RingBufferLock+16>, m_lock1 = {_vptr.ScopedLock = 0xbcbbc8 <vtable for Threading::ScopedLock+16>, 
            m_lock = 0xa819778 <mtgsThread+648>, m_IsLocked = false}, m_lock2 = {_vptr.ScopedLock = 0xbcbbc8 <vtable for Threading::ScopedLock+16>, 
            m_lock = 0xa8197a8 <mtgsThread+696>, m_IsLocked = false}, m_mtgs = @0xa8194f0}
        __PRETTY_FUNCTION__ = <optimized out>
#11 0x00000000006f65e0 in Threading::pxThread::_try_virtual_invoke (this=0xa8194f0 <mtgsThread>, method=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/ThreadTools.cpp:571
No locals.
#12 0x00000000006f70e9 in Threading::pxThread::_internal_execute (this=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/ThreadTools.cpp:670
No locals.
#13 0x00000000006f7102 in Threading::pxThread::internal_callback_helper (itsme=0xa8194f0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/ThreadTools.cpp:721
        __clframe = <optimized out>
        owner = @0xa8194f0: {_vptr.pxThread = 0xc07940 <vtable for SysMtgsThread+16>, m_name = {static npos = 18446744073709551615, m_impl = {
              static npos = 18446744073709551615, 
              _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0xe2d9a28 L"MTGS"}}, 
            m_convertedToChar = {m_str = 0x0, m_len = 0}}, m_thread = 140386223773248, m_native_id = 140386223773248, m_native_handle = 0, m_sem_event = {
            _vptr.Semaphore = 0xbcbc88 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_sem_startup = {
            _vptr.Semaphore = 0xbcbc88 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_mtx_InThread = {
            _vptr.Mutex = 0xbcbb78 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 1, __count = 0, __owner = 6584, __nusers = 1, __kind = 0, 
                __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = "\001\000\000\000\000\000\000\000\270\031\000\000\001", '\000' <repeats 26 times>, __align = 1}}, m_mtx_start = {<Threading::Mutex> = {
              _vptr.Mutex = 0xbcbba0 <vtable for Threading::MutexRecursive+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 1, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 16 times>, "\001", '\000' <repeats 22 times>, 
                __align = 0}}, <No data fields>}, m_mtx_ThreadName = {_vptr.Mutex = 0xbcbb78 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = '\000' <repeats 39 times>, __align = 0}}, m_detached = {_M_base = {static _S_alignment = 1, _M_i = false}, static is_always_lock_free = true}, 
          m_running = {_M_base = {static _S_alignment = 1, _M_i = true}, static is_always_lock_free = true}, m_except = {m_ptr = {_M_b = {_M_p = 0x0}, 
              static is_always_lock_free = <optimized out>}, m_mtx = {_vptr.Mutex = 0xbcbb78 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                  __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
                __size = '\000' <repeats 39 times>, __align = 0}}}, m_evtsrc_OnDelete = {
            _vptr.EventSource = 0xbcbdb0 <vtable for EventSource<Threading::EventListener_Thread>+16>, 
            m_listeners = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xa819650 <mtgsThread+352>, 
                      _M_prev = 0xa819650 <mtgsThread+352>}, <No data fields>}}}, <No data fields>}, 
            m_cache_copy = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xa819660 <mtgsThread+368>, 
                      _M_prev = 0xa819660 <mtgsThread+368>}, <No data fields>}}}, <No data fields>}, m_cache_valid = false, m_listeners_lock = {
              _vptr.Mutex = 0xbcbb78 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}}}
#14 0x00000000006f7185 in Threading::pxThread::_internal_callback (itsme=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-0ddef1169d755c5c522a501a887056d90a959e1f/common/ThreadTools.cpp:709
        __PRETTY_FUNCTION__ = "static void* Threading::pxThread::_internal_callback(void*)"
#15 0x00007fae4246ce0e in start_thread (arg=0x7fae36ffd640) at pthread_create.c:463
        ret = <optimized out>
        pd = 0x7fae36ffd640
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140386223773248, -1109479382410588081, 140385695290495, 0, 140386223773248, 239449696, 1136661509348003919, 
                1136827870749134927}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#16 0x00007fae4056e64f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.
[?2004h(gdb) 
SupervisedThinking commented 2 years ago

@stenzek here is a backtrace for the latest release (I had to fix build with https://github.com/SupervisedThinking/pcsx2/commit/07c5023af604b3fbce723b121d3a244a602e00e5 btw. because https://github.com/PCSX2/pcsx2/releases/tag/v1.7.2187 broke compilation)

backtrace for https://github.com/PCSX2/pcsx2/releases/tag/v1.7.2243

GNU gdb (GDB) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-libreelec-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/pcsx2...
(gdb) run
Starting program: /usr/bin/pcsx2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7f5b65487640 (LWP 13168)]
[New Thread 0x7f5b64c86640 (LWP 13169)]
[New Thread 0x7f5b5ffff640 (LWP 13170)]
[New Thread 0x7f5b5f7fe640 (LWP 13171)]
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system
Command line parsing...
Command line parsed!
[New Thread 0x7f5b5effd640 (LWP 13172)]
[New Thread 0x7f5b5e7fc640 (LWP 13173)]
[New Thread 0x7f5b5dffb640 (LWP 13174)]
[New Thread 0x7f5b5d7fa640 (LWP 13175)]
[Thread 0x7f5b5d7fa640 (LWP 13175) exited]
[New Thread 0x7f5b5d7fa640 (LWP 13176)]
[New Thread 0x7f5b5cff9640 (LWP 13177)]
[Thread 0x7f5b5d7fa640 (LWP 13176) exited]
[Thread 0x7f5b5cff9640 (LWP 13177) exited]
[New Thread 0x7f5b5cff9640 (LWP 13178)]
[New Thread 0x7f5b5d7fa640 (LWP 13179)]
[Detaching after vfork from child process 13180]
[New Thread 0x7f5b3ffff640 (LWP 13181)]
[New Thread 0x7f5b3f7fe640 (LWP 13182)]
[New Thread 0x7f5b3effd640 (LWP 13183)]
[Thread 0x7f5b3f7fe640 (LWP 13182) exited]
[Thread 0x7f5b3effd640 (LWP 13183) exited]
[New Thread 0x7f5b3effd640 (LWP 13184)]
[New Thread 0x7f5b3f7fe640 (LWP 13185)]
[Thread 0x7f5b3effd640 (LWP 13184) exited]
[Thread 0x7f5b3f7fe640 (LWP 13185) exited]
[New Thread 0x7f5b3f7fe640 (LWP 13186)]
[New Thread 0x7f5b3effd640 (LWP 13187)]
[Thread 0x7f5b3f7fe640 (LWP 13186) exited]
[Thread 0x7f5b3effd640 (LWP 13187) exited]
[New Thread 0x7f5b3effd640 (LWP 13188)]
[New Thread 0x7f5b3f7fe640 (LWP 13189)]
[Thread 0x7f5b3effd640 (LWP 13188) exited]
[Thread 0x7f5b3f7fe640 (LWP 13189) exited]
[New Thread 0x7f5b3f7fe640 (LWP 13190)]
[New Thread 0x7f5b3effd640 (LWP 13191)]
[Thread 0x7f5b3f7fe640 (LWP 13190) exited]
[Thread 0x7f5b3effd640 (LWP 13191) exited]
[New Thread 0x7f5b3effd640 (LWP 13192)]
[New Thread 0x7f5b3f7fe640 (LWP 13193)]
[Thread 0x7f5b3effd640 (LWP 13192) exited]
[Thread 0x7f5b3f7fe640 (LWP 13193) exited]
[New Thread 0x7f5b3f7fe640 (LWP 13194)]
[New Thread 0x7f5b3effd640 (LWP 13195)]
[Thread 0x7f5b3f7fe640 (LWP 13194) exited]
[Thread 0x7f5b3effd640 (LWP 13195) exited]
[New Thread 0x7f5b3effd640 (LWP 13196)]
[New Thread 0x7f5b3f7fe640 (LWP 13197)]
[Thread 0x7f5b3effd640 (LWP 13196) exited]
[Thread 0x7f5b3f7fe640 (LWP 13197) exited]
[New Thread 0x7f5b3f7fe640 (LWP 13198)]
[New Thread 0x7f5b3effd640 (LWP 13199)]
[Thread 0x7f5b3f7fe640 (LWP 13198) exited]
[Thread 0x7f5b3effd640 (LWP 13199) exited]
[New Thread 0x7f5b3effd640 (LWP 13200)]
[New Thread 0x7f5b3f7fe640 (LWP 13201)]
[Thread 0x7f5b3effd640 (LWP 13200) exited]
[Thread 0x7f5b3f7fe640 (LWP 13201) exited]
[New Thread 0x7f5b3f7fe640 (LWP 13202)]
[New Thread 0x7f5b3effd640 (LWP 13203)]
[Thread 0x7f5b3f7fe640 (LWP 13202) exited]
[Thread 0x7f5b3effd640 (LWP 13203) exited]
[New Thread 0x7f5b3effd640 (LWP 13204)]
[New Thread 0x7f5b3f7fe640 (LWP 13205)]
[Thread 0x7f5b3effd640 (LWP 13204) exited]
[Thread 0x7f5b3f7fe640 (LWP 13205) exited]
[New Thread 0x7f5b3f7fe640 (LWP 13260)]
[New Thread 0x7f5b3effd640 (LWP 13261)]
[New Thread 0x7f5b3e7fc640 (LWP 13262)]
[New Thread 0x7f5b3dffb640 (LWP 13263)]
[New Thread 0x7f5b3d7fa640 (LWP 13264)]
[New Thread 0x7f5b3cff9640 (LWP 13265)]
[Thread 0x7f5b3d7fa640 (LWP 13264) exited]
[Thread 0x7f5b3cff9640 (LWP 13265) exited]
[Thread 0x7f5b5d7fa640 (LWP 13179) exited]
[Thread 0x7f5b3dffb640 (LWP 13263) exited]
[Thread 0x7f5b3f7fe640 (LWP 13260) exited]
[New Thread 0x7f5b3f7fe640 (LWP 13285)]
[New Thread 0x7f5b3dffb640 (LWP 13286)]
[New Thread 0x7f5b5d7fa640 (LWP 13287)]
[New Thread 0x7f5b3cff9640 (LWP 13288)]
[New Thread 0x7f5b3d7fa640 (LWP 13289)]
[New Thread 0x7f5b2377e640 (LWP 13290)]
[New Thread 0x7f5b22f7d640 (LWP 13291)]

Thread 46 "MTGS" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f5b3dffb640 (LWP 13286)]
0x00007f5b6e2d0813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
(gdb) backtrace full
#0  0x00007f5b6e2d0813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
No symbol table info available.
#1  0x0000000000513667 in std::string::operator= (__str=..., this=0x7f5b288415f8)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/10.3.0/bits/basic_string.h:3759
No locals.
#2  GSDeviceOGL::Create (this=0x7f5b28841420, display=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:374
        gl_auto_pop = <optimized out>
        shader = {<std::_Optional_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, false>> = {<std::_Optional_base_impl<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Optional_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, false> >> = {<No data fields>}, 
            _M_payload = {<std::_Optional_payload<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, true, false, false>> = {<std::_Optional_payload_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {_M_payload = {_M_empty = {<No data fields>}, _M_value = {
                      static npos = 18446744073709551615, 
                      _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                        _M_p = 0x7f5b28839ae8 "//#version 420 // Keep it for editor detection\n\n\n#ifdef VERTEX_SHADER\n\nlayout(location = 0) in vec2 POSITION;\nlayout(location = 1) in vec2 TEXCOORD0;\nlayout(location = 7) in vec4 COLOR;\n\n// FIXME set "...}}}, 
                  _M_engaged = true}, <No data fields>}, <No data fields>}}, <std::_Enable_copy_move<true, true, true, true, std::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>}
        point = <optimized out>
        bilinear = <optimized out>
        point_range = {1, 255}
        line_range = {1, 7}
        gl_auto_pop = <optimized out>
        vram = {0, 0, 0, 0}
#3  0x000000000049af4f in DoGSOpen (renderer=<optimized out>, basemem=basemem@entry=0xcf3c980 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/pcsx2/GS/GS.cpp:206
        display = 0x7f5b28006080
        __PRETTY_FUNCTION__ = "bool DoGSOpen(GSRendererType, u8*)"
#4  0x000000000049bdc5 in GSopen (config=..., renderer=<optimized out>, basemem=basemem@entry=0xcf3c980 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/pcsx2/GS/GS.cpp:319
No locals.
#5  0x0000000000652fa8 in SysMtgsThread::OpenGS (this=0xaac1170 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/pcsx2/MTGS.cpp:205
No locals.
#6  SysMtgsThread::OnResumeInThread (this=0xaac1170 <mtgsThread>, 
    systemsToReinstate=(System_GS | System_SPU2 | System_PAD | System_FW | System_CDVD | System_USB | System_DEV9 | System_MCD))
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/pcsx2/MTGS.cpp:577
--Type <RET> for more, q to quit, c to continue without paging--
No locals.
#7  0x0000000000570bab in SysThreadBase::StateCheckInThread (this=0xaac1170 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/pcsx2/System/SysThreadBase.cpp:363
        systemsToTearDown = <optimized out>
        __PRETTY_FUNCTION__ = "virtual bool SysThreadBase::StateCheckInThread()"
#8  0x0000000000651d04 in SysMtgsThread::ExecuteTaskInThread (this=0xaac1170 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/pcsx2/MTGS.cpp:277
        busy = {_vptr.RingBufferLock = 0xddf190 <vtable for RingBufferLock+16>, m_lock1 = {_vptr.ScopedLock = 0xdea588 <vtable for Threading::ScopedLock+16>, 
            m_lock = 0xaac13f8 <mtgsThread+648>, m_IsLocked = false}, m_lock2 = {_vptr.ScopedLock = 0xdea588 <vtable for Threading::ScopedLock+16>, 
            m_lock = 0xaac1428 <mtgsThread+696>, m_IsLocked = false}, m_mtgs = @0xaac1170}
        __PRETTY_FUNCTION__ = <optimized out>
#9  0x000000000070c240 in Threading::pxThread::_try_virtual_invoke (this=0xaac1170 <mtgsThread>, method=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/common/ThreadTools.cpp:571
No locals.
#10 0x000000000070cd49 in Threading::pxThread::_internal_execute (this=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/common/ThreadTools.cpp:670
No locals.
#11 0x000000000070cd62 in Threading::pxThread::internal_callback_helper (itsme=0xaac1170 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/common/ThreadTools.cpp:721
        __clframe = <optimized out>
        owner = @0xaac1170: {_vptr.pxThread = 0xe2a698 <vtable for SysMtgsThread+16>, m_name = {static npos = 18446744073709551615, m_impl = {
              static npos = 18446744073709551615, 
              _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0xe1ba328 L"MTGS"}}, 
            m_convertedToChar = {m_str = 0x0, m_len = 0}}, m_thread = 140029858920000, m_native_id = 140029858920000, m_native_handle = 0, m_sem_event = {
            _vptr.Semaphore = 0xdea648 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_sem_startup = {
            _vptr.Semaphore = 0xdea648 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_mtx_InThread = {
            _vptr.Mutex = 0xdea538 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 1, __count = 0, __owner = 13286, __nusers = 1, __kind = 0, 
                __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = "\001\000\000\000\000\000\000\000\346\063\000\000\001", '\000' <repeats 26 times>, __align = 1}}, m_mtx_start = {<Threading::Mutex> = {
              _vptr.Mutex = 0xdea560 <vtable for Threading::MutexRecursive+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 1, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 16 times>, "\001", '\000' <repeats 22 times>, 
                __align = 0}}, <No data fields>}, m_mtx_ThreadName = {_vptr.Mutex = 0xdea538 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = '\000' <repeats 39 times>, __align = 0}}, m_detached = {_M_base = {static _S_alignment = 1, _M_i = false}, static is_always_lock_free = true}, 
          m_running = {_M_base = {static _S_alignment = 1, _M_i = true}, static is_always_lock_free = true}, m_except = {m_ptr = {_M_b = {_M_p = 0x0}, 
              static is_always_lock_free = <optimized out>}, m_mtx = {_vptr.Mutex = 0xdea538 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                  __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
                __size = '\000' <repeats 39 times>, __align = 0}}}, m_evtsrc_OnDelete = {
--Type <RET> for more, q to quit, c to continue without paging--
            _vptr.EventSource = 0xdea770 <vtable for EventSource<Threading::EventListener_Thread>+16>, 
            m_listeners = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xaac12d0 <mtgsThread+352>, 
                      _M_prev = 0xaac12d0 <mtgsThread+352>}, <No data fields>}}}, <No data fields>}, 
            m_cache_copy = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xaac12e0 <mtgsThread+368>, 
                      _M_prev = 0xaac12e0 <mtgsThread+368>}, <No data fields>}}}, <No data fields>}, m_cache_valid = false, m_listeners_lock = {
              _vptr.Mutex = 0xdea538 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}}}
#12 0x000000000070cde5 in Threading::pxThread::_internal_callback (itsme=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-8db0b52821fafabcc556b3669e217bc9c91e5805/common/ThreadTools.cpp:709
        __PRETTY_FUNCTION__ = "static void* Threading::pxThread::_internal_callback(void*)"
#13 0x00007f5b6fe1ae0e in start_thread (arg=0x7f5b3dffb640) at pthread_create.c:463
        ret = <optimized out>
        pd = 0x7f5b3dffb640
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140029858920000, -1312857021331955474, 140029884093551, 0, 140029858920000, 248178704, 1401095030975865070, 
                1400923764990517486}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#14 0x00007f5b6dfce64f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.
(gdb) 
SupervisedThinking commented 2 years ago

I've tried different wxWidgets versions too, still fails. Vulkan works fine so it's most likely linked to the OpenGL shader cache PR.

TellowKrinkle commented 2 years ago

Can you build in Debug with -DUSE_ASAN=ON and get another backtrace?

SupervisedThinking commented 2 years ago

@tellowkrinkle

bt of https://github.com/PCSX2/pcsx2/releases/tag/v1.7.2356

phoenix:~ # gdb pcsx2
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-libreelec-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcsx2...
(gdb) run
Starting program: /usr/bin/pcsx2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system
Command line parsing...
Command line parsed!
[New Thread 0x7f865c6ed640 (LWP 3096)]
[New Thread 0x7f865beec640 (LWP 3097)]
[New Thread 0x7f865b6eb640 (LWP 3098)]
[New Thread 0x7f865aeea640 (LWP 3099)]
[Thread 0x7f865aeea640 (LWP 3099) exited]
[New Thread 0x7f865aeea640 (LWP 3100)]
[New Thread 0x7f865a6e9640 (LWP 3101)]
[Thread 0x7f865aeea640 (LWP 3100) exited]
[Thread 0x7f865a6e9640 (LWP 3101) exited]
[New Thread 0x7f865a6e9640 (LWP 3102)]
[New Thread 0x7f865aeea640 (LWP 3103)]
[Detaching after vfork from child process 3104]
[New Thread 0x7f8659ee8640 (LWP 3105)]
[New Thread 0x7f8659679640 (LWP 3106)]
[New Thread 0x7f8658e78640 (LWP 3107)]
[Thread 0x7f8659679640 (LWP 3106) exited]
[Thread 0x7f8658e78640 (LWP 3107) exited]
[New Thread 0x7f8658e78640 (LWP 3108)]
[New Thread 0x7f8659679640 (LWP 3109)]
[Thread 0x7f8658e78640 (LWP 3108) exited]
[Thread 0x7f8659679640 (LWP 3109) exited]
[New Thread 0x7f8659679640 (LWP 3110)]
[New Thread 0x7f8658e78640 (LWP 3111)]
[Thread 0x7f8659679640 (LWP 3110) exited]
[Thread 0x7f8658e78640 (LWP 3111) exited]
[New Thread 0x7f8658e78640 (LWP 3112)]
[New Thread 0x7f8659679640 (LWP 3113)]
[Thread 0x7f8658e78640 (LWP 3112) exited]
[Thread 0x7f8659679640 (LWP 3113) exited]
[New Thread 0x7f8659679640 (LWP 3114)]
[New Thread 0x7f8658e78640 (LWP 3115)]
[Thread 0x7f8659679640 (LWP 3114) exited]
[Thread 0x7f8658e78640 (LWP 3115) exited]
[New Thread 0x7f8658e78640 (LWP 3116)]
[New Thread 0x7f8659679640 (LWP 3117)]
[Thread 0x7f8658e78640 (LWP 3116) exited]
[Thread 0x7f8659679640 (LWP 3117) exited]
[New Thread 0x7f8659679640 (LWP 3118)]
[New Thread 0x7f8658e78640 (LWP 3119)]
[Thread 0x7f8659679640 (LWP 3118) exited]
[Thread 0x7f8658e78640 (LWP 3119) exited]
[New Thread 0x7f8658e78640 (LWP 3120)]
[New Thread 0x7f8659679640 (LWP 3121)]
[Thread 0x7f8658e78640 (LWP 3120) exited]
[Thread 0x7f8659679640 (LWP 3121) exited]
[New Thread 0x7f8659679640 (LWP 3122)]
[New Thread 0x7f8658e78640 (LWP 3123)]
[Thread 0x7f8659679640 (LWP 3122) exited]
[Thread 0x7f8658e78640 (LWP 3123) exited]
[New Thread 0x7f8658e78640 (LWP 3124)]
[New Thread 0x7f8659679640 (LWP 3125)]
[Thread 0x7f8658e78640 (LWP 3124) exited]
[Thread 0x7f8659679640 (LWP 3125) exited]
[New Thread 0x7f8659679640 (LWP 3126)]
[New Thread 0x7f8658e78640 (LWP 3127)]
[Thread 0x7f8659679640 (LWP 3126) exited]
[Thread 0x7f8658e78640 (LWP 3127) exited]
[New Thread 0x7f8658e78640 (LWP 3128)]
[New Thread 0x7f8659679640 (LWP 3129)]
[Thread 0x7f8658e78640 (LWP 3128) exited]
[Thread 0x7f8659679640 (LWP 3129) exited]
[New Thread 0x7f8659679640 (LWP 3159)]
[New Thread 0x7f8658e78640 (LWP 3160)]
[New Thread 0x7f8657ffd640 (LWP 3161)]
[New Thread 0x7f86577ee640 (LWP 3162)]
[New Thread 0x7f8656fc7640 (LWP 3163)]
[New Thread 0x7f86567b0640 (LWP 3164)]
[Thread 0x7f8656fc7640 (LWP 3163) exited]
[Thread 0x7f86567b0640 (LWP 3164) exited]
[Thread 0x7f8657ffd640 (LWP 3161) exited]
[Thread 0x7f86577ee640 (LWP 3162) exited]
[Thread 0x7f865aeea640 (LWP 3103) exited]
[New Thread 0x7f865aeea640 (LWP 3175)]
[New Thread 0x7f86577ee640 (LWP 3176)]
[New Thread 0x7f8657ffd640 (LWP 3177)]
[New Thread 0x7f86567b0640 (LWP 3178)]
[New Thread 0x7f8650896640 (LWP 3179)]
[New Thread 0x7f8650095640 (LWP 3180)]
[New Thread 0x7f864f894640 (LWP 3181)]

Thread 42 "MTGS" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f86577ee640 (LWP 3176)]
0x00007f86635b6813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0x00007f86635b6813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
#1  0x0000000000806f93 in std::string::operator= (__str=..., this=0x7f86567f59d0)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/10.3.0/bits/basic_string.h:3759
#2  GSDeviceOGL::Create (this=<optimized out>, display=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:372
#3  0x0000000000568c8f in DoGSOpen (renderer=renderer@entry=GSRendererType::OGL, basemem=basemem@entry=0xddffc40 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/GS/GS.cpp:207
#4  0x000000000056cce2 in GSopen (config=..., renderer=GSRendererType::OGL, basemem=basemem@entry=0xddffc40 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/GS/GS.cpp:320
#5  0x0000000000c39846 in SysMtgsThread::OpenGS (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/MTGS.cpp:210
#6  SysMtgsThread::OnResumeInThread (this=0xba82ee0 <mtgsThread>, 
    systemsToReinstate=(System_GS | System_SPU2 | System_PAD | System_FW | System_CDVD | System_USB | System_DEV9 | System_MCD))
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/MTGS.cpp:582
#7  0x000000000092a66a in SysThreadBase::StateCheckInThread (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/System/SysThreadBase.cpp:363
#8  0x0000000000c3524d in SysMtgsThread::ExecuteTaskInThread (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/MTGS.cpp:282
#9  0x0000000000e8a530 in Threading::pxThread::_try_virtual_invoke (this=this@entry=0xba82ee0 <mtgsThread>, method=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:571
#10 0x0000000000e8c8af in Threading::pxThread::_internal_execute (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:670
#11 0x0000000000e8ca09 in Threading::pxThread::internal_callback_helper (itsme=itsme@entry=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:721
#12 0x0000000000e8cc99 in Threading::pxThread::_internal_callback (itsme=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:709
#13 0x00007f8665116e0e in start_thread (arg=0x7f86577ee640) at pthread_create.c:463
#14 0x00007f86632b464f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) 
SupervisedThinking commented 2 years ago

backtrace full

(gdb) backtrace full
#0  0x00007f86635b6813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
No symbol table info available.
#1  0x0000000000806f93 in std::string::operator= (__str=..., this=0x7f86567f59d0)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/10.3.0/bits/basic_string.h:3759
No locals.
#2  GSDeviceOGL::Create (this=<optimized out>, display=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:372
        gl_auto_pop = <optimized out>
        shader = <optimized out>
        point = <optimized out>
        bilinear = <optimized out>
        point_range = <optimized out>
        line_range = <optimized out>
        gl_auto_pop = <optimized out>
        vram = <optimized out>
#3  0x0000000000568c8f in DoGSOpen (renderer=renderer@entry=GSRendererType::OGL, basemem=basemem@entry=0xddffc40 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/GS/GS.cpp:207
        display = 0x6070003dffc0
        __PRETTY_FUNCTION__ = "bool DoGSOpen(GSRendererType, u8*)"
#4  0x000000000056cce2 in GSopen (config=..., renderer=GSRendererType::OGL, basemem=basemem@entry=0xddffc40 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/GS/GS.cpp:320
No locals.
#5  0x0000000000c39846 in SysMtgsThread::OpenGS (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/MTGS.cpp:210
No locals.
#6  SysMtgsThread::OnResumeInThread (this=0xba82ee0 <mtgsThread>, 
    systemsToReinstate=(System_GS | System_SPU2 | System_PAD | System_FW | System_CDVD | System_USB | System_DEV9 | System_MCD))
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/MTGS.cpp:582
No locals.
#7  0x000000000092a66a in SysThreadBase::StateCheckInThread (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/System/SysThreadBase.cpp:363
        systemsToTearDown = <optimized out>
        __PRETTY_FUNCTION__ = "virtual bool SysThreadBase::StateCheckInThread()"
#8  0x0000000000c3524d in SysMtgsThread::ExecuteTaskInThread (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/pcsx2/MTGS.cpp:282
        busy = <optimized out>
        __PRETTY_FUNCTION__ = <optimized out>
#9  0x0000000000e8a530 in Threading::pxThread::_try_virtual_invoke (this=this@entry=0xba82ee0 <mtgsThread>, method=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:571
No locals.
#10 0x0000000000e8c8af in Threading::pxThread::_internal_execute (this=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:670
No locals.
#11 0x0000000000e8ca09 in Threading::pxThread::internal_callback_helper (itsme=itsme@entry=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:721
        __clframe = <optimized out>
        owner = <optimized out>
#12 0x0000000000e8cc99 in Threading::pxThread::_internal_callback (itsme=0xba82ee0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-a44fe29b8dd26f5def9d84331aa0ae32fcc0fa1f/common/ThreadTools.cpp:709
        __PRETTY_FUNCTION__ = "static void* Threading::pxThread::_internal_callback(void*)"
#13 0x00007f8665116e0e in start_thread (arg=0x7f86577ee640) at pthread_create.c:463
        ret = <optimized out>
        pd = 0x7f86577ee640
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140214970279488, 27387678510682463, 140215027925071, 0, 140214970279488, 106927507069520, -41128265869815457, 
                -41228593466830497}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#14 0x00007f86632b464f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.
TellowKrinkle commented 2 years ago

Are you sure that's a debug build? Debug builds should not have half the variables optimized out

SupervisedThinking commented 2 years ago

Well I've compiled the pcsx2 package with debug & gdb does read the debug symbols, doesn't it?

According to this https://www.linuxsecrets.com/1213-print-optimized-out-value-in-gdb I rather have to set -O0 instead of -O2 or else 🤔

TellowKrinkle commented 2 years ago

I guess I should have specified, by debug I meant adding adding the -DCMAKE_BUILD_TYPE=Debug flag to cmake, which would set O0 and a number of other things

SupervisedThinking commented 2 years ago

As I said the toolchain should apply -DCMAKE_BUILD_TYPE=Debug when I build with debug https://github.com/LibreELEC/LibreELEC.tv/blob/master/scripts/build#L133 and since debug symbols haven't stripped debug should work 🤔

I guess I have a chat with other devs of LibreELEC then - is there any PCSX2 specific build flag which might overwrite flags?

TellowKrinkle commented 2 years ago

We used to mess with them a lot but that should all be gone now

If you can customize the make/ninja call, make VERBOSE=1 or ninja -v will give the options it's sending to the compiler which might be useful

SupervisedThinking commented 2 years ago

https://github.com/PCSX2/pcsx2/releases/tag/v1.7.2369 + https://github.com/PCSX2/pcsx2/pull/5513

full_build_log.tar.gz

EDIT: guess I found the quirk https://github.com/LibreELEC/LibreELEC.tv/blob/master/config/optimize#L42-L43 will rebuild, recheck & upload a new backtrace with -O0

SupervisedThinking commented 2 years ago

@tellowkrinkle I hope this helps now 👍🏻

https://github.com/PCSX2/pcsx2/releases/tag/v1.7.2369 + https://github.com/PCSX2/pcsx2/pull/5513

backtrace

phoenix:~ # gdb pcsx2
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-libreelec-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcsx2...
(gdb) run
Starting program: /usr/bin/pcsx2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system
Command line parsing...
Command line parsed!
[New Thread 0x7f7b3dfed640 (LWP 1970)]
[New Thread 0x7f7b3d78c640 (LWP 1971)]
[New Thread 0x7f7b3cf75640 (LWP 1972)]
[New Thread 0x7f7b3c664640 (LWP 1973)]
[Thread 0x7f7b3c664640 (LWP 1973) exited]
[New Thread 0x7f7b3c664640 (LWP 1974)]
[New Thread 0x7f7b3be4d640 (LWP 1975)]
[Thread 0x7f7b3c664640 (LWP 1974) exited]
[Thread 0x7f7b3be4d640 (LWP 1975) exited]
[New Thread 0x7f7b3be4d640 (LWP 1976)]
[New Thread 0x7f7b3c664640 (LWP 1977)]
[Detaching after vfork from child process 1978]
[New Thread 0x7f7b3b548640 (LWP 1979)]
[New Thread 0x7f7b3ac93640 (LWP 1980)]
[New Thread 0x7f7b3a47c640 (LWP 1981)]
[Thread 0x7f7b3ac93640 (LWP 1980) exited]
[Thread 0x7f7b3a47c640 (LWP 1981) exited]
[New Thread 0x7f7b3a47c640 (LWP 1982)]
[New Thread 0x7f7b3ac93640 (LWP 1983)]
[Thread 0x7f7b3a47c640 (LWP 1982) exited]
[Thread 0x7f7b3ac93640 (LWP 1983) exited]
[New Thread 0x7f7b3ac93640 (LWP 1984)]
[New Thread 0x7f7b3a47c640 (LWP 1985)]
[Thread 0x7f7b3ac93640 (LWP 1984) exited]
[Thread 0x7f7b3a47c640 (LWP 1985) exited]
[New Thread 0x7f7b3a47c640 (LWP 1986)]
[New Thread 0x7f7b3ac93640 (LWP 1987)]
[Thread 0x7f7b3a47c640 (LWP 1986) exited]
[Thread 0x7f7b3ac93640 (LWP 1987) exited]
[New Thread 0x7f7b3ac93640 (LWP 1988)]
[New Thread 0x7f7b3a47c640 (LWP 1989)]
[Thread 0x7f7b3ac93640 (LWP 1988) exited]
[Thread 0x7f7b3a47c640 (LWP 1989) exited]
[New Thread 0x7f7b3a47c640 (LWP 1990)]
[New Thread 0x7f7b3ac93640 (LWP 1991)]
[Thread 0x7f7b3a47c640 (LWP 1990) exited]
[Thread 0x7f7b3ac93640 (LWP 1991) exited]
[New Thread 0x7f7b3ac93640 (LWP 1992)]
[New Thread 0x7f7b3a47c640 (LWP 1993)]
[Thread 0x7f7b3ac93640 (LWP 1992) exited]
[Thread 0x7f7b3a47c640 (LWP 1993) exited]
[New Thread 0x7f7b3a47c640 (LWP 1994)]
[New Thread 0x7f7b3ac93640 (LWP 1995)]
[Thread 0x7f7b3a47c640 (LWP 1994) exited]
[Thread 0x7f7b3ac93640 (LWP 1995) exited]
[New Thread 0x7f7b3ac93640 (LWP 1996)]
[New Thread 0x7f7b3a47c640 (LWP 1997)]
[Thread 0x7f7b3ac93640 (LWP 1996) exited]
[Thread 0x7f7b3a47c640 (LWP 1997) exited]
[New Thread 0x7f7b3a47c640 (LWP 1998)]
[New Thread 0x7f7b3ac93640 (LWP 1999)]
[Thread 0x7f7b3a47c640 (LWP 1998) exited]
[Thread 0x7f7b3ac93640 (LWP 1999) exited]
[New Thread 0x7f7b3ac93640 (LWP 2000)]
[New Thread 0x7f7b3a47c640 (LWP 2001)]
[Thread 0x7f7b3ac93640 (LWP 2000) exited]
[Thread 0x7f7b3a47c640 (LWP 2001) exited]
[New Thread 0x7f7b3a47c640 (LWP 2002)]
[New Thread 0x7f7b3ac93640 (LWP 2003)]
[Thread 0x7f7b3a47c640 (LWP 2002) exited]
[Thread 0x7f7b3ac93640 (LWP 2003) exited]
[New Thread 0x7f7b3ac93640 (LWP 2040)]
[New Thread 0x7f7b3a47c640 (LWP 2041)]
[New Thread 0x7f7b3960d640 (LWP 2042)]
[New Thread 0x7f7b38de6640 (LWP 2043)]
[New Thread 0x7f7b385cf640 (LWP 2044)]
[Thread 0x7f7b38de6640 (LWP 2043) exited]
[Thread 0x7f7b385cf640 (LWP 2044) exited]
[Thread 0x7f7b3960d640 (LWP 2042) exited]
[Thread 0x7f7b3c664640 (LWP 1977) exited]
[New Thread 0x7f7b3c664640 (LWP 2054)]
[New Thread 0x7f7b3960d640 (LWP 2055)]
[New Thread 0x7f7b385cf640 (LWP 2056)]
[New Thread 0x7f7b38de6640 (LWP 2057)]
[New Thread 0x7f7b31e6d640 (LWP 2058)]
[New Thread 0x7f7b31656640 (LWP 2059)]
[New Thread 0x7f7b30db9640 (LWP 2060)]

Thread 41 "MTGS" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f7b3960d640 (LWP 2055)]
0x00007f7b44dc4813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
(gdb) backtrace full
#0  0x00007f7b44dc4813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
No symbol table info available.
#1  0x00007f7b44dc484a in std::string::operator=(std::string&&) () from /usr/lib/libstdc++.so.6
No symbol table info available.
#2  0x0000000000ada335 in GSDeviceOGL::Create (this=0x7f7b2f3b2800, display=0x6070003ea7c0)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:372
        gl_auto_pop = {<No data fields>}
        shader = {<std::_Optional_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, false>> = {<std::_Optional_base_impl<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Optional_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, false> >> = {<No data fields>}, 
            _M_payload = {<std::_Optional_payload<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, true, false, false>> = {<std::_Optional_payload_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {_M_payload = {_M_empty = {<No data fields>}, _M_value = {
                      static npos = 18446744073709551615, 
                      _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                        _M_p = 0x627000069118 "//#version 420 // Keep it for editor detection\n\n\n#ifdef VERTEX_SHADER\n\nlayout(location = 0) in vec2 POSITION;\nlayout(location = 1) in vec2 TEXCOORD0;\nlayout(location = 7) in vec4 COLOR;\n\n// FIXME set "...}}}, 
                  _M_engaged = true}, <No data fields>}, <No data fields>}}, <std::_Enable_copy_move<true, true, true, true, std::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>}
        point = {{{tau = 0 '\000', tav = 1 '\001', biln = 0 '\000', triln = 3 '\003', aniso = 1 '\001', lodclamp = 0 '\000'}, key = 90 'Z'}}
        bilinear = {{{tau = 0 '\000', tav = 0 '\000', biln = 0 '\000', triln = 2 '\002', aniso = 1 '\001', lodclamp = 1 '\001'}, key = 208 '\320'}}
        point_range = {1, 255}
        line_range = {1, 7}
        gl_auto_pop = {<No data fields>}
        vram = {962640800, 32635, 222880896, 0}
#3  0x00000000006a661e in DoGSOpen (renderer=GSRendererType::OGL, basemem=0xe7881c0 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/GS/GS.cpp:207
        display = 0x6070003ea7c0
        __PRETTY_FUNCTION__ = "bool DoGSOpen(GSRendererType, u8*)"
#4  0x00000000006a76a6 in GSopen (config=..., renderer=GSRendererType::OGL, basemem=0xe7881c0 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/GS/GS.cpp:320
No locals.
#5  0x00000000013411db in SysMtgsThread::OpenGS (this=0xd513ca0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/MTGS.cpp:210
No locals.
#6  0x0000000001342e80 in SysMtgsThread::OnResumeInThread (this=0xd513ca0 <mtgsThread>, 
    systemsToReinstate=(System_GS | System_SPU2 | System_PAD | System_FW | System_CDVD | System_USB | System_DEV9 | System_MCD))
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/MTGS.cpp:582
No locals.
--Type <RET> for more, q to quit, c to continue without paging--
#7  0x0000000000d2b9b7 in SysThreadBase::StateCheckInThread (this=0xd513ca0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/System/SysThreadBase.cpp:363
        systemsToTearDown = 0
        __PRETTY_FUNCTION__ = "virtual bool SysThreadBase::StateCheckInThread()"
#8  0x00000000013416ca in SysMtgsThread::ExecuteTaskInThread (this=0xd513ca0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/MTGS.cpp:282
        busy = {_vptr.RingBufferLock = 0x300d6b0 <vtable for RingBufferLock+16>, m_lock1 = {_vptr.ScopedLock = 0x302c180 <vtable for Threading::ScopedLock+16>, 
            m_lock = 0xd513f28 <mtgsThread+648>, m_IsLocked = false}, m_lock2 = {_vptr.ScopedLock = 0x302c180 <vtable for Threading::ScopedLock+16>, 
            m_lock = 0xd513f58 <mtgsThread+696>, m_IsLocked = false}, m_mtgs = @0xd513ca0}
        __PRETTY_FUNCTION__ = <optimized out>
#9  0x00000000017beafb in Threading::pxThread::_try_virtual_invoke (this=0xd513ca0 <mtgsThread>, method=&virtual Threading::pxThread::ExecuteTaskInThread())
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:571
No locals.
#10 0x00000000017bf85c in Threading::pxThread::_internal_execute (this=0xd513ca0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:670
No locals.
#11 0x00000000017bfe63 in Threading::pxThread::internal_callback_helper (itsme=0xd513ca0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:721
        __clframe = {__cancel_routine = 0x17b9d66 <Threading::pxThread::_pt_callback_cleanup(void*)>, __cancel_arg = 0xd513ca0 <mtgsThread>, __do_it = 1, 
          __cancel_type = 0}
        owner = @0xd513ca0: {_vptr.pxThread = 0x30de4d0 <vtable for SysMtgsThread+16>, m_name = {static npos = 18446744073709551615, m_impl = {
              static npos = 18446744073709551615, 
              _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0x6060000071d8 L"MTGS"}}, 
            m_convertedToChar = {m_str = 0x0, m_len = 0}}, m_thread = 140167220352576, m_native_id = 140167220352576, m_native_handle = 0, m_sem_event = {
            _vptr.Semaphore = 0x302c290 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_sem_startup = {
            _vptr.Semaphore = 0x302c290 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_mtx_InThread = {
            _vptr.Mutex = 0x302c1c8 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 1, __count = 0, __owner = 2055, __nusers = 1, __kind = 0, 
                __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = "\001\000\000\000\000\000\000\000\a\b\000\000\001", '\000' <repeats 26 times>, __align = 1}}, m_mtx_start = {<Threading::Mutex> = {
              _vptr.Mutex = 0x302c1a0 <vtable for Threading::MutexRecursive+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 1, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 16 times>, "\001", '\000' <repeats 22 times>, 
                __align = 0}}, <No data fields>}, m_mtx_ThreadName = {_vptr.Mutex = 0x302c1c8 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = '\000' <repeats 39 times>, __align = 0}}, m_detached = {_M_base = {static _S_alignment = 1, _M_i = false}, static is_always_lock_free = true}, 
          m_running = {_M_base = {static _S_alignment = 1, _M_i = true}, static is_always_lock_free = true}, m_except = {m_ptr = {_M_b = {_M_p = 0x0}, 
              static is_always_lock_free = <optimized out>}, m_mtx = {_vptr.Mutex = 0x302c1c8 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                  __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
                __size = '\000' <repeats 39 times>, __align = 0}}}, m_evtsrc_OnDelete = {
--Type <RET> for more, q to quit, c to continue without paging--
            _vptr.EventSource = 0x302c418 <vtable for EventSource<Threading::EventListener_Thread>+16>, 
            m_listeners = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xd513e00 <mtgsThread+352>, 
                      _M_prev = 0xd513e00 <mtgsThread+352>}, <No data fields>}}}, <No data fields>}, 
            m_cache_copy = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xd513e10 <mtgsThread+368>, 
                      _M_prev = 0xd513e10 <mtgsThread+368>}, <No data fields>}}}, <No data fields>}, m_cache_valid = false, m_listeners_lock = {
              _vptr.Mutex = 0x302c1c8 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}}}
#12 0x00000000017bfcc6 in Threading::pxThread::_internal_callback (itsme=0xd513ca0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:709
        __PRETTY_FUNCTION__ = "static void* Threading::pxThread::_internal_callback(void*)"
#13 0x00007f7b46924e0e in start_thread (arg=0x7f7b3960d640) at pthread_create.c:463
        ret = <optimized out>
        pd = 0x7f7b3960d640
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140167220352576, -2629757818086908638, 140167271031103, 0, 140167220352576, 106927507068496, 2699710009182231842, 
                2699824508559662370}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#14 0x00007f7b44ac264f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.
(gdb) 
SupervisedThinking commented 2 years ago

same as above but with -Og

phoenix:~ # gdb pcsx2
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-libreelec-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcsx2...
(gdb) run
Starting program: /usr/bin/pcsx2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7f4ff8668640 (LWP 2252)]
[New Thread 0x7f4ff7e67640 (LWP 2253)]
[New Thread 0x7f4ff7666640 (LWP 2254)]
[New Thread 0x7f4ff6e4f640 (LWP 2255)]
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
SetLanguage: 'English (U.S.)' [en_US] is not supported by the operating system
Command line parsing...
Command line parsed!
[New Thread 0x7f4ff6628640 (LWP 2256)]
[New Thread 0x7f4ff5e11640 (LWP 2257)]
[New Thread 0x7f4ff55fa640 (LWP 2258)]
[New Thread 0x7f4ff4d29640 (LWP 2259)]
[Thread 0x7f4ff4d29640 (LWP 2259) exited]
[New Thread 0x7f4ff4d29640 (LWP 2260)]
[New Thread 0x7f4ff4502640 (LWP 2261)]
[Thread 0x7f4ff4d29640 (LWP 2260) exited]
[Thread 0x7f4ff4502640 (LWP 2261) exited]
[New Thread 0x7f4ff4502640 (LWP 2262)]
[New Thread 0x7f4ff4d29640 (LWP 2263)]
[Detaching after vfork from child process 2264]
[New Thread 0x7f4ff3c13640 (LWP 2265)]
[New Thread 0x7f4ff338e640 (LWP 2266)]
[New Thread 0x7f4ff2b77640 (LWP 2267)]
[Thread 0x7f4ff338e640 (LWP 2266) exited]
[Thread 0x7f4ff2b77640 (LWP 2267) exited]
[New Thread 0x7f4ff2b77640 (LWP 2268)]
[New Thread 0x7f4ff338e640 (LWP 2269)]
[Thread 0x7f4ff2b77640 (LWP 2268) exited]
[Thread 0x7f4ff338e640 (LWP 2269) exited]
[New Thread 0x7f4ff338e640 (LWP 2270)]
[New Thread 0x7f4ff2b77640 (LWP 2271)]
[Thread 0x7f4ff338e640 (LWP 2270) exited]
[Thread 0x7f4ff2b77640 (LWP 2271) exited]
[New Thread 0x7f4ff2b77640 (LWP 2272)]
[New Thread 0x7f4ff338e640 (LWP 2273)]
[Thread 0x7f4ff2b77640 (LWP 2272) exited]
[Thread 0x7f4ff338e640 (LWP 2273) exited]
[New Thread 0x7f4ff338e640 (LWP 2274)]
[New Thread 0x7f4ff2b77640 (LWP 2275)]
[Thread 0x7f4ff338e640 (LWP 2274) exited]
[Thread 0x7f4ff2b77640 (LWP 2275) exited]
[New Thread 0x7f4ff2b77640 (LWP 2276)]
[New Thread 0x7f4ff338e640 (LWP 2277)]
[Thread 0x7f4ff2b77640 (LWP 2276) exited]
[Thread 0x7f4ff338e640 (LWP 2277) exited]
[New Thread 0x7f4ff338e640 (LWP 2278)]
[New Thread 0x7f4ff2b77640 (LWP 2279)]
[Thread 0x7f4ff338e640 (LWP 2278) exited]
[Thread 0x7f4ff2b77640 (LWP 2279) exited]
[New Thread 0x7f4ff2b77640 (LWP 2280)]
[New Thread 0x7f4ff338e640 (LWP 2281)]
[Thread 0x7f4ff2b77640 (LWP 2280) exited]
[Thread 0x7f4ff338e640 (LWP 2281) exited]
[New Thread 0x7f4ff338e640 (LWP 2282)]
[New Thread 0x7f4ff2b77640 (LWP 2283)]
[Thread 0x7f4ff338e640 (LWP 2282) exited]
[Thread 0x7f4ff2b77640 (LWP 2283) exited]
[New Thread 0x7f4ff2b77640 (LWP 2284)]
[New Thread 0x7f4ff338e640 (LWP 2285)]
[Thread 0x7f4ff2b77640 (LWP 2284) exited]
[Thread 0x7f4ff338e640 (LWP 2285) exited]
[New Thread 0x7f4ff338e640 (LWP 2286)]
[New Thread 0x7f4ff2b77640 (LWP 2287)]
[Thread 0x7f4ff338e640 (LWP 2286) exited]
[Thread 0x7f4ff2b77640 (LWP 2287) exited]
[New Thread 0x7f4ff2b77640 (LWP 2288)]
[New Thread 0x7f4ff338e640 (LWP 2289)]
[Thread 0x7f4ff2b77640 (LWP 2288) exited]
[Thread 0x7f4ff338e640 (LWP 2289) exited]
[Thread 0x7f4ff4d29640 (LWP 2263) exited]
[New Thread 0x7f4ff4d29640 (LWP 2389)]
[New Thread 0x7f4ff338e640 (LWP 2390)]
[New Thread 0x7f4ff2b77640 (LWP 2391)]
[New Thread 0x7f4ff1cec640 (LWP 2392)]
[New Thread 0x7f4ff14d5640 (LWP 2393)]
[New Thread 0x7f4ff0cbe640 (LWP 2394)]
[New Thread 0x7f4ff04a7640 (LWP 2395)]
[New Thread 0x7f4fefc80640 (LWP 2396)]
[New Thread 0x7f4fef469640 (LWP 2397)]
[Thread 0x7f4fefc80640 (LWP 2396) exited]
[Thread 0x7f4fef469640 (LWP 2397) exited]
[Thread 0x7f4ff1cec640 (LWP 2392) exited]
[Thread 0x7f4ff04a7640 (LWP 2395) exited]
[Thread 0x7f4ff14d5640 (LWP 2393) exited]
[Thread 0x7f4ff0cbe640 (LWP 2394) exited]
[Thread 0x7f4ff338e640 (LWP 2390) exited]
[New Thread 0x7f4ff338e640 (LWP 2408)]
[New Thread 0x7f4ff0cbe640 (LWP 2409)]
[New Thread 0x7f4ff14d5640 (LWP 2410)]
[New Thread 0x7f4ff04a7640 (LWP 2411)]
[New Thread 0x7f4fefc80640 (LWP 2412)]
[New Thread 0x7f4fef46f640 (LWP 2413)]
[New Thread 0x7f4fee2a3640 (LWP 2414)]

Thread 49 "MTGS" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f4ff0cbe640 (LWP 2409)]
0x00007f500447f813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
(gdb) backtrace full
#0  0x00007f500447f813 in std::string::swap(std::string&) () from /usr/lib/libstdc++.so.6
No symbol table info available.
#1  0x0000000000b4a32e in std::string::operator= (__str=..., this=0x7f4ff155c9d0)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/10.3.0/bits/basic_string.h:3763
No locals.
#2  GSDeviceOGL::Create (this=0x7f4ff155c800, display=<optimized out>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:372
        gl_auto_pop = <optimized out>
        shader = <optimized out>
        point = <optimized out>
        bilinear = <optimized out>
        point_range = <optimized out>
        line_range = <optimized out>
        gl_auto_pop = <optimized out>
        vram = <optimized out>
#3  0x000000000062e697 in DoGSOpen (renderer=renderer@entry=GSRendererType::OGL, basemem=basemem@entry=0xeaf9f00 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/GS/GS.cpp:207
        display = 0x60700045a7c0
        __PRETTY_FUNCTION__ = "bool DoGSOpen(GSRendererType, u8*)"
#4  0x0000000000633aa8 in GSopen (config=..., renderer=GSRendererType::OGL, basemem=basemem@entry=0xeaf9f00 <RingBuffer+8388608> "")
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/GS/GS.cpp:320
No locals.
#5  0x0000000001405a58 in SysMtgsThread::OpenGS (this=0xc8810a0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/MTGS.cpp:210
No locals.
#6  0x0000000001424749 in SysMtgsThread::OnResumeInThread (this=0xc8810a0 <mtgsThread>, 
    systemsToReinstate=(System_GS | System_SPU2 | System_PAD | System_FW | System_CDVD | System_USB | System_DEV9 | System_MCD))
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/MTGS.cpp:582
No locals.
#7  0x0000000000d143a4 in SysThreadBase::StateCheckInThread (this=0xc8810a0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/System/SysThreadBase.cpp:363
        systemsToTearDown = <optimized out>
        __PRETTY_FUNCTION__ = "virtual bool SysThreadBase::StateCheckInThread()"
#8  0x00000000014189d5 in SysMtgsThread::ExecuteTaskInThread (this=0xc8810a0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/pcsx2/MTGS.cpp:282
        busy = <optimized out>
        __PRETTY_FUNCTION__ = <optimized out>
#9  0x000000000182c0c0 in Threading::pxThread::_try_virtual_invoke (this=this@entry=0xc8810a0 <mtgsThread>, method=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:571
No locals.
#10 0x000000000183097b in Threading::pxThread::_internal_execute (this=this@entry=0xc8810a0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:670
No locals.
#11 0x0000000001830b72 in Threading::pxThread::internal_callback_helper (itsme=itsme@entry=0xc8810a0 <mtgsThread>)
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:721
        __clframe = <optimized out>
        owner = @0xc8810a0: {_vptr.pxThread = 0x2976210 <vtable for SysMtgsThread+16>, m_name = {static npos = 18446744073709551615, m_impl = {
              static npos = 18446744073709551615, 
              _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0x6060000071d8 L"MTGS"}}, 
            m_convertedToChar = {m_str = 0x0, m_len = 0}}, m_thread = 139981319038528, m_native_id = 139981319038528, m_native_handle = 0, m_sem_event = {
            _vptr.Semaphore = 0x292e770 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_sem_startup = {
            _vptr.Semaphore = 0x292e770 <vtable for Threading::Semaphore+16>, m_sema = {__size = '\000' <repeats 31 times>, __align = 0}}, m_mtx_InThread = {
            _vptr.Mutex = 0x292e660 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 1, __count = 0, __owner = 2409, __nusers = 1, __kind = 0, 
                __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = "\001\000\000\000\000\000\000\000i\t\000\000\001", '\000' <repeats 26 times>, __align = 1}}, m_mtx_start = {<Threading::Mutex> = {
              _vptr.Mutex = 0x292e688 <vtable for Threading::MutexRecursive+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 1, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 16 times>, "\001", '\000' <repeats 22 times>, 
                __align = 0}}, <No data fields>}, m_mtx_ThreadName = {_vptr.Mutex = 0x292e660 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
              __size = '\000' <repeats 39 times>, __align = 0}}, m_detached = {_M_base = {static _S_alignment = 1, _M_i = false}, static is_always_lock_free = true}, 
          m_running = {_M_base = {static _S_alignment = 1, _M_i = true}, static is_always_lock_free = true}, m_except = {m_ptr = {_M_b = {_M_p = 0x0}, 
              static is_always_lock_free = <optimized out>}, m_mtx = {_vptr.Mutex = 0x292e660 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, 
                  __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
                __size = '\000' <repeats 39 times>, __align = 0}}}, m_evtsrc_OnDelete = {
            _vptr.EventSource = 0x292e898 <vtable for EventSource<Threading::EventListener_Thread>+16>, 
            m_listeners = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xc881200 <mtgsThread+352>, 
                      _M_prev = 0xc881200 <mtgsThread+352>}, <No data fields>}}}, <No data fields>}, 
            m_cache_copy = {<std::_List_base<Threading::EventListener_Thread*, std::allocator<Threading::EventListener_Thread*> >> = {
                _M_impl = {<std::allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<__gnu_cxx::new_allocator<std::_List_node<Threading::EventListener_Thread*> >> = {<No data fields>}, <No data fields>}, _M_node = {<std::__detail::_List_node_base> = {_M_next = 0xc881210 <mtgsThread+368>, 
                      _M_prev = 0xc881210 <mtgsThread+368>}, <No data fields>}}}, <No data fields>}, m_cache_valid = false, m_listeners_lock = {
              _vptr.Mutex = 0x292e660 <vtable for Threading::Mutex+16>, m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, 
                  __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}}}
#12 0x00000000018310ed in Threading::pxThread::_internal_callback (itsme=0xc8810a0 <mtgsThread>)
--Type <RET> for more, q to quit, c to continue without paging--
    at /build/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/pcsx2-5b6986c230dca86634ad61aa0ce12e5801507b31/common/ThreadTools.cpp:709
        __PRETTY_FUNCTION__ = "static void* Threading::pxThread::_internal_callback(void*)"
#13 0x00007f5005fdfe0e in start_thread (arg=0x7f4ff0cbe640) at pthread_create.c:463
        ret = <optimized out>
        pd = 0x7f4ff0cbe640
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139981319038528, -2618193355095829376, 139981359726623, 0, 139981319038528, 106996226699536, 2681241105432417408, 
                2669021561502143616}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#14 0x00007f500417d64f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.
TellowKrinkle commented 2 years ago

One thing to try: Go into GSDeviceOGL.cppGSDeviceOGL::GSDeviceOGL and comment out all the memsets

It that doesn't work, I'm going to need you to inspect this a bit more in the debugger.

  1. Open the O0 build in gdb, and set a breakpoint on the line that crashes. It should be this line:
    m_convert.vs = GetShaderSource("vs_main", GL_VERTEX_SHADER, m_shader_common_header, *shader, {});
  2. Run it through once just to verify that it crashes if you step after the breakpoint hits
  3. Run it to the breakpoint
  4. Inspect m_convert.vs. The expected value is an empty string.

If m_convert.vs was an empty string:

  1. Step into GetShaderSource, then step over the calls until you get to the line return src;. Inspect src. The expected value is a string that looks like a glsl shader (should start with #version)
  2. Report here the content of src

If m_convert.vs was not an empty string:

  1. Clear any previous breakpoints and set a breakpoint after the memsets in GSDeviceOGL::GSDeviceOGL (constructor)
  2. When the breakpoint hits, add a watchpoint to m_convert.vs. If it complains saying it can't watchpoint a 24-byte type, try adding the watchpoint to the expression &m_convert.vs. Then continue. Report where the breakpoint hits.
SupervisedThinking commented 2 years ago

@tellowkrinkle these changes allow me to successfully boot games https://github.com/SupervisedThinking/pcsx2/commit/66b4bef074cd97c948c52b37534869f4d9331102 so it's indeed related to the memsets 👍🏻

TellowKrinkle commented 2 years ago

Can you test that PR and make sure it works for you?