Public bug reported:

Affected Configuration:
- CPU/APU: AMD Ryzen AI Max+ 395 (Strix Halo)
- GPU: Radeon 8060S (gfx1151, RDNA 3.5)
- Memory: 128GB LPDDR5X unified memory
- BIOS: 512MB dedicated VRAM + 120GB GTT
- OS: Ubuntu 24.04.4 LTS
- Broken kernel: 7.0.0-28-generic
- Working kernel: 6.17.0-35-generic
- ROCm: 7.13 / 7.15 (TheRock multi-arch wheels)
- PyTorch: 2.10 / 2.11 / 2.12 / 2.14 (all affected)

Symptoms:
When loading FLUX models via ComfyUI + PyTorch + ROCm, the process hangs 
indefinitely at the VAE loading stage (~8GB memory usage). No error output in 
terminal. sudo dmesg -w shows no new kernel messages at the moment of hang - a 
silent deadlock.

Root Cause:
The KFD module in kernel 7.0 has a deadlock in kfd_process_wq_release. PyTorch 
on unified memory uses hipMallocManaged. During model loading, ComfyUI 
allocates and frees temporary objects, triggering KFD work queue release, which 
enters an infinite loop.

Evidence:
- ComfyUI FLUX 27GB: Kernel 6.17 OK, Kernel 7.0 Deadlock
- ComfyUI FLUX 6.9GB: Kernel 6.17 OK, Kernel 7.0 Deadlock
- PyTorch randn(6GB).to('cuda'): Both OK
- llama.cpp ROCm 23GB: Both OK
- ResNet-18 training: Both OK

dmesg warnings at boot:
workqueue: kfd_process_wq_release [amdgpu] hogged CPU for >10000us
workqueue: svm_range_restore_work [amdgpu] hogged CPU for >10000us

Ineffective workarounds:
Downgrading PyTorch (2.14 to 2.11 to 2.10), downgrading ROCm (7.15 to 7.13), 
downgrading ComfyUI, --fp32-text-enc, --cpu-vae, 
amdgpu.svm_default_granularity, amdgpu.vm_update_mode=3, 
amdgpu.no_queue_eviction_on_vm_fault=1, HIP_USE_MANAGED_MEMORY=0, disabling 
ComfyUI custom _load_from_state_dict.

Effective workaround:
Boot into kernel 6.17.0-35-generic.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: linux-image-7.0.0-28-generic 7.0.0-28.28~24.04.1
ProcVersionSignature: Ubuntu 7.0.0-28.28~24.04.1-generic 7.0.12
Uname: Linux 7.0.0-28-generic x86_64
ApportVersion: 2.28.2-0ubuntu0.1
Architecture: amd64
AudioDevicesInUse:
 USER        PID ACCESS COMMAND
 /dev/snd/seq:        zhaoliang   1626 F.... pipewire
CRDA: N/A
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Jul 24 01:10:18 2026
InstallationDate: Installed on 2026-05-05 (79 days ago)
InstallationMedia: Ubuntu 24.04.4 LTS "Noble Numbat" - Release amd64 (20260210)
MachineType: FEVM FAEX1
ProcEnviron:
 LANG=zh_CN.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-28-generic 
root=UUID=29c87090-3f57-43ff-a2e6-2fd00b3c0fba ro quiet splash 
ttm.pages_limit=30720000 amdgpu.gttsize=120000 vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-7.0.0-28-generic N/A
 linux-backports-modules-7.0.0-28-generic  N/A
 linux-firmware                            20240318.git3b128b60-0ubuntu2.27
SourcePackage: linux-hwe-7.0
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/20/2026
dmi.bios.release: 5.36
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: V1.03_S111_LEVM_UMA16G
dmi.board.asset.tag: Default string
dmi.board.name: FAEX1
dmi.board.vendor: FEVM
dmi.board.version: V01
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 35
dmi.chassis.vendor: FEVM
dmi.chassis.version: Default string
dmi.ec.firmware.release: 1.29
dmi.modalias: 
dmi:bvnAmericanMegatrendsInternational,LLC.:bvrV1.03_S111_LEVM_UMA16G:bd03/20/2026:br5.36:efr1.29:svnFEVM:pnFAEX1:pvrDefaultstring:rvnFEVM:rnFAEX1:rvrV01:cvnFEVM:ct35:cvrDefaultstring:sku:pfaFAEX1:
dmi.product.family: FAEX1
dmi.product.name: FAEX1
dmi.product.version: Default string
dmi.sys.vendor: FEVM

** Affects: linux-hwe-7.0 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2161667

Title:
  Kernel 7.0 KFD deadlock loading models via ROCm on Strix Halo

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-hwe-7.0/+bug/2161667/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to