ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
933 stars 45 forks source link

[BUG] Segmentation fault in vrcompositor if CAP_SYS_NICE capability is set on vrcompositor-launcher #440

Open pkupper opened 3 years ago

pkupper commented 3 years ago

Describe the bug A segmentation fault occurs in vrcompositor when SteamVR is launched and the CAP_SYS_NICE=eip capability is set on the vrcompositor-launcher binary (as is the case when accepting the polkit request on initial startup of SteamVR). This causes vrcompositor to be restarted and subsequently fail due to the DRM lease no longer being possible.

The following dmesg output is generated when the segmentation fault occurs. https://gist.github.com/pkupper/6f8b9792f78d3af0b563fb9204a1ef1f

The vrcompositor log (for the first execution before the restart) ends abruptly but not always at the same location on subsequent attempts.

When initially declining the polkit request or manually removing the capability using sudo setcap -r ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher, SteamVR starts up and works as expected.

To Reproduce Steps to reproduce the behavior:

  1. Launch SteamVR for the first time after installing
  2. Accept polkit request
  3. Segmentation fault occurs (as seen in dmesg output)
  4. SteamVR shows the error message seen in the screenshot below
  5. Headset display stays blank and Room Setup can't continue past the "Establish tracking" screen.

Expected behavior SteamVR launches without displaying an error message and Room Setup can be performed.

System Information (please complete the following information):

Screenshots screenshot_2021-04-21-203315

Additional context Likely unrelated to this issue but possibly worth noting is, that I am running a wayland-based system using the in-development wayland protocol extension for DRM leasing including patches for vulkan-headers, vulkan-icd-loader, mesa, xwayland, sway and wlroots that can be found here: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/67 This might impact the behavior of vrcompositor after the restart (since the vr headset output disappears from xrandr) but should not be the cause of the segmentation fault.

Note: Commenters who are also experiencing this issue are encouraged to include the "System Information" section in their replies.

Zamundaaa commented 3 years ago

Relevant link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5266

It looks like the creation of the native surface and/or mirror window resources fail. Don't know yet why exactly