protonscr

Steam coredumps within embedded gamescope on NVIDIA 555.42.02

steamclosed
ValveSoftware/steam-for-linux#10916 · opened 2024-05-23 by matte-schwartz · updated 2024-05-29 · 7 comments · github
Mmatte-schwartz 2024-05-23 github

Your system information

  • Steam client version (build number or date): 1716242052
  • Distribution (e.g. Ubuntu): Nobara 39 (Fedora 39)
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes
  • Steam Logs: steam-logs.tar.gz
  • GPU: NVIDIA Corporation AD106M [GeForce RTX 4070 Max-Q / Mobile]

Please describe your issue in as much detail as possible:

While using the new beta NVIDIA 555.42.02 driver, it seems like Steam crashes while trying to use gamescope in embedded mode with the command gamescope -e -- steam and other variations of the same command. Steam will launch for approximately 5-10 seconds, sometimes even going as far as the boot animation, before it coredumps. This subsequently leads to a gamescope coredump as well. You can see this cycle in coredumpctl here:
image

Running coredumpctl info on one of these coredumps for Steam provides this stack trace:

Stack trace of thread 7769:
                #0  0x00000000f7f84599 __kernel_vsyscall (linux-gate.so.1 + 0x599)
                #1  0x00000000f7be32b7 __pthread_kill_implementation (libc.so.6 + 0x8f2b7)
                #2  0x00000000f7b8efc5 raise (libc.so.6 + 0x3afc5)
                #3  0x00000000f7b76370 abort (libc.so.6 + 0x22370)
                #4  0x00000000f7b77422 __libc_message.cold (libc.so.6 + 0x23422)
                #5  0x00000000f7bee9cd malloc_printerr (libc.so.6 + 0x9a9cd)
                #6  0x00000000f7bf0f27 _int_free (libc.so.6 + 0x9cf27)
                #7  0x00000000f7bf33b6 free (libc.so.6 + 0x9f3b6)
                #8  0x00000000cc0977cf nouveau_drm_del (nouveau_dri.so + 0x9fb7cf)
                #9  0x00000000cc096eb1 nouveau_drm_screen_create (nouveau_dri.so + 0x9faeb1)
                [#10](/issue/ValveSoftware/steam-for-linux/10) 0x00000000cb7142fd pipe_nouveau_create_screen (nouveau_dri.so + 0x782fd)
                [#11](/issue/ValveSoftware/steam-for-linux/11) 0x00000000cbde6743 pipe_loader_create_screen_vk (nouveau_dri.so + 0x74a743)
                [#12](/issue/ValveSoftware/steam-for-linux/12) 0x00000000cbde6778 pipe_loader_create_screen (nouveau_dri.so + 0x74a778)
                [#13](/issue/ValveSoftware/steam-for-linux/13) 0x00000000cb716fd1 dri2_init_screen (nouveau_dri.so + 0x7afd1)
                [#14](/issue/ValveSoftware/steam-for-linux/14) 0x00000000cb71fe9a driCreateNewScreen3 (nouveau_dri.so + 0x83e9a)
                [#15](/issue/ValveSoftware/steam-for-linux/15) 0x00000000e73e3676 dri_screen_create_for_driver (libgbm.so.1 + 0x4676)
                [#16](/issue/ValveSoftware/steam-for-linux/16) 0x00000000e73e3e34 dri_device_create (libgbm.so.1 + 0x4e34)
                [#17](/issue/ValveSoftware/steam-for-linux/17) 0x00000000e73e1ceb find_backend (libgbm.so.1 + 0x2ceb)
                [#18](/issue/ValveSoftware/steam-for-linux/18) 0x00000000e73e1e59 gbm_create_device (libgbm.so.1 + 0x2e59)
                [#19](/issue/ValveSoftware/steam-for-linux/19) 0x00000000ec4a79f2 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steamui.so + 0x70c9f2)
                [#20](/issue/ValveSoftware/steam-for-linux/20) 0x00000000ec4a91f9 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steamui.so + 0x70e1f9)
                [#21](/issue/ValveSoftware/steam-for-linux/21) 0x00000000ec4aebe8 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steamui.so + 0x713be8)
                [#22](/issue/ValveSoftware/steam-for-linux/22) 0x00000000ec4c4f9c n/a (/home/matt/.local/share/Steam/ubuntu12_32/steamui.so + 0x729f9c)
                [#23](/issue/ValveSoftware/steam-for-linux/23) 0x00000000ec5c9162 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steamui.so + 0x82e162)
                [#24](/issue/ValveSoftware/steam-for-linux/24) 0x00000000e8104063 n/a (/home/matt/.local/share/Steam/ubuntu12_32/vgui2_s.so + 0x6b063)
                [#25](/issue/ValveSoftware/steam-for-linux/25) 0x00000000e81043a5 n/a (/home/matt/.local/share/Steam/ubuntu12_32/vgui2_s.so + 0x6b3a5)
                [#26](/issue/ValveSoftware/steam-for-linux/26) 0x00000000ec525951 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steamui.so + 0x78a951)
                [#27](/issue/ValveSoftware/steam-for-linux/27) 0x00000000ec52729f n/a (/home/matt/.local/share/Steam/ubuntu12_32/steamui.so + 0x78c29f)
                [#28](/issue/ValveSoftware/steam-for-linux/28) 0x00000000565eeee9 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steam + 0x48ee9)
                [#29](/issue/ValveSoftware/steam-for-linux/29) 0x00000000565effa2 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steam + 0x49fa2)
                [#30](/issue/ValveSoftware/steam-for-linux/30) 0x00000000565da960 n/a (/home/matt/.local/share/Steam/ubuntu12_32/steam + 0x34960)

I doubled checked and Nouveau is definitely not being used at all according to my dmesg and journal, along with lsmod | grep nouveau

I tried going one step further of running a backtrace of that in gdb but it appears the core is incomplete or corrupted, probably because of Steam's install method (an unofficial RPM package based off the debian version from https://repo.steampowered.com/steam/).

Steps for reproducing this issue:

  1. Download and install NVIDIA 555.42.02
  2. Install gamescope 3.14.2 (you can also use the latest tag if you change gamescope::ConVar<bool> cv_drm_debug_disable_in_fence_fd( "drm_debug_disable_in_fence_fd", false, "Force disable IN_FENCE_FD being set to avoid over-synchronization on the DRM backend." ); into -> gamescope::ConVar<bool> cv_drm_debug_disable_in_fence_fd( "drm_debug_disable_in_fence_fd", true, "Force disable IN_FENCE_FD being set to avoid over-synchronization on the DRM backend." ); in drm.cpp before compiling
  3. Switch to a TTY console
  4. Attempt to launch gamescope with embedded steam gamescope -e -- steam
  5. If your setup is configured properly you should have this error occur within 10-15 seconds of running that command

This may very well just be a NVIDIA issue, so I will try making a post on their forums as well. I figured I'd post my logs here anyway considering the steam coredumping in embedded mode/gamescope-session seems to be reproable by someone with a similar setup (2000-series mobile GPU/Arch Linux).

Ccubanismo 2024-05-24 github

This looks like a bug in nouveau (The userspace drivers, not the kernel driver) in that it's trying to load and probably fails due to lack of a kernel module, and has some issue like a double-free in the teardown path. However, I'm not clear why it's getting even that far into init. Do you have the files /usr/lib/gbm/nvidia-drm_gbm.so and /usr/lib32/gbm/nvidia-drm_gbm.so? They should be symlinks to /usr/lib/libnvidia-allocator.so.1 and /usr/lib32/libnvidia-allocator.so.1 respectively.

Mmatte-schwartz 2024-05-24 github

After adjusting for Fedora pathing (lib64 = 64-bit, lib=32-bit), this is what I get.

matt@gaming-pc:~$ file /usr/lib64/gbm/nvidia-drm_gbm.so
/usr/lib64/gbm/nvidia-drm_gbm.so: symbolic link to ../libnvidia-allocator.so.555.42.02
matt@gaming-pc:~$ file /usr/lib/gbm/nvidia-drm_gbm.so
/usr/lib/gbm/nvidia-drm_gbm.so: cannot open `/usr/lib/gbm/nvidia-drm_gbm.so' (No such file or directory)
matt@gaming-pc:~$ file /usr/lib64/libnvidia-allocator.so.1
/usr/lib64/libnvidia-allocator.so.1: symbolic link to libnvidia-allocator.so.555.42.02
matt@gaming-pc:~$ file /usr/lib/libnvidia-allocator.so.1
/usr/lib/libnvidia-allocator.so.1: symbolic link to libnvidia-allocator.so.555.42.02

it seems like perhaps /usr/lib/gbm/nvidia-drm_gbm.so: cannot open /usr/lib/gbm/nvidia-drm_gbm.so (No such file or directory) is my issue?

I double checked that my PC has no sign of touching nouveau which is especially confusing:

matt@gaming-pc:~$ lsmod | grep nouveau
matt@gaming-pc:~$ sudo dmesg | grep nouveau
[sudo] password for matt: 
matt@gaming-pc:~$ sudo journalctl -b | grep nouveau
May 24 09:52:36 gaming-pc xwaylandvideobridge[2911]: DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
May 24 09:52:44 gaming-pc plasmashell[3650]: DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.

I'm testing out Fedora Rawhide on a separate rig that is able to boot embedded gamescope w/ steam, however it crashes when trying to launch games in a similar manner to how my normal Fedora 39 rig crashes before displaying the home screen within embedded gamescope/steam. I will grab logs of that from my NVIDIA laptop shortly and compare them to the logs I've provided so far.

Ccubanismo 2024-05-24 github

If you manually create that missing 32-bit symlink, pointing to the 32-bit libnvidia-allocator.so.1 file, does it fix things?

Mmatte-schwartz 2024-05-24 github

That does seem to fix things! I bet I was running into issues with Steam because of the 32-bit portions of it. I think my only issue remaining is now solely within Gamescope so I'm closing this. Thank you so much for the assistance!!

Mmatte-schwartz 2024-05-27 github

@cubanismo sorry for the additional ping but I've confirmed the official .run file from Nvidia also does not create this symlink properly

Rryzendew 2024-05-27 github

i can also confirm this is true

Ccubanismo 2024-05-29 github

Thanks, yes, I'm aware. This was done on purpose, as I was hoping no one sane would ship a 32-bit app these days, and in prior days, our driver didn't support GBM anyway. Browsers, especially embedded variants like Steam uses, were actually identified as an outlier use case at that point, but they were expected to fall back gracefully, but they can't be expected to work around bugs in NVK failure paths. So much for that. I had already filed a bug to add the symlink in the driver package and of course, the additional test coverage that entails to make sure it remains functional.

Nothing extracted yet.