Skip to content

kyty: ASTRO BOT (PPSA21564) hangs the GPU on RADV (Radeon 780M) at 7de61e3451 (gfx ring timeout, ErrorDeviceLost) #285

Open

Description

@mrfelek

On AnyKyty 7de61e3451, ASTRO BOT (PPSA21564) hangs the GPU on a Radeon 780M with RADV a few seconds after the pirate island level (-lvl big_hand_pirate_island) starts, in every run so far (4 of 4). The kernel logs a gfx ring timeout for the title's kytyGpuRecord thread, the ring reset fails and amdgpu resets the GPU; the title then stops on vkQueueSubmit failed: ErrorDeviceLost. Opening a new issue as asked at the end of #98, which had the same kernel lines on an RX 9070 XT.

Setup

  • Ubuntu 26.04.1, kernel 7.0.0-38-generic, linux-firmware 20260319, Ryzen 9 PRO 8945HS with Radeon 780M (RADV PHOENIX), Mesa 26.0.8.
  • AnyKyty 7de61e3451, Release, -DANYPS5_GPU_BACKEND=kyty, GCC for AnyPS5 and Clang 21 for Kyty. One local change, to the relinker only: validateRelroCoverage drops an uncovered PT_GNU_RELRO header instead of stopping, because this dump's eboot otherwise fails to relink (PT_GNU_RELRO is not covered by PT_LOAD pages; fix(relinker): preserve Linux guest RELRO boykopovar/AnyPS5#20573 reports the same check).
  • Kyty's defaults (no KYTY_* set), native ray tracing on. Headless: kwin_wayland --virtual --xwayland, SDL_VIDEODRIVER=x11, SDL_AUDIODRIVER=dummy, game data on a read-only sshfs mount, warm Kyty shader store.

Kernel log (run of 18:30):

amdgpu 0000:c5:00.0: ring gfx_0.0.0 timeout, signaled seq=51305404, emitted seq=51305405
amdgpu 0000:c5:00.0:  Process app.elf pid 2320115 thread kytyGpuRecord pid 2320208
amdgpu 0000:c5:00.0: Starting gfx_0.0.0 ring reset
amdgpu 0000:c5:00.0: MES failed to respond to msg=RESET
amdgpu 0000:c5:00.0: failed to reset legacy queue
amdgpu 0000:c5:00.0: reset via MES failed and try pipe reset -110
amdgpu 0000:c5:00.0: Ring gfx_0.0.0 reset failed
amdgpu 0000:c5:00.0: GPU reset begin!. Source:  1

The title then logs radv/amdgpu: The CS has been cancelled because the context is lost. This context is innocent. and vkQueueSubmit failed: ErrorDeviceLost, tick=52547 (commandScheduler.cpp:652).

What RADV_DEBUG=hang shows

  • Two runs, two different graphics pipelines bound at the hang: RADV pipeline hash 8b35173ee2053ef8 (a mesh shader plus a pixel shader with 17 textures and four loops), then 68e48ac71eb024e. So it is not one shader that always hangs.
  • Neither pipeline uses ray queries.
  • The dumps and the SPIR-V are game shaders, so I'm not attaching them; I can answer questions about them or run with other settings.

Other runs

  • KYTY_NATIVE_RT=0: no hang, but the level doesn't get past loading: black picture, ~23 draws per frame, the GPU 4 % busy and two game threads at 100 %.
  • The same commit on an RTX 3080 Ti (NVIDIA 615.71.09, Linux) runs this level at ~18 fps without a hang.
  • The same level on this 780M with AnyPS5's own driver (main of 2026-11-18) ran without a hang.

Happy to run a build or settings you'd like checked on this GPU.

AI-assisted.

