Skip to content

[Bug]: Linux aarch64 — JITARM64 together with the main CPU thread hangs the frontend after a few seconds #462

Description

@WizzardSK

Summary

On a native Linux aarch64 build of the core, the default option combination dolphin_cpu_core = 4 (JITARM64) + dolphin_main_cpu_thread = enabled runs for roughly ten seconds and then the frontend stops producing frames entirely: RetroArch's main loop no longer answers network commands (SCREENSHOT, QUIT) and the process has to be killed. CPU usage drops to ~13%, nothing is logged by the core or by RetroArch after the hang.

Changing either of the two options makes it run indefinitely, so it looks like a race between the JITARM64 CPU thread and the video/main thread rather than a plain JIT miscompile:

dolphin_cpu_core dolphin_main_cpu_thread result
4 (JITARM64) enabled boots, ~55 FPS, hangs between frame 600 and 1500
4 (JITARM64) disabled 3000 frames in 60 s, ~60 FPS, no hang
5 (Cached Interpreter) enabled runs, ~16.7 FPS, no hang

Environment

  • postmarketOS aarch64, Snapdragon 670 / Adreno 618 (Chromebook), 4 GB RAM
  • RetroArch 1.22.2 (Flatpak), video driver gl (Mesa freedreno) and vulkan (Turnip) — both hang identically
  • Core built from c6b8691 (plus only the aarch64 CI job from ci: add Linux aarch64 libretro build #458), CMake -DLIBRETRO=ON, GCC 15, LTO off
  • Game: Mario Kart: Double Dash!! (USA), booted from ISO

Reproduction

printf 'dolphin_cpu_core = "4"\ndolphin_main_cpu_thread = "enabled"\n' \
    > .../config/dolphin-emu/dolphin-emu.opt
retroarch --max-frames=1500 --max-frames-ss --max-frames-ss-path=/tmp/shot.png \
    -L dolphin_libretro.so "Mario Kart - Double Dash!! (USA).iso"
  • --max-frames=600 finishes in 19 s and writes a correct screenshot of the intro at 55 FPS.
  • --max-frames=1500 never finishes (killed after 300 s, no screenshot).
  • With dolphin_main_cpu_thread = "disabled", --max-frames=3000 finishes in 60 s.
  • Reproduced on every attempt (5/5 across two sessions), with both video drivers.

Notes

The hang is not at startup — the intro renders at full speed first, and the frontend is fully responsive during that time. There is no log output at the moment it stops (verbose RetroArch log ends with the normal AV-info/audio-driver lines).

The workaround (dolphin_main_cpu_thread = disabled) costs no performance here — 60 FPS in the intro either way — but the hanging combination is what a user gets by default on aarch64, so the core looks broken out of the box on this platform.

I'm happy to run further experiments on the device (extra logging, thread backtraces, specific option combinations) if that helps narrow it down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions