Open angelnu opened 3 years ago
Dolphin on Ubuntu 20.04 docker container is failing to start on both retroarch stable (from ppa) and self compiled:
gdb run:
(gdb) run Starting program: /home/retro/dev/retroarch/retroarch -L dolphin_libretro.so /home/retro/software/emuladores/consolas/Nintendo\ Wii/Games/The\ Legend\ of\ Zelda\ Twilight\ Princess\ \[RZDP01\]/RZDP01.wbfs [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffec696700 (LWP 39990)] [New Thread 0x7fffe966b700 (LWP 39991)] [New Thread 0x7fffe8e6a700 (LWP 39992)] [New Thread 0x7fffe3fff700 (LWP 39993)] [New Thread 0x7fffe37fe700 (LWP 39994)] [New Thread 0x7fffe2ffd700 (LWP 39995)] [New Thread 0x7fffe0da9700 (LWP 39996)] [New Thread 0x7fffce849700 (LWP 39997)] [New Thread 0x7fffce048700 (LWP 39998)] [New Thread 0x7fffcd847700 (LWP 39999)] [Detaching after vfork from child process 40000] [New Thread 0x7fffa8da9700 (LWP 40001)] Thread 1 "Emuthread - Sta" received signal SIGBUS, Bus error. __memset_avx2_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:151 151 ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: No such file or directory. (gdb) bt #0 __memset_avx2_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:151 #1 0x00007fffe9bf2ca4 in Memory::Clear() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/HW/Memmap.cpp:476 #2 0x00007fffe9bf234d in Memory::Init() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/HW/Memmap.cpp:325 #3 0x00007fffe9bf1649 in HW::Init() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/HW/HW.cpp:45 #4 0x00007fffe9b13c10 in Core::EmuThread(WindowSystemInfo) (wsi=...) at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/Core.cpp:459 #5 0x00007fffe9acbee0 in retro_run() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/DolphinLibretro/Main.cpp:187 #6 0x00005555556789f8 in core_run () at retroarch.c:39344 #7 0x000055555567759e in runloop_iterate () at retroarch.c:38686 #8 0x0000555555643d57 in rarch_main (argc=4, argv=0x7fffffffeae8, data=0x0) at retroarch.c:15756 #9 0x0000555555839959 in main(int, char**) (argc=4, argv=0x7fffffffeae8) at ui/drivers/ui_qt.cpp:4318
Full Backtrace:
(gdb) bt --full No symbol "full" in current context. (gdb) bt -full #0 __memset_avx2_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:151 #1 0x00007fffe9bf2ca4 in Memory::Clear() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/HW/Memmap.cpp:476 #2 0x00007fffe9bf234d in Memory::Init() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/HW/Memmap.cpp:325 get_mem1_size = {<No data fields>} get_mem2_size = {<No data fields>} wii = true flags = 2 mem_size = 100925440 #3 0x00007fffe9bf1649 in HW::Init() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/HW/HW.cpp:45 #4 0x00007fffe9b13c10 in Core::EmuThread(WindowSystemInfo) (wsi=...) at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/Core.cpp:459 core_parameter = @0x55555675bd90: {m_WiiSDCard = true, m_WiiKeyboard = false, m_WiimoteContinuousScanning = false, m_WiimoteEnableSpeaker = false, connect_wiimotes_for_ciface = false, m_ISOFolder = std::vector of length 0, capacity 0, m_RecursiveISOFolder = false, bEnableDebugging = false, bAutomaticStart = false, bBootToPause = true, cpu_core = PowerPC::CPUCore::JIT64, bJITFollowBranch = true, bJITNoBlockCache = false, bJITNoBlockLinking = false, bJITOff = false, bJITLoadStoreOff = false, bJITLoadStorelXzOff = false, bJITLoadStorelwzOff = false, bJITLoadStorelbzxOff = false, bJITLoadStoreFloatingOff = false, bJITLoadStorePairedOff = false, bJITFloatingPointOff = false, bJITIntegerOff = false, bJITPairedOff = false, bJITSystemRegistersOff = false, bJITBranchOff = false, bJITRegisterCacheOff = false, bFastmem = false, bFPRF = false, bAccurateNaNs = false, iTimingVariance = 40, bCPUThread = true, bEMUThread = false, bDSPThread = false, bDSPHLE = true, bSyncGPUOnSkipIdleHack = true, bHLE_BS2 = true, bEnableCheats = false, bEnableMemcardSdWriting = true, bCopyWiiSaveNetplay = true, bDPL2Decoder = false, iLatency = 0, m_audio_stretch = false, m_audio_stretch_max_latency = 80, bRunCompareServer = false, bRunCompareClient = false, bMMU = false, bLowDCBZHack = false, iBBDumpPort = -1, bFastDiscSpeed = false, bSyncGPU = false, iSyncGpuMaxDistance = 200000, iSyncGpuMinDistance = -200000, fSyncGpuOverclock = 1, SelectedLanguage = 0, bOverrideRegionSettings = false, bWii = true, m_is_mios = false, bConfirmStop = true, bHideCursor = false, bUsePanicHandlers = true, bOnScreenDisplayMessages = true, theme_name = "Clean", m_analytics_id = "", m_analytics_enabled = false, m_analytics_permission_asked = false, m_bt_passthrough_enabled = false, m_bt_passthrough_pid = -1, m_bt_passthrough_vid = -1, m_bt_passthrough_link_keys = "", m_usb_passthrough_devices = std::set with 0 elements, bLoopFifoReplay = true, bEnableCustomRTC = false, m_customRTCValue = 946684800, m_region = DiscIO::Region::PAL, m_strGPUDeterminismMode = "auto", m_GPUDeterminismMode = GPUDeterminismMode::Auto, m_strBootROM = "/home/retro/retroarch/BIOS//dolphin-emu/Sys/GC/EUR/IPL.bin", m_strSRAM = "/home/retro/.config/retroarch/saves/User/GC/SRAM.raw", m_perfDir = "", m_debugger_game_id = "RZDP01", m_disc_booted_from_game_list = true, m_strGbaCartA = "", m_strGbaCartB = "", m_EXIDevice = {ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER, ExpansionInterface::EXIDEVICE_NONE, ExpansionInterface::EXIDEVICE_NONE}, m_SIDevice = {<incomplete type>, <incomplete type>, <incomplete type>, <incomplete type>}, m_bba_mac = "", m_bba_xlink_ip = "127.0.0.1", m_bba_xlink_chat_osd = true, m_InterfaceLanguage = "", m_EmulationSpeed = 0, m_OCEnable = false, m_OCFactor = 1, m_InterfaceExtendedFPSInfo = false, m_show_active_title = true, m_use_builtin_title_database = true, m_ListDrives = false, m_ListWad = true, m_ListElfDol = true, m_ListWii = true, m_ListGC = true, m_ListPal = true, m_ListUsa = true, m_ListJap = true, m_ListAustralia = true, m_ListFrance = true, m_ListGermany = true, m_ListItaly = true, m_ListKorea = true, m_ListNetherlands = true, m_ListRussia = true, m_ListSpain = true, m_ListTaiwan = true, m_ListWorld = true, m_ListUnknown = true, m_ListSort = 3, m_ListSort2 = 0, m_showSystemColumn = true, m_showBannerColumn = true, m_showDescriptionColumn = false, m_showTitleColumn = true, m_showMakerColumn = true, m_showFileNameColumn = false, m_showFilePathColumn = false, m_showIDColumn = false, m_showRegionColumn = true, m_showSizeColumn = true, m_showFileFormatColumn = false, m_showBlockSizeColumn = false, m_showCompressionColumn = false, m_showTagsColumn = false, m_WirelessMac = "", m_PauseMovie = false, m_ShowLag = false, m_ShowFrameCount = false, m_ShowRTC = false, m_strMovieAuthor = "", m_DumpFrames = false, m_DumpFramesSilent = false, m_ShowInputDisplay = false, m_PauseOnFocusLost = false, m_DSPEnableJIT = true, m_DSPCaptureLog = false, m_DumpAudio = false, m_DumpAudioSilent = false, m_IsMuted = false, m_DumpUCode = false, m_Volume = 100, sBackend = "No Audio Output", m_BackgroundInput = false, m_AdapterRumble = {true, true, true, true}, m_AdapterKonga = {false, false, false, false}, m_auto_update_track = "", m_auto_update_hash_override = "", static m_Instance = 0x55555675bd90, m_game_id = "RZDP01", m_gametdb_id = "RZDP01", m_title_description = "The Legend of Zelda: Twilight Princess (RZDP01)", m_title_id = 281476358358096, m_revision = 0} flag_guard = {m_finalizer = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x5555565aec80 <input_x>, _M_const_object = 0x5555565aec80 <input_x>, _M_function_pointer = 0x5555565aec80 <input_x>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x5555565aec80 <input_x>, this adjustment 93825010374528}, _M_pod_data = "\200\354ZVUU\000\000\200\027jVUU\000"}, _M_manager = 0x7fffe9b16317 <std::_Function_base::_Base_manager<Core::EmuThread(WindowSystemInfo)::<lambda()> >::_M_manager(std::_Any_data &, const std::_Any_data &, std::_Manager_operation)>}, _M_invoker = 0x7fffe9b162f0 <std::_Function_handler<void(), Core::EmuThread(WindowSystemInfo)::<lambda()> >::_M_invoke(const std::_Any_data &)>}} movie_guard = {m_finalizer = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x7fffe9b2d8fc <Movie::Shutdown()>, _M_const_object = 0x7fffe9b2d8fc <Movie::Shutdown()>, _M_function_pointer = 0x7fffe9b2d8fc <Movie::Shutdown()>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x7fffe9b2d8fc <Movie::Shutdown()>}, _M_pod_data = "\374\330\262\351\377\177\000\000\000\000\000\000\000\000\000"}, _M_manager = 0x7fffe9b1b3a4 <std::_Function_base::_Base_manager<void (*)()>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation)>}, _M_invoker = 0x7fffe9b1b380 <std::_Function_handler<void (), void (*)()>::_M_invoke(std::_Any_data const&)>}} hw_guard = {m_finalizer = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = '\000' <repeats 15 times>}, _M_manager = 0x0}, _M_invoker = 0x7fffec698c79}} init_video = false video_guard = {m_finalizer = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = '\000' <repeats 15 times>}, _M_manager = 0x0}, _M_invoker = 0x0}} init_controllers = 127 savestate_path = std::optional<std::string> [no contained value] delete_savestate = 255 init_wiimotes = false controller_guard = {m_finalizer = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x555500000000, _M_const_object = 0x555500000000, _M_function_pointer = 0x555500000000, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x555500000000, this adjustment 1056964608}, _M_pod_data = "\000\000\000\000UU\000\000\000\000\000?\000\000\000"}, _M_manager = 0x0}, _M_invoker = 0x0}} audio_guard = {m_finalizer = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = '\000' <repeats 15 times>}, _M_manager = 0x0}, _M_invoker = 0x7fffeab90de0 <Libretro::Options::cpuClockRate>}} cpuThreadFunc = 0x5555565b1e80 <rarch_st> wiifs_guard = {m_finalizer = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = '\000' <repeats 15 times>}, _M_manager = 0x0}, _M_invoker = 0x7fffeab91100 <Libretro::Options::WidescreenHack>}} #5 0x00007fffe9acbee0 in retro_run() () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/DolphinLibretro/Main.cpp:187 wsi = {type = WindowSystemType::Libretro, display_connection = 0x0, render_window = 0x0, render_surface = 0x0, render_surface_scale = 1} #6 0x00005555556789f8 in core_run () at retroarch.c:39344 p_rarch = 0x5555565b1e80 <rarch_st> current_core = 0x5555565cf910 <rarch_st+121488> core_poll_type_override = POLL_TYPE_OVERRIDE_DONTCARE new_poll_type = 2 early_polling = false late_polling = true netplay_preframe = true #7 0x000055555567759e in runloop_iterate () at retroarch.c:38686 --Type <RET> for more, q to quit, c to continue without paging-- run_ahead_enabled = false run_ahead_secondary_instance = true want_runahead = false run_ahead_num_frames = 1 run_ahead_hide_warnings = false i = 5 dpad_mode = {ANALOG_DPAD_NONE, ANALOG_DPAD_NONE, ANALOG_DPAD_NONE, ANALOG_DPAD_NONE, ANALOG_DPAD_NONE, 32513, 1448812160, 21845, 4294961504, 32767, 1434687650, 21845, 1448812160, 21845, 3966332944, 32767} p_rarch = 0x5555565b1e80 <rarch_st> input_driver_st = 0x5555565b1e80 <rarch_st> settings = 0x7fffec697010 video_frame_delay = 0 vrr_runloop_enable = false max_users = 5 current_time = 17878220168 menu_pause_libretro = true core_paused = false slowmotion_ratio = 3 cheevos_enable = false audio_sync = true discord_st = 0x5555565cc0b8 <rarch_st+107064> #8 0x0000555555643d57 in rarch_main (argc=4, argv=0x7fffffffeae8, data=0x0) at retroarch.c:15756 ret = 91 app_exit = false p_rarch = 0x5555565b1e80 <rarch_st> #9 0x0000555555839959 in main(int, char**) (argc=4, argv=0x7fffffffeae8) at ui/drivers/ui_qt.cpp:4318
pEXRAM values look right to me:
(gdb) f 1 #1 0x00007fffe9bf2ca4 in Memory::Clear () at /home/retro/dev/libretro-super/libretro-dolphin/Source/Core/Core/HW/Memmap.cpp:476 476 memset(m_pEXRAM, 0, GetExRamSize()); (gdb) print m_pEXRAM $1 = (u8 *) 0x7fff9e000000 "" (gdb) print GetExRamSize() $2 = 67108864
Any idea of what can I do to debug this further?
UPDATE: as I debug the allocs it looks like SHM memory is used which is limited to 64 GB by default in docker - will try to increase.
Confirmed: the crash is gone after resizing /dev/shm.
There is no check for the memory being available - therefore the crash.
Same for Windows. Dolphin crashes in 80% of the cases
Dolphin on Ubuntu 20.04 docker container is failing to start on both retroarch stable (from ppa) and self compiled:
gdb run:
Full Backtrace:
pEXRAM values look right to me:
Any idea of what can I do to debug this further?
UPDATE: as I debug the allocs it looks like SHM memory is used which is limited to 64 GB by default in docker - will try to increase.