Activity

  1. mrfelek commented on Nov 23, 2026

    @mrfelek
    Author

    Narrowed down: the hang needs a cold cache and comes from the graphics pipeline library path. Same machine and commit as above, pirate island, one run per row unless noted. "Both caches cold" means rt-K/_PipelineCache moved aside and MESA_SHADER_CACHE_DISABLE=true.

    Caches Setting Runs GPU hang
    first runs on this build (both cold) defaults 2 2
    warm defaults 2 0
    Kyty store cold, Mesa cache warm defaults 1 0
    Kyty store warm, Mesa cache off defaults 1 0
    both cold defaults 1 1
    both cold defaults plus VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, then plus KYTY_VULKAN_VALIDATION=1 2 2
    both cold KYTY_PIPELINE_LIBRARIES=0 3 0
    both cold KYTY_ASYNC_PIPELINES=0 1 1
    both cold local experiment: mesh pipelines skip the library route (PipelineLibraries::Eligible returns false for a mesh stages[0]) 2 2
    early runs, cache state not controlled KYTY_TABLE_DESCRIPTOR_WRITES=0, KYTY_DRAW_TEMPLATES=0 1 each 1 each
    warm KYTY_TABLE_XPR=0, KYTY_PIPELINE_LIBRARIES=0, KYTY_ASYNC_PIPELINES=0, KYTY_DRAW_BUFFERS=0, KYTY_TESSELLATION=0 1 each 0

    So it shows only while pipelines are first linked from libraries during play, and goes away with KYTY_PIPELINE_LIBRARIES=0. It is not limited to mesh pipelines, which fits the two RADV_DEBUG=hang dumps above binding two different pipelines. Without the libraries the level runs at ~6 fps on this GPU, with the picture right apart from some blocky patches on the water and sand.

    The two validation runs logged no VUID- line, but their frame rate before the hang was the same as without validation, so I'm not sure the layer was active; I can rerun it with VK_LOADER_DEBUG=layer if a clean validation pass on this path would help.

    KYTY_PIPELINE_LIBRARIES=0 works as a workaround here. I didn't find the cause in the library code: whether it is how the four parts are split or RADV's fast link on Mesa 26.0.8 is beyond what I could tell from the dumps.

    AI-assisted.

  2. mrfelek commented on Nov 23, 2026

    @mrfelek
    Author

    Found the cause and a fix for the hang. The branch is mrfelek/AnyPS5:fix/kyty-radv-no-pipeline-libraries, one commit on AnyKyty 7de61e3451. A PR to this repository can't be opened from our fork, so it's linked here instead.

    Cause

    Some graphics pipelines that AnyKyty fast-links from VK_EXT_graphics_pipeline_library parts hang RADV. The gfx ring times out without a VM fault. Our setup is a Radeon 780M on Mesa 26.0.8.

    AnyKyty only fast-links while its pipeline cache is cold, which is why the hang needs both caches cold.

    Same box, pirate island, both caches cold:

    Setting Hangs
    Defaults (fast link) 1/1 (and 4/4 earlier)
    Same libraries linked with VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT 0/3
    Library path on, but no pipeline linked (local test filter) 0/1
    KYTY_PIPELINE_LIBRARIES=0 0/2

    It is not one bad pipeline. A local filter that fast-links only part of the pipelines still hung with each half, a quarter and an eighth. A 1/32 subset with a single pipeline pair hung, and a 1/16 subset without that pair did not. These did not change it (each tried in full cold runs):

    • Giving the pre-rasterization and fragment shader libraries the draw's depth/stencil formats, as AnyPS5's own driver does since 0b46084c9f for a similar RADV hang.
    • Building the packed UNorm (fragment shader interlock) pixel shaders whole.
    • Building pipelines with VK_FORMAT_UNDEFINED color slots whole.
    • Building mesh pipelines whole.

    RADV_DEBUG=shaders,epilogs on the isolated pipeline shows valid code in both forms. The fast-linked pixel shader jumps to an epilog that exports the same compacted targets as the optimized link. That points at the state RADV programs for fast-linked pipelines rather than at the shaders. I couldn't go further without a umr wave dump.

    Plain AnyPS5 builds its pipelines from libraries the same way and runs this title on the same box without hanging. KytyPS5 has no pipeline-library path at all.

    Fix

    On RADV, AnyKyty no longer enables pipeline libraries, so it builds whole pipelines as with KYTY_PIPELINE_LIBRARIES=0. Other drivers are unchanged. The two settings docs rows say so.

    Optimized links would also avoid the hang, but they cost about 75 ms each on the draw thread and gave more stalls than whole pipelines:

    Cold, pirate island Hangs FPS Graphics pipeline stalls ≥100 ms
    This fix (defaults) 0/2 6.9 / 6.6 19 / 22 (3.4 / 3.7 s)
    Optimized link on RADV 0/3 6.1 / 6.2 / 5.8 28 / 27 / 31 (5.8 / 5.4 / 5.5 s)
    KYTY_PIPELINE_LIBRARIES=0 0/2 6.4 / 6.7 17 / 19 (3.1 / 3.4 s)

    Tested on Linux, Radeon 780M, Mesa 26.0.8, with the box's RELRO relinker workaround. The branch also builds on Linux with an RTX 3080 Ti. It wasn't run there; NVIDIA takes the unchanged path.

  3. relativespace2K commented on Nov 24, 2026

    @relativespace2K

    Carried @mrfelek's tested fix here as a PR since it could not be opened from their fork: RADV now builds graphics pipelines whole, as with KYTY_PIPELINE_LIBRARIES=0. The commit keeps the original author and the measurements from the report above. PR: #292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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