Page MenuHome

LLVM ERROR: Error while trying to spill SGPR4_SGPR5 from class SReg_64: Cannot scavenge register without an emergency spill slot!
Closed, ResolvedPublic


System Information
Operating system: Linux-5.3.0-46-generic-x86_64-with-Ubuntu-19.10-eoan 64 Bits
Graphics card: AMD Radeon RX 5700 XT (NAVI10, DRM 3.33.0, 5.3.0-46-generic, LLVM 9.0.0) X.Org 4.5 (Core Profile) Mesa 19.2.8
Graphics card driver: amdgpu-pro-20.10-1048554-ubuntu-18.04

Blender Version
Broken: version: 2.90 (sub 0), branch: master, commit date: 2020-04-18 16:48, hash: rB1f1520a04503
Worked: -

Short description of error
Blender crashes during opencl kernel compilation

Exact steps for others to reproduce the error
Using the supplied blend file, render using GPU (OpenCL)

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Needs Information from User.Apr 20 2020, 5:40 PM

Can you try to strip .blend file down as much as possible? It is possible, that you will end up with very small file that wouldn't contain any data you can't share.

Also please click on File > Defaults > Load Fatctory Setings and let us know if this helps.

I've managed to recreate a scene that produces the crash on my system. Note that it's not specific to this material; any material I append or link from my external material library will produce a crash on render.

This was ran with blender --factory-startup.

This haven't crashed in my case, but render result was quite wild

Or should I make library and append it to example file and add material from lib to cube?

Are you using the same GPU?

Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: Radeon RX550/550 Series ATI Technologies Inc. 4.5.13587 Core Profile Context 20.4.1 26.20.15029.20013

I can confirm the issue. It started to happen once I updated the AMDGPU-PRO OpenCL driver from 19.50 to 20.10.

My software is similar to @Rey Leonard M. Amorato (rl.amorato)'s. The same Ubuntu driver, Blender master. Hardware - 5700 XT too. As a temporary measure, I recommend downgrading to 19.50... even though it crashes a lot for me.

I run it under Fedora though. I repackage the Ubuntu driver:

@Richard Antalik (ISS) I think the issue is exclusive to this particular setup, at least the GPU.

@secureworkstation (secureworkstation) I'm kinda glad I'm not the only one having problems with this GPU. I've had numerous problems with it since.
With the 19.50 driver, the render just hangs indefinitely, see T74262

Yes - it happens to hang quite randomly and then I can't reboot Blender (seems like some Linux kernel issue) and I must hard reboot the whole machine. I found some workaround - it's possible to render (ALMOST always hang-free) in text mode (as in, Ctrl+Alt+F2, not XTerm) using:

$ blender --background test.blend --render-output out --render-frame 1

Sometimes it kills my Wayland session, but I learned to live with it. I hoped that with the 20.10 driver it works better, but I guess we need some fix to the Blender kernels to acomodate the stack upgrades, but unfortunately that's outside of my expertise.

This error message seems to indicate a bug in the AMD OpenCL driver, an internal compiler error. We may be able to work around it, or get AMD to fix it.

I will try to install this driver version and reproduce.

I tested the 20.10 a bit further. For rendering it works well - as in, the kernel compilation works well, but under a Wayland session it hangs - the same as with 19.50, it only crashes when I change the shading to Viewport Shading. I assume the kernels are compiled a bit differently in those cases.

For reference, 20.10-1048554 works fine for final and viewport render here with a WX 7100 on Ubuntu 18.04. Installed using:

amdgpu-pro-install --headless --opencl=legacy,pal

@Brecht Van Lommel (brecht) Well, our installations do differ somehow. Let's find out what causes those issues.

@secureworkstation (secureworkstation) - upstream Linux AMDKFD driver, unclean installation, Ubuntu driver, RDNA card, PAL driver
@Rey Leonard M. Amorato (rl.amorato) - AMD packaged AMDKFD driver (dkms-amdgpu), clean installation, Ubuntu driver, RDNA card, PAL driver
@Brecht Van Lommel (brecht) - AMD packaged AMDKFD driver (dkms-amdgpu), clean installation, Ubuntu driver, GCN 4g card, ORCA (legacy) driver

Please fix if I am wrong. But if I'm right, then it seems that the issue persists at least across users the of the PAL driver, at most across users of the RDNA generation cards.

This is how we can ensure that we use the PAL driver (which is for Vega10+, and WX 7100 is Polaris10):

$ clinfo | grep 'Driver Version'
  Driver Version                                  3004.6 (PAL,LC)

What I have installed currently is:

$ clinfo | grep 'Driver Version
 Driver Version                                  3075.9 (PAL,HSAIL)
$ /opt/amdgpu-pro/bin/clinfo | grep -i "driver version"
  Driver version:				 3075.10 (PAL,LC)

I don't think I'm using the dkms version. I installed my driver with amdgpu-pro-install --opencl=pal --headless --no-dkms

I've also upgraded my system to Ubuntu 20.04, though I don't think that's essential to the equation here. Attaching system info and clinfo output.

I guess the difference is in the HSAIL and LC intermediate languages. Only Navi hardware uses LC.

I'm not sure it's safe to install using --no-dkms though, maybe that leads to a mismatch between the kernel module and the rest of the driver.

Installing with dkms breaks my whole display stack, (Unable to login to desktop; black screen with blinking white underscore) which is understandable because neither Ubuntu 20.04 nor 19.10 is supported by the current driver, hence the --no-dkms

What I find weird is if you look at my original report, I was able to use OpenCL (--no-dkms) without problems using Ubuntu 19.10 with the amdgpu-pro-19.30-838629-ubuntu-18.04 and amdgpu-pro-19.50-967956 drivers, until the USD changes. So it might not be entirely the driver's fault.

Unable to reproduce using Ubuntu 18.04.4 HWE + amdgpu-pro-20.10

When upgrading I made sure that I completely removed the previous amdgpu-pro driver. Did a clean boot. and installed the OpenCL drivers only of the amdgpu-pro-20.10.

amdgpu-pro-install --headless --opencl=PAL

I used the open source drivers for display.

@Jeroen Bakker (jbakker), can you post clinfo output? Did you check both F12 render and viewport render?

I tested with f12 render, but yes it breaks during viewport rendering.

Can we also test on Ubuntu 20.04 LTS? I understand it's not currently supported by the driver, it's just so we have an apple-to-apple comparison.

The way I did it is to edit /etc/os-release and change VERSION_ID="20.04" to VERSION_ID="18.04" so the installer won't complain that the OS is not supported.

I isolated the part that fails to compile. You could check if it works with

1diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h
2index 2ad22592eef..e4fe91095ce 100644
3--- a/intern/cycles/kernel/svm/svm_voronoi.h
4+++ b/intern/cycles/kernel/svm/svm_voronoi.h
5@@ -1089,6 +1089,7 @@ ccl_device void svm_node_tex_voronoi(KernelGlobals *kg,
6 &color_out,
7 &position_out_4d);
8 break;
9+# if 0
10 case NODE_VORONOI_F2:
11 voronoi_f2_4d(coord_4d,
12 exponent,
13@@ -1098,6 +1099,7 @@ ccl_device void svm_node_tex_voronoi(KernelGlobals *kg,
14 &color_out,
15 &position_out_4d);
16 break;
17+# endif
19 voronoi_distance_to_edge_4d(coord_4d, randomness, &distance_out);
20 break;

Successful renders with both F12 and viewport! Simply genius! Thank you!

Everything works with the latest master. Thank you!

Furthermore, it seems that since Linux kernel 5.6.7-300.fc32.x86_64 the freezes (unrelated to this bug) are gone.

Unable to reproduce using Ubuntu 18.04.4 HWE + amdgpu-pro-20.10

When upgrading I made sure that I completely removed the previous amdgpu-pro driver. Did a clean boot. and installed the OpenCL drivers only of the amdgpu-pro-20.10.

amdgpu-pro-install --headless --opencl=PAL

I used the open source drivers for display.

The issue is only with amdgpu-pro drivers <> NAVI architecture card (Radeon Rx 5000 series) combination. F12 render crashes during kernel compile only if the scene has volumetrics. Entering viewport rendering mode always crashes. Have tested my card with amdgpu 20.10 with the latest stable build (2.83.2) of blender and it still has the issue.