Maniphest T56791

OpenCL has stopped working
Closed, Archived

Assigned To
Brecht Van Lommel (brecht)
Authored By
Chris Mowley (mowley)
Sep 13 2018, 2:50 PM
Tags
  • BF Blender
  • EEVEE & Viewport
Subscribers
Bastien Montagne (mont29)
Brecht Van Lommel (brecht)
Chris Mowley (mowley)

Description

System Information
ARCH AMD Radeon Pro WX-5100

Blender Version
Blender 2.79 (sub 6)

build date: 2018-09-13
build time: 04:47:12
build commit date: 2018-09-12
build commit time: 21:42
build hash: 6873f47edea
build platform: Linux
build type: Release
build c flags:  -Wall -Wcast-align -Werror=implicit-function-declaration -Werror=return-type -Werror=vla -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wnonnull -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Wformat-signedness -Wrestrict -Wuninitialized -Wredundant-decls -Wshadow -Wno-error=unused-but-set-variable -Wimplicit-fallthrough=5 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fuse-ld=gold -fopenmp -std=gnu99   -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -msse2
build c++ flags:  -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Werror=implicit-function-declaration -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wuninitialized -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fuse-ld=gold -fopenmp -std=c++11   -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -msse2
build link flags: 
build system: CMake

Short description of error
I have started to get the following error as soon as I use anything linked to OpenCL for instance going to the system tab in user preferences produces the following error and blender crashes.

amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-9)

backtrace

# Blender 2.79 (sub 6), Commit date: 2018-09-12 21:42, Hash 6873f47edea

# backtrace
blender(BLI_system_backtrace+0x33) [0x557a0a787cc3]
blender(+0xab513b) [0x557a09d9013b]
/usr/lib/libc.so.6(+0x37e00) [0x7f42bf5c7e00]
/usr/lib/libdrm_amdgpo.so.1(amdgpu_get_marketing_name+0xc) [0x7f4278067b47]
/usr/lib/libamdocl-orca64.so(+0x8d91d1) [0x7f427beb91d1]
/usr/lib/libamdocl-orca64.so(+0x8d977f) [0x7f427beb977f]
/usr/lib/libamdocl-orca64.so(+0x8dc6f1) [0x7f427bebc6f1]
/usr/lib/libamdocl-orca64.so(+0x8f6678) [0x7f427bed6678]
/usr/lib/libamdocl-orca64.so(+0xc49010) [0x7f427c229010]
/usr/lib/libamdocl-orca64.so(+0x8cc259) [0x7f427beac259]
/usr/lib/libamdocl-orca64.so(+0x8cc2cf) [0x7f427beac2cf]
/usr/lib/libamdocl-orca64.so(+0x8cd057) [0x7f427bead057]
/usr/lib/libamdocl-orca64.so(+0xcf6c1e) [0x7f427c2d6c1e]
/usr/lib/libamdocl-orca64.so(+0xcf814a) [0x7f427c2d814a]
/usr/lib/libamdocl-orca64.so(+0xcf8366) [0x7f427c2d8366]
/usr/lib/libamdocl-orca64.so(+0x8a9f07) [0x7f427be89f07]
/usr/lib/libamdocl-orca64.so(clIcdGetPlatformIDsKHR+0xa2) [0x7f427be6d1c2]
/usr/lib/libOpenCL.so(+0x5d1e) [0x7f4284dddd1e]
/usr/lib/libOpenCL.so(clGetPlatformIDs+0x115) [0x7f4284ddfc15]
blender(_ZN3ccl18device_opencl_infoERNS_6vectorINS_10DeviceInfoENS_16GuardedAllocatorIS1_EEEE+0x43) [0x557a0ac5ff93]
blender(_ZN3ccl6Device17available_devicesEv+0xdc) [0x557a0ac3696c]
blender(+0x185de69) [0x557a0ab38e69]
/usr/lib/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallKeywords+0x148) [0x7f42c4137f68]
/usr/lib/libpython3.7m.so.1.0(_PyCFunction_FastCallKeywords+0x21) [0x7f42c4138201]
/usr/lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x525d) [0x7f42c41adf5d]
/usr/lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x11b) [0x7f42c40f108b]
blender(+0xeddc2f) [0x557a0a1b8c2f]
blender(RNA_property_enum_items_ex+0x61) [0x557a0a5f2a21]
blender(RNA_property_enum_items+0x13) [0x557a0a5f2ac3]
blender(RNA_property_enum_items_gettexted+0x1b) [0x557a0a5f2aeb]
blender(uiItemFullR+0xc2e) [0x557a09f9ff9e]
blender(UILayout_prop_call+0x53) [0x557a0a6f0f23]
blender(RNA_function_call+0x12) [0x557a0a5fcb32]
blender(+0xed0aaa) [0x557a0a1abaaa]
/usr/lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0x3ac) [0x7f42c41651ac]
/usr/lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x5a48) [0x7f42c41ae748]
/usr/lib/libpython3.7m.so.1.0(_PyFunction_FastCallKeywords+0x10b) [0x7f42c41377db]
/usr/lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4c33) [0x7f42c41ad933]
/usr/lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x11b) [0x7f42c40f108b]
blender(+0xed14a7) [0x557a0a1ac4a7]
blender(+0x1413e0f) [0x557a0a6eee0f]
blender(ED_region_panels+0x377) [0x557a0a08cce7]
blender(ED_region_do_draw+0x915) [0x557a0a08bb65]
blender(wm_draw_update+0x896) [0x557a09d931b6]
blender(WM_main+0x30) [0x557a09d90af0]
blender(main+0x453) [0x557a09d79643]
/usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f42bf5b4223]
blender(_start+0x2e) [0x557a09d8c7ae]

