dota2 segfaulting on guest side using Venus
While running dota2 benchmark using Venus and latest/main versions of virglrenderer/Mesa/Sommelier/crosvm/qemu on both host and guest sides I'm facing dota2 crashing reliably with a NULL dereference inside of the game's VK code. Apparently, crash is related to the shader compilation because segfault happens after wiping Mesa cache on host side and then I can run+crash dota2 until all shaders are compiled. Once all shaders are compiled, I don't observe crash anymore.
There are no vkr error messages from Venus, but there is interesting error from Vulkan validation layer on host side that always happens right before the guest's segfault:
VUID-vkCmdEndQuery-None-01923(ERROR / SPEC): msgNum: -231257939 - Validation Error: [ VUID-vkCmdEndQuery-None-01923 ] Object 0: handle = 0x7f27c1526190, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x7d2395000001bcbc, type = VK_OBJECT_TYPE_QUERY_POOL; | MessageID = 0xf23748ad | vkCmdEndQuery: Ending a query before it was started: VkQueryPool 0x7d2395000001bcbc[], index 8. The Vulkan spec states: All queries used by the command must be active (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndQuery-None-01923)
Objects: 2
[0] 0x7f27c1526190, type: 6, name: NULL
[1] 0x7d2395000001bcbc, type: 12, name: NULL
The crash happens reliably on both crosvm and Qemu (https://gitlab.freedesktop.org/digetx/qemu/-/commits/native-context-iris) using exactly the same guest/host environments, so it's not something related to VMM. The crash doesn't happen using virtio-intel native context, hence the problem is related to Venus.
Using either Sommelier or Xorg directly doesn't affect the issue on crosvm.
Validation layer says Ending a query before it was started
, maybe there is an ordering or a race condition bug in Venus?
On guest side I'm running dota2 benchmark like this:
MANGOHUD_CONFIG=ram,vram,wine,position=bottom-left DISPLAY=:0 ~/.steam/steam/ubuntu12_32/steam-runtime/run.sh ./dota.sh +timedemoquit 7165492154.dem +demo_quitafterplayback 1 +cl_showfps 2 +fps_max 0 -nosound -noassert -console +timedemo_start 48000 +timedemo_end 52000 -autoconfig_level 3 -testscript_inline \"Test_WaitForCheckPoint DemoPlaybackFinished\; quit\" -high -w 1280 -h 720
dota2 demo file: 7165492154.dem