ROCm: Blender Cycles engine causes "Memory access fault by GPU node-1"
Problem Description
Error:
Blender crashes with Memory access fault by GPU node-1 (Agent handle: 0x7c1aea898400) on address 0x5fd000. Reason: Page not present or supervisor privilege.
Operating System
6.7.4-2-MANJARO Linux
CPU
AMD Ryzen 9 5950X
GPU
AMD Radeon Pro W7900
ROCm Version
ROCm 6.0.0
ROCm Component
No response
Steps to Reproduce
Reproducing error: Just opening Blender (tested 4.0-4.1), switching Render Engine to Cycles (Feature Set: Supported, Device: GPU compute) Activate Viewport shading (and maybe rotate the camera around the default cube a few times) causes the crash. Also trying to render anything instantly crashes Blender.
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
ROCk module is loaded
HSA System Attributes
Runtime Version: 1.1
System Timestamp Freq.: 1000.000000MHz
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model: LARGE
System Endianness: LITTLE
Mwaitx: DISABLED
DMAbuf Support: YES
==========
HSA Agents
Agent 1
Name: AMD Ryzen 9 5950X 16-Core Processor
Uuid: CPU-XX
Marketing Name: AMD Ryzen 9 5950X 16-Core Processor
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 0
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 3400
BDFID: 0
Internal Node ID: 0
Compute Unit: 32
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 131808628(0x7db3d74) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 131808628(0x7db3d74) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 131808628(0x7db3d74) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
Agent 2
Name: gfx1100
Uuid: GPU-9e8b159eef31d025
Marketing Name: AMD Radeon Pro W7900
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 1
Device Type: GPU
Cache Info:
L1: 32(0x20) KB
L2: 6144(0x1800) KB
L3: 98304(0x18000) KB
Chip ID: 29768(0x7448)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 1760
BDFID: 3584
Internal Node ID: 1
Compute Unit: 96
SIMDs per CU: 2
Shader Engines: 6
Shader Arrs. per Eng.: 2
WatchPts on Addr. Ranges:4
Coherent Host Access: FALSE
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 32(0x20)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 32(0x20)
Max Work-item Per CU: 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
Max fbarriers/Workgrp: 32
Packet Processor uCode:: 528
SDMA engine uCode:: 19
IOMMU Support:: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 47169536(0x2cfc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED
Size: 47169536(0x2cfc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 3
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa–gfx1100
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
FBarrier Max Size: 32
*** Done ***
Additional Information
OS: NAME=“Manjaro Linux”
CPU: model name : AMD Ryzen 9 5950X 16-Core Processor
GPU:
Name: AMD Ryzen 9 5950X 16-Core Processor
Marketing Name: AMD Ryzen 9 5950X 16-Core Processor
Name: gfx1100
Marketing Name: AMD Radeon Pro W7900
Name: amdgcn-amd-amdhsa–gfx1100
Mobo: ASUSTeK model: ROG STRIX X570-E GAMING WIFI II
Graphics: Device-1: AMD Navi 31 [Radeon Pro W7900] driver: amdgpu v: kernel Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4 driver: X: loaded: amdgpu unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution: 3840x2160~144Hz API: EGL v: 1.5 drivers: radeonsi,swrast platforms: x11,surfaceless,device API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.3.5-manjaro1.1 renderer: AMD Radeon Pro W7900 (radeonsi navi31 LLVM 16.0.6 DRM 3.57 6.7.4-2-MANJARO) API: Vulkan v: 1.3.276 drivers: amd surfaces: xcb,xlib
RAM (DDR4) Memory: total: 128 GiB
PSU: 1000W
Case: EATX with 9 Fans
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 37 (2 by maintainers)
@NerosTie Internal ticket has been created to investigate this issue. Thanks!
You can still reproduce the crash with a slight caveat. The reproducing step with Docker is as follows:
rocm/rocm-terminal:6.1docker image.podman run -it --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined rocm/rocm-terminal:6.1. I personally usepodman, if you usedockerreplacepodmanwithsudo docker.workdirectory for convenience.mkdir work && cd worksudo apt-get update && sudo apt-get install build-essential git git-lfs subversion cmake libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libegl-dev libwayland-dev wayland-protocols libxkbcommon-dev libdbus-1-dev linux-libc-dev unzip libsm6 libxext6 -y. (yes, not all of these dependencies are needed, I’m just being safe here)curl -O https://download.blender.org/release/Blender4.1/blender-4.1.0-linux-x64.tar.xztar xf blender-4.1.0-linux-x64.tar.xz. You should now have ablender-4.1.0-linux-x64directory in you current directory.curl -O https://download.blender.org/demo/test/BMW27.blend.zipunzip BMW27.blend.zip. You should now have aBMW27.blendfile in your current directory.blender-4.1.0-linux-x64/blender -b BMW27.blend -f 0 -- --cycles-device HIP. Note that by default Blender will use your GPU with id 0 to render; if you want to use another GPU, runexport HIP_VISIBLE_DEVICES=<gpu-id-you-want-to-use>before rendering with Blender. You can find the available GPU ids by runningrocm-smi(under theDevicecolumn).Memory access fault by GPU node-1 (Agent handle: 0x7f5f2af98000) on address 0x7f5afa7cb000. Reason: Page not present or supervisor privilege.The caveat is that this issue is probably on the compiler side, not ROCm’s runtime. Blender ships pre-compiled GPU fatbins that is compiled with some ROCm version that I don’t know (I suspect the fatbins that come with 4.1 are compiled with ROCm 6.0, but even the Blender folks aren’t sure). To verify that it’s probably a compiler issue, continue:
git clone https://projects.blender.org/blender/blender.git --depth 1 --branch v4.1.0pushd blender && hipcc --offload-arch=$arch --genco intern/cycles/kernel/device/hip/kernel.cpp -D CCL_NAMESPACE_BEGIN= -D CCL_NAMESPACE_END= -D HIPCC -I intern/cycles/kernel/.. -I intern/cycles/kernel/device/hip -ffast-math -o kernel_$arch.fatbin && popd. Replace$archwith the architecture of the GPU you want to run on, e.g.gfx900. If you want to compile against multiple architectures, you must repeat step 12 and 13 for each architecture.blender/kernel_$arch.fatbinfile atblender-4.1.0-linux-x64/4.1/scripts/addons/cycles/lib/kernel_$arch.fatbin. Once again, replace$archwith your desired GPU architecture.If you’re unable to reproduce the crash with the BMW27 example, try any one of the demo files under the “Cycles” section on the Blender demos page. One common test file we used was the Classroom example.
Running
HSA_ENABLE_SDMA=0 blender-4.2gives me the same result.