I've tried downgrading the opencl-amd package (an Arch package that grabs the OpenCL libraries out of AMD's proprietary driver and installs them as a separate package). Tested different versions of blender (including 2.8) and I get the same problem.

Please help, I'm stuck with this one.

Related Objects

Mentioned In
T56995: blender 2.8 crashes
T54086: Can't start blender
Mentioned Here
rB6873f47edea9: Cleanup: GCC ignored qualifier warning

Event Timeline

Chris Mowley (mowley) created this task.Sep 13 2018, 2:50 PM
Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.Sep 14 2018, 9:31 AM
Bastien Montagne (mont29) updated the task description.
Bastien Montagne (mont29) added subscribers: Brecht Van Lommel (brecht), Bastien Montagne (mont29).

Not sure we can do much here, that looks like yet another driver bug… @Brecht Van Lommel (brecht)?

Brecht Van Lommel (brecht) triaged this task as 30 priority.Sep 14 2018, 11:22 AM

Please try:

  • Running clinfo from the command line and seeing if it works.
  • Try for example LuxMark to verify if your OpenCL installation is working at all: http://www.luxmark.info/
  • Uninstalling all non-AMD OpenCL installations (e.g. pocl, beignet) to ensure they don't interfere.
  • Installing the Pro driver from the AMD website, since this is not a consumer card.

This may well be a bug in the driver, so I suggest reporting this to AMD as well. It looks like an issue deep in the AMD driver when we have barely done anything yet on the Blender side.

Brecht Van Lommel (brecht) mentioned this in T54086: Can't start blender.Sep 14 2018, 11:27 AM

Also seems downgrading both libdrm and openc-amd works for some people :
https://blender.stackexchange.com/questions/118007/how-do-i-get-blender-working-with-amd-opencl-on-linux
https://aur.archlinux.org/packages/opencl-amd/

Maybe Arch Linux happens to be shipping some package versions that are not compatible with each other, or a newer driver than other distributions that has some bug. Either way it seems somewhat unlikely there's anything we can do to fix it in Blender.

Chris Mowley (mowley) added a comment.Sep 14 2018, 6:43 PM

This is the thing, clinfo and all other tools I've tried report that the opencl instalation is good. Does anyone know of any documentation for the amdgpu_query_info function/source code?

yes downgrading libdrm in combination with opencl-amd fixed my issue too. I'd like to get more involved with debugging issues with blender btw.

Chris Mowley (mowley) added a comment.Sep 14 2018, 7:41 PM

Subsequently I have pinned the issue down to libdrm specifically and flagged the issue upstream. temporary workaround is to downgrade to libdrm 2.4.93-1.

Thank you all for your help. I'm back to rendering on my GPU and blender is now functioning as it should. :)

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.Sep 14 2018, 7:43 PM
Brecht Van Lommel (brecht) claimed this task.

Ok, thanks for testing, I don't think there is anything we can do here on the Blender side.

Brecht Van Lommel (brecht) changed the task status from Resolved to Unknown Status.Sep 14 2018, 7:44 PM
Brecht Van Lommel (brecht) mentioned this in T56995: blender 2.8 crashes.Oct 2 2018, 1:35 AM
Clément Foucault (fclem) edited projects, added EEVEE & Viewport; removed GPU / Viewport.Jun 19 2020, 11:11 PM