Bug 105119 - Desktop-wide input freeze when vulkan (radv)
Summary: Desktop-wide input freeze when vulkan (radv)
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: 17.3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-15 22:07 UTC by Jakub Okoński
Modified: 2018-05-13 21:58 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
trace #1 with long vkDeviceWaitIdle (24.33 KB, application/octet-stream)
2018-02-15 22:07 UTC, Jakub Okoński
Details
single frame render that exits cleanly (24.55 KB, application/octet-stream)
2018-02-15 22:09 UTC, Jakub Okoński
Details

Description Jakub Okoński 2018-02-15 22:07:03 UTC
Created attachment 137384 [details]
trace #1 with long vkDeviceWaitIdle

I'm experimenting with vulkan, and, after my application exits cleanly, keyboard input is ignored until I switch to another window using my mouse (that I can still use).

This is not the main problem though, I found a sequence of commands that triggers a desktop-wide freeze. I can still move my mouse, but windows don't redraw as far as I can tell. I also cannot focus other windows with mouse/keyboard, I cannot use ctrl+alt+f[1-9] to jump back to tty. Because I have a physical tachometer on the GPU, I also noticed that it is being utilized 100%, at least that's what the LEDs say.

I tried doing a vulkan trace and replay, but the replay does not trigger it. I'm attaching two vktrace files, first one is my original case, where I render two frames and exit cleanly (or at least try to). Of note is the never-ending vkDeviceWaitIdle call (it actually does end as soon as I press the power button on my PC, more on this in a second). The second trace I attached is one where I only render one frame and then exit the application (cleanly). Interestingly, in this case there is no failure

So after the desktop is frozen, I can only press the power button, which immediately exits xorg server, I again see my tty (I launch startx directly from tty, no GUI login manager). The control is never yielded back to my tty though, I can see a snippet of xorg logs but the process has not exited (and the GPU leds show 100% utilisation still).

Mesa, radv 17.3.3, xorg 1.19.6, linux 4.15.3 with RX Vega 64 GPU.

Let me know if there are additional debugging steps I can take, I can also provide source code for reproduction steps.
Comment 1 Jakub Okoński 2018-02-15 22:09:47 UTC
Created attachment 137385 [details]
single frame render that exits cleanly
Comment 2 Jakub Okoński 2018-02-16 02:10:44 UTC
I ran my code on Windows using AMD's proprietary driver, I can see this message from validation layers:

Attempt to reset command buffer (0x0000026469454060) which is in use. The spec valid usage text states 'commandBuffer must not be in the pending state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00045)
Calling vkBeginCommandBuffer() on active command buffer 0000026469454060 before it has completed. You must check command buffer fence before this call. The spec valid usage text states 'commandBuffer must not be in the recording or pending state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00049)

So I must be misusing the API as described.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.