AnsweredAssumed Answered

Vulkan applications freeze the system on Ubuntu

Question asked by nirei on Jul 15, 2016
Latest reply on Oct 29, 2016 by nirei

Hello,

 

i am trying to get Vulkan running on my machine for development purposes.

I am running Ubuntu 16.04 on a Lenovo Edge E145 with AMD A4-5000 APU and Kabini [Radeon HD 8330] Graphics. I am using the current  AMDGPU-Pro Driver Version 16.30.

 

When running the "cube" example from the VulkanSDK Version 1.0.17.0 my system freezes. To be precise, the window manager and all GUI elements stop responding, but i can still connect to the machine using SSH. Using the command line via SSH works fine. I can remotely kill the stuck "cube" process, but i don't seem to be able to remotely restart the window manager.

 

The "cube" example getting stuck seems to be a bug in the Vulkan driver, or somewhere on the way down to the Kernel amdgpu driver.

Remotely starting GDB on the cube process, i get the following backtrace:

#0  0x00007f0755336687 in ioctl () at ../sysdeps/unix/syscall-template.S:84

#1  0x00007f07532afe8f in drmIoctl () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libdrm.so.2

#2  0x00007f0753a45f63 in amdgpu_cs_query_fence_status () from /usr/lib/x86_64-linux-gnu/amdgpu-pro/libdrm_amdgpu.so.1

#3  0x00007f0753ef65ab in ?? () from /usr/lib/x86_64-linux-gnu/amdvlk64.so

#4  0x00007f0753efa67b in ?? () from /usr/lib/x86_64-linux-gnu/amdvlk64.so

#5  0x00007f075449807d in ?? () from /usr/lib/x86_64-linux-gnu/amdvlk64.so

#6  0x00007f0755920e19 in vkQueueWaitIdle (queue=0x178d180) at /home/lunarg/Development/LinuxSDK/Vulkan-LoaderAndValidationLayers/loader/trampoline.c:956

#7  0x0000000000405471 in demo_draw (demo=0x7ffe63f66c60) at /home/sergej/Downloads/vulkan/VulkanSDK/1.0.17.0/examples/cube.c:793

#8  0x0000000000409600 in demo_run_xcb (demo=0x7ffe63f66c60) at /home/sergej/Downloads/vulkan/VulkanSDK/1.0.17.0/examples/cube.c:2247

#9  0x000000000040b7ea in main (argc=1, argv=0x7ffe63f679c8) at /home/sergej/Downloads/vulkan/VulkanSDK/1.0.17.0/examples/cube.c:3155

Using the program strace i can see that the process is stuck on the following ioctl:

ioctl(5, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x49, 0x20)

 

I am attaching outputs of a GDB session, strace, vulkaninfo and the dmesg output. For reasons of hardware identification i am also attaching output of lspci and cpuinfo.

 

Steps to reproduce this behaviour:

  1. Install Ubuntu 16.04
  2. Install AMDGPU-PRO 16.30 and the VulkanSDK using the How-Tos on AMDGPU-PRO Driver for Linux® – Release Notes
  3. Compile the examples in the VulkanSDK via "./build_examples.sh" (also append " -DCMAKE_BUILD_TYPE=Debug" to the cmake line in the build_examples.sh script)
  4. Run "cube" executable in "VulkanSDK/1.0.17.0/examples/build/"
  5. Wait until the cube stops rotating => cube process and window manager now are stuck.

Outcomes