[Issue]: gfx1151 (Ryzen AI MAX+ 395, Radeon 8060S): intermittent whole-GPU MODE2 reset under dense async kernel submission — gfxhub page faults on runtime-internal memory, MES becomes unresponsive

オープン
#246 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, linux

調査の方向性

Start by reproducing the reported reset with a large hipMallocAsync burst and dense asynchronous kernel launches, then inspect the amdgpu kernel log and AMD_LOG_LEVEL=3 trace described in the issue. The report does not identify a source file or test; it asks whether a newer driver fixes the gfx1151 queue vital buffer page faults and MES failure, and offers further logs for investigation.

索引モデルが issue の本文から書いたものです。

説明

Environment

  • APU: AMD Ryzen AI MAX+ 395 w/ Radeon 8060S (Strix Halo, gfx1151, PCI 1002:1586)
  • OS: Ubuntu 22.04.5 LTS, kernel 6.8.0-138-generic (HWE)
  • Driver: amdgpu-dkms 6.16.6-2238411.22.04 (out-of-tree, ROCm repo)
  • ROCm: 7.1.0 (hip-runtime-amd 7.1.25424, rocBLAS 3.1.0, hipBLASLt 1.10.1)
  • Workload: BF16 ML inference, ~600 stream-ordered (hipMallocAsync)
    allocations totaling ~9 GB plus a 13.5 GB checkpoint upload; forwards of
    ~2300 kernel launches each, submitted asynchronously with no host-side
    sync in between; also HIP graph capture/replay of the same sequence
    (2311-node graphs, replayed back-to-back).

Summary

Under dense asynchronous kernel submission, the GPU intermittently takes a
whole-device reset. The kernel log for every event has the same shape:
~10 gfxhub page faults whose faulting addresses are NOT inside any
application allocation (verified against a complete map of all
hipMallocAsync/hipMalloc addresses of the process; they fall inside
regions the driver later frees as "queue vital buffers"), followed by MES
becoming unresponsive to queue management, followed by a MODE2 reset. The
process sees hipErrorLaunchFailure/status 719 latched on its stream, and
rocBLAS aborts or the runtime spins in a signal wait that never completes.

From userspace the only visible symptom is a crashed run; because the reset
recovers automatically ("device wedged, but recovered through reset"), this
was previously absorbed as a retryable flake. Kernel-log history shows the
same events on this machine since 2026-11-04, clustered on days with the
densest submission patterns.

Key observation: probability tracks submission density

  • Eager submission with host pacing (a sync every few launches): fault on
    roughly 1 run in 4 under a "bad" machine state; often clean for days.
  • Zero-gap submission (HIP graph replay of a 2311-kernel graph, back to
    back): fault in roughly half the runs or more.
  • HIP_LAUNCH_BLOCKING=1: never faults (dozens of runs), including full
    graph capture + replay.
  • A 50–800 ms host sleep between the allocation burst and the first dense
    burst reduces the rate but does not eliminate it.
  • Pre-loading every code object (one launch + sync per library: our fatbin,
    rocBLAS, hipBLASLt/Tensile, CK) reduces the rate but does not eliminate it.
  • HIP_MODULE_LOADING=EAGER does not eliminate it (lazy fatbin lookups
    still occur mid-run; see trace below).
  • Not thermals: faults occur at GPU 60 °C / 40 W; the 96 °C CPU readings we
    observed are the ROCm runtime's signal-wait spin after the device is
    already dead.
  • Not the application's memory accesses: all clean runs are bit-identical
    run-to-run and against a reference; the faulting addresses are not the
    application's.

Kernel log excerpt (one event, 2026-11-17 10:00:30, current boot)

amdgpu 0000:c5:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:8 pasid:32773)
amdgpu 0000:c5:00.0: amdgpu:  Process pi05_hip_bench pid 2713211 thread pi05_hip_bench pid 2713211
amdgpu 0000:c5:00.0: amdgpu:   in page starting at address 0x00007507adc1f000 from client 10
amdgpu 0000:c5:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00801031
amdgpu 0000:c5:00.0: amdgpu:          Faulty UTCL2 client ID: TCP (0x8)
amdgpu 0000:c5:00.0: amdgpu:          MORE_FAULTS: 0x1
amdgpu 0000:c5:00.0: amdgpu:          WALKER_ERROR: 0x0
amdgpu 0000:c5:00.0: amdgpu:          PERMISSION_FAULTS: 0x3
amdgpu 0000:c5:00.0: amdgpu:          MAPPING_ERROR: 0x0
amdgpu 0000:c5:00.0: amdgpu:          RW: 0x0
(repeats ~10x, adjacent pages within a 0.5–0.8 MB span; each event a
different span, always inside a later-freed "queue vital buffer" region)
then:
amdgpu 0000:c5:00.0: amdgpu: MES failed to respond to msg=SUSPEND
amdgpu 0000:c5:00.0: amdgpu: failed to remove hardware queue from MES, doorbell=0x1002
amdgpu 0000:c5:00.0: amdgpu: Failed to evict queue 1 / Failed to evict process queues / Failed to quiesce KFD
amdgpu 0000:c5:00.0: amdgpu: MES might be in unrecoverable state, issue a GPU reset
amdgpu 0000:c5:00.0: amdgpu: GPU reset begin!. Source: 3
amdgpu 0000:c5:00.0: amdgpu: MODE2 reset
amdgpu 0000:c5:00.0: amdgpu: GPU reset(N) succeeded!
amdgpu 0000:c5:00.0: amdgpu: [drm] device wedged, but recovered through reset

HIP API trace excerpt (AMD_LOG_LEVEL=3, a run that faulted)

The last host-side activity before the fault is a lazy code-object (fatbin)
first-use, i.e. a GPU virtual-memory mapping operation, while previously
launched kernels are still executing asynchronously:

:3:hip_module.cpp :825: hipLaunchKernel ( 0x5ea30efccc00, {522,1,1}, {256,1,1}, ... )
:3:hip_fatbin.cpp :511: Looking up generic name of : amdgcn-amd-amdhsa--gfx1151 - amdgcn-amd-amdhsa--gfx11-generic
:3:hip_fatbin.cpp :537: Device name: amdgcn-amd-amdhsa--gfx1151 Generic name: amdgcn-amd-amdhsa--gfx11-generic
:3:hip_fatbin.cpp :542: Using Native code object: gfx1151
:1:rocdevice.cpp  :3321: Memory Fault Error
:1:rocdevice.cpp  :3325: HW Exception Error

A second traced fault occurred during a HIP graph replay with no adjacent
module load, ending in:

:3:hip_graph.cpp  :1640: hipGraphLaunch ( 0x6517bea1cbe0, stream )
:3:hip_memory.cpp :1595: hipMemcpyAsync ( ..., 640, hipMemcpyDeviceToHost, stream )
:1:rocvirtual.hpp :78 : Device not Stable, while waiting for Signal ... for 4000000 ns
:3:hip_memory.cpp :1596: hipMemcpyAsync: Returned hipErrorLaunchFailure : duration: 2047961 us
:1:rocdevice.cpp  :3325: HW Exception Error

Hypothesis

A GPU VM update (code-object mapping on lazy first use; possibly other
mapping operations) that happens while kernels are executing is not
correctly serialized against in-flight work on gfx1151 with the 6.16.6 dkms
driver on 6.8: running waves lose valid translations or fault on
runtime-managed pages, the compute queue dies in an unrecoverable state,
and MES fails to service/remove the dead queue, forcing the whole-GPU MODE2
reset. Submission density controls the probability that the mapping window
overlaps in-flight kernels, which matches every observation above
(HIP_LAUNCH_BLOCKING makes every mapping happen with an idle GPU).

Workarounds we use

  • HIP_LAUNCH_BLOCKING=1 for correctness-critical runs (100% immune, too
    slow for benchmarking).
  • Retry the run for benchmark workloads.
  • Keep host memory pressure low around dense bursts (the fault rate rises
    when the 30 GB host is near its limit with a 13.5 GB model in flight).

Request

  1. Does a fix exist in a newer amdgpu-dkms / ROCm release for gfx1151
    (queue vital buffer page faults + MES unresponsive → MODE2 reset)?
  2. If not, we can provide full dmesg of several events, complete
    AMD_LOG_LEVEL=3 traces, and a characterization of the workload; a
    public standalone reproducer is harder (proprietary model), but the
    trigger pattern is simple: large hipMallocAsync burst + ~2000 async
    kernel launches without host syncs, repeated.
主要言語
C
スター
472
フォーク
153
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ROCm/amdgpu のほかの issue

ROCm/amdgpu の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。