protonscr

[BUG] xrclient - Unable to create shared memory for IPC client

steamvrclosed bug
ValveSoftware/SteamVR-for-Linux#412 · opened 2020-12-15 by Myaats · updated 2021-11-11 · 4 comments · github
MMyaats 2020-12-15 github

Describe the bug
When attempting to launch any OpenXR application with the SteamVR runtime it seems to constantly fail creating the shared memory for the IPC client.

xrclient log:

Tue Dec 15 2020 12:37:52.088556 - xrgears 1.15.14 startup with PID=8805, config=/home/mats/.local/share/Steam/config, runtime=/home/mats/.local/share/Steam/steamapps/common/SteamVR
Tue Dec 15 2020 12:37:52.088965 - vrclient type=VRApplication_OpenXRInstance
Tue Dec 15 2020 12:37:52.094020 - [Settings] Load Default Json Settings from /home/mats/.local/share/Steam/steamapps/common/SteamVR/drivers/htc/resources/settings/default.vrsettings
Tue Dec 15 2020 12:37:52.094551 - [Settings] Load Default Json Settings from /home/mats/.local/share/Steam/steamapps/common/SteamVR/drivers/lighthouse/resources/settings/default.vrsettings
Tue Dec 15 2020 12:37:52.094969 - [Settings] Load Default Json Settings from /home/mats/.local/share/Steam/steamapps/common/SteamVR/drivers/null/resources/settings/default.vrsettings
Tue Dec 15 2020 12:37:52.095586 - [Settings] Load Default Json Settings from /home/mats/.local/share/Steam/steamapps/common/SteamVR/resources/settings/default.vrsettings
Tue Dec 15 2020 12:37:52.096385 - [Settings] Load Json Settings from /home/mats/.local/share/Steam/config/steamvr.vrsettings
Tue Dec 15 2020 12:37:52.111844 - CIPCPipe::ConnectPipe(SteamVR_Namespace) attempting connect to steamvr:SteamVR_Namespace
Tue Dec 15 2020 12:37:52.112257 - CSharedResourceNamespaceClient::Init(): received namespace data 1497
Tue Dec 15 2020 12:37:52.112589 - CIPCPipe::ConnectPipe(VR_ServerPipe_1497) attempting connect to steamvr:VR_ServerPipe_1497
Tue Dec 15 2020 12:37:52.125936 - Received success response from vrserver connect
Tue Dec 15 2020 12:37:52.168831 - Unable to create shared memory for IPC client
Tue Dec 15 2020 12:37:52.169131 - Failed to init web server shared state

Checking strace it seems to break when trying to open a shared memory object as read only then attempting to truncate it, This issue is consistent over all the applications I have tested so far.

openat(AT_FDCWD, "/dev/shm/u1000-Shm_a8a6f1a7", O_RDONLY|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0777) = 11
ftruncate(11, 8)                        = -1 EINVAL (Invalid argument)

full strace here: https://gist.github.com/m4tsa/e312e24cf0e73e6e0705199863d68e1b

To Reproduce
Steps to reproduce the behavior:

  1. Launch any OpenXR application with the SteamVR Runtime
    I have tried multiple OpenXR applications including my own and all of them suffers from the same issue.

Expected behavior
That it at least initializes correctly.

System Information (please complete the following information):

Eexpipiplus1 2020-12-16 github

:pager: @Ralith. I think you've been fiddling with OpenXR/SteamVR/NixOS?

FWIW I did manage to create an OpenXR instance a few times successfully but have been unable to replicate that success.

Also, this is the log from launching xrgears with an overridden open call which opens this file as RW, not very interesting though: https://gist.github.com/expipiplus1/6fc46345c96743f0229647fbfbf8d164#file-gistfile1-txt-L578-L629

MMyaats 2021-11-11 github

I seem to be unable to reproduce this anymore, will assume it has been fixed.

Eexpipiplus1 2021-11-11 github

can confirm

❯ cat ~/.config/openxr/1/active_runtime.json
{
        "file_format_version" : "1.0.0",
        "runtime" :
        {
                "VALVE_runtime_is_steamvr" : true,
                "library_path" : "/home/e/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrclient.so",
                "name" : "SteamVR"
        }
}
steam-run xrgears

This does seems to run now (although weirdly the gears don't appear).

MMyaats 2021-11-11 github

Replying to https://github.com/ValveSoftware/SteamVR-for-Linux/issues/412#issuecomment-966418745

If I remember correctly the gears in xrgears uses some layer system that the SteamVR does not currently support. But I am not 100% certain.

Nothing extracted yet.