Skip to contentSkip to conversation

Blender crashes when compiling OpenCL kernel

Bug 102009 [email protected] 1 participant 12 messages Aug 1, 2017 – Sep 9, 2018

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=102009

Bug ID: 102009
Summary: Blender crashes when compiling OpenCL kernel
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

Created attachment 133182
--> https://bugs.freedesktop.org/attachment.cgi?id=133182&action=edit
Blender crash dump

On Ubuntu 17.04 with a AMD Radeon R9 380 (Tonga Pro chipset), daily Mesa from Padoka PPA (version 1:17.3~git170731230100.df61a05~z~padoka0), both Blender 2.78 and 2.79 daily build (09eac0159db) crash when the OpenCL kernel is compiled for GPU rendering.

Steps to reproduce:
1. Start Blender with CYCLES_OPENCL_SPLIT_KERNEL_TEST=1 ./blender due to missing detection of OpenCL support (probably due to #101594).
2. Under Render settings, switch Device to GPU Compute and assert this setting is actually used.
3. Start a render and assert the OpenCL kernel is compiled.

Actual behavior:
* Blender crashes during kernel compilation (crash dump of 2.79 build is attached).

Expected behavior:
* Blender renders with OpenCL.

Addtional info:
* clinfo and glxinfo output is attached as well.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

--- Comment #2 from Markus <[email protected]> ---
Created attachment 133184
--> https://bugs.freedesktop.org/attachment.cgi?id=133184&action=edit
clinfo

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

Jan Vesely <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Blocks|                            |99553

Referenced Bugs:

https://bugs.freedesktop.org/show_bug.cgi?id=99553
[Bug 99553] Tracker bug for runnning OpenCL applications on Clover

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

--- Comment #3 from Jan Vesely <[email protected]> ---
the stacktrace does not say much, and it's not similar to segfault I see on my machine. Can you repost the stacktrace with mesa debug information?

thanks

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

--- Comment #4 from Markus <[email protected]> ---
Created attachment 134599
--> https://bugs.freedesktop.org/attachment.cgi?id=134599&action=edit
gdb Stacktrace - Ubuntu 17.10

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

--- Comment #5 from Markus <[email protected]> ---
Created attachment 134600
--> https://bugs.freedesktop.org/attachment.cgi?id=134600&action=edit
glxinfo - Ubuntu 17.10

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

--- Comment #6 from Markus <[email protected]> ---
Created attachment 134601
--> https://bugs.freedesktop.org/attachment.cgi?id=134601&action=edit
clinfo - Ubuntu 17.10

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

--- Comment #7 from Markus <[email protected]> ---
I tried to obtain debug information from Mesa but was unable to do so (i.e. starting Blender with MESA_DEBUG=context CYCLES_OPENCL_SPLIT_KERNEL_TEST=1 ./blender did not generate any visible debug information).

What I did instead, is run Blender via gdb which then gave the attached stack trace at the time of crash. Looking at the trace, it appears like the crash is inside LLVM.

What is the best way to debug this further?

P.S.: As I just updated to Ubuntu 17.10 (Beta 2), I've also attached new glxinfo and clinfo output.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

--- Comment #8 from Jan Vesely <[email protected]> --- (In reply to Markus from comment #7)

Quoted 4 lines

I tried to obtain debug information from Mesa but was unable to do so (i.e. starting Blender with MESA_DEBUG=context CYCLES_OPENCL_SPLIT_KERNEL_TEST=1 ./blender did not generate any visible debug information).

Quoted 8 lines

What I did instead, is run Blender via gdb which then gave the attached stack trace at the time of crash. Looking at the trace, it appears like the crash is inside LLVM.

What is the best way to debug this further?

P.S.: As I just updated to Ubuntu 17.10 (Beta 2), I've also attached new glxinfo and clinfo output.

you can use CLOVER_DEBUG=clc,llvm,native CLOVER_DEBUG_FILE=blender to force clover to dump compiled CL programs (it should produce several dump files for .clc .ll .asm). Make sure the kernels are compiled and not loaded fomr ~/.cache/cycles/kernels

Quoted 1 line

From there you can run and debug LLVM on the command line.

Note that I have been unable to reproduce this.
blender-2.79 on
OpenCL 1.1 Mesa 17.4.0-devel (git-138adc72e7)
AMD Radeon R7 Graphics (CARRIZO / DRM 3.18.0 / 4.11.0-ROC-SC, LLVM 5.0.1) AMD Radeon (TM) R7 M340 (ICELAND / DRM 3.18.0 / 4.11.0-ROC-SC, LLVM 5.0.1)

instead it hits MAX_GLOBAL_BUFFERS assertion in radeonsi pipe driver. bumping the limit renders a picture albeit much different from CPU rendering

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

Jan Vesely <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|Blender crashes when        |[clover, amdgcn] Blender
                   |compiling OpenCL kernel     |crashes when compiling
                   |                            |OpenCL kernel
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=102009

Timothy Arceri <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

           Assignee|[email protected] |[email protected].
                   |.org                        |org
         QA Contact|[email protected] |[email protected].
                   |.org                        |org
          Component|Drivers/Gallium/radeonsi    |Gallium/StateTracker/Clover
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel