device-fault: AMD buffer-marker breadcrumbs name the dispatch that hung (RT-DEVICE-MARKERS-AMD) #2187

Merged
aslan2142 merged 1 commit from upstream-pr/2187 into main 2026-11-26 03:35:47 +00:00
aslan2142 commented 2026-11-26 03:34:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T03:34:34Z.


On AMD a GPU hang ends in VK_ERROR_DEVICE_LOST with no checkpoints, so the device-fault report can only list what was in flight (64 dispatches in one hang today). This adds LEONIDA_DEVICE_MARKERS=1, so the report names the dispatch that hung.

Item: RT-DEVICE-MARKERS-AMD

  • Needs: LEONIDA_DEVICE_FAULT=1/2 and VK_AMD_buffer_marker; otherwise it logs one "unavailable" line. Off by default.
  • Markers: each dispatch writes its seq at top and bottom of pipe into one persistent host-visible buffer, one slot per queue.
  • Report: each queue's finished and started seq, and the oldest started-but-unfinished dispatch marked as the likely hang (best-effort after a loss). A history of the last 16,384 dispatches names it even after it has left the 64-entry list.
  • Numbering: seq is now given out when a dispatch is recorded, so the markers and the "submitted dispatch" list share one numbering.
  • Cost: two marker writes per dispatch when on; nothing when off.
  • Tests: vulkan_device_markers (CPU, runs in the Linux subset) and vk_device_markers (GPU, skipped without the extension). Docs: a runtime/README.md row and docs/d3d12_vulkan.md 4.11.
  • Tested: under Wine on the AMD Radeon iGPU of a Ryzen 9 7950X3D (gfx1036, RADV, Mesa 26.3.1), clang-cl. The new tests and the device-fault tests pass; the full Wine suite shows nothing new beyond tests already failing on main.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5503510772 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2187). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-26T03:34:34Z. --- On AMD a GPU hang ends in `VK_ERROR_DEVICE_LOST` with no checkpoints, so the device-fault report can only list what was in flight (64 dispatches in one hang today). This adds `LEONIDA_DEVICE_MARKERS=1`, so the report names the dispatch that hung. Item: RT-DEVICE-MARKERS-AMD - **Needs:** `LEONIDA_DEVICE_FAULT=1`/`2` and `VK_AMD_buffer_marker`; otherwise it logs one "unavailable" line. Off by default. - **Markers:** each dispatch writes its `seq` at top and bottom of pipe into one persistent host-visible buffer, one slot per queue. - **Report:** each queue's finished and started `seq`, and the oldest started-but-unfinished dispatch marked as the likely hang (best-effort after a loss). A history of the last 16,384 dispatches names it even after it has left the 64-entry list. - **Numbering:** `seq` is now given out when a dispatch is recorded, so the markers and the "submitted dispatch" list share one numbering. - **Cost:** two marker writes per dispatch when on; nothing when off. - **Tests:** `vulkan_device_markers` (CPU, runs in the Linux subset) and `vk_device_markers` (GPU, skipped without the extension). Docs: a `runtime/README.md` row and `docs/d3d12_vulkan.md` 4.11. - **Tested:** under Wine on the AMD Radeon iGPU of a Ryzen 9 7950X3D (gfx1036, RADV, Mesa 26.3.1), clang-cl. The new tests and the device-fault tests pass; the full Wine suite shows nothing new beyond tests already failing on `main`. AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-11-26 03:35:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T03:35:49Z.


Merged: a GPU hang on AMD can now name the dispatch that hung (LEONIDA_DEVICE_MARKERS=1 with LEONIDA_DEVICE_FAULT=1).

  • Tested: under Wine on the gfx1036 iGPU (RADV, Mesa 26.3.1), clang-cl. The new vulkan_device_markers and vk_device_markers tests and the device-fault tests pass; the full Wine suite shows nothing new beyond tests already failing on main. gta6rt builds with SDL3.
  • Checked on main 0b11d86bc + e418c1e4b: it merges cleanly; the semantic suite passes (498 files, 6,351 tests, 0 files failed); the 15 docs and writer tests pass; check_no_game_data.py is clean on the 12 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7181857640 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2187#issuecomment-7181857640). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-26T03:35:49Z. --- Merged: a GPU hang on AMD can now name the dispatch that hung (`LEONIDA_DEVICE_MARKERS=1` with `LEONIDA_DEVICE_FAULT=1`). - **Tested:** under Wine on the gfx1036 iGPU (RADV, Mesa 26.3.1), clang-cl. The new `vulkan_device_markers` and `vk_device_markers` tests and the device-fault tests pass; the full Wine suite shows nothing new beyond tests already failing on `main`. `gta6rt` builds with SDL3. - **Checked on `main` `0b11d86bc` + `e418c1e4b`:** it merges cleanly; the semantic suite passes (498 files, 6,351 tests, 0 files failed); the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 12 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2187
No description provided.