ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.21k stars 174 forks source link

steamwebhelper crashloop on startup #10649

Closed Jappie3 closed 6 months ago

Jappie3 commented 6 months ago

System information

The issue

A couple of days ago, I opened Steam and everything worked fine. I exited (fully closed) Steam & opened it again a few hours later. The loading screen appeared, but after that it crashed. Running from CLI indicated that steamwebhelper was stuck in a crashloop.

The issue occurs on both Hyprland & Sway, leading me to believe that it's a Steam issue and not an issue with my compositor. I also tried reinstalling by removing ~/.steam & .local/share/Steam, to no avail. Here are the relevant logs from steamwebhelper.log:

steamwebhelper.sh[549396]: === Thu Mar 21 10:10:54 AM CET 2024 ===
steamwebhelper.sh[549396]: Starting steamwebhelper under bootstrap sniper steam runtime at /home/jasper/.local/share/Steam/ubuntu12_64/steam-runtime-sniper
x86_64-linux-gnu-capsule-capture-libs: warning: Dependencies of libnvidia-pkcs11.so.550.54.14 not found, ignoring: Missing dependencies: Could not find "libcrypto.so.1.1" in LD_LIBRARY_PATH "/lib64:/lib32:/steamrt/amd64/lib/x86_64-linux-gnu:/steamrt/amd64/lib:/steamrt/amd64/usr/lib/x86_64-linux-gnu:/steamrt/amd64/usr/lib:/steamrt/i386/lib/i386-linux-gnu:/steamrt/i386/lib:/steamrt/i386/usr/lib/i386-linux-gnu:/steamrt/i386/usr/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib", ld.so.cache, DT_RUNPATH or fallback /lib:/usr/lib
pressure-vessel-wrap[549417]: W: "/run/current-system/sw/bin/getent" is unlikely to appear in "/run/host"
pressure-vessel-wrap[549417]: W: Found more than one possible libdrm data directory from provider
setlocale "de_DE.UTF-8": No such file or directory
pressure-vessel-locale-gen: Missing locale de_DE.UTF-8 (found in $LC_TIME)
pressure-vessel-locale-gen: Generating locale en_US.UTF-8...
pressure-vessel-locale-gen: Generated locale en_US.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale en_IE.UTF-8...
pressure-vessel-locale-gen: Generated locale en_IE.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale de_DE.UTF-8...
pressure-vessel-locale-gen: Generated locale de_DE.UTF-8 successfully
pressure-vessel-adverb[549649]: W: Container startup will be faster if missing locales are created at OS level
exec ./steamwebhelper --no-sandbox -lang=en_US -cachedir=/home/jasper/.local/share/Steam/config/htmlcache -steampid=549164 -buildid=1709846872 -steamid=0 -logdir=/home/jasper/.local/share/Steam/logs -uimode=7 -startcount=0 -steamuniverse=Public -realm=Global -clientui=/home/jasper/.local/share/Steam/clientui -steampath=/home/jasper/.local/share/Steam/ubuntu12_32/steam -launcher=0 -no-restart-on-ui-mode-change --enable-smooth-scrolling --password-store=basic --log-file=/home/jasper/.local/share/Steam/logs/cef_log.txt --disable-quick-menu --disable-features=DcheckIsFatal
[0321/091058.663203:ERROR:context.cc(100)] The browser_subprocess_path directory (./steamwebhelper) is not an absolute path. Defaulting to empty.
[0321/091058.685618:WARNING:crash_reporting.cc(278)] Failed to set crash key: UserID with value: 0
[0321/091058.685720:WARNING:crash_reporting.cc(278)] Failed to set crash key: BuildID with value: 1709756822
[0321/091058.685728:WARNING:crash_reporting.cc(278)] Failed to set crash key: SteamUniverse with value: Public
[0321/091058.685734:WARNING:crash_reporting.cc(278)] Failed to set crash key: Vendor with value: Valve
[0321/091058.685740:WARNING:crash_reporting.cc(278)] Failed to set crash key: Platform with value: Linux
[0321/091058.686184:INFO:crash_reporting.cc(239)] Crash reporting enabled for process: browser
[0321/091058.687334:WARNING:task_impl.cc(32)] No task runner for threadId 0
[0321/091058.688825:WARNING:task_impl.cc(32)] No task runner for threadId 0
[0321/091058.711325:WARNING:crash_reporting.cc(278)] Failed to set crash key: UserID with value: 0
[0321/091058.711325:WARNING:crash_reporting.cc(278)] Failed to set crash key: UserID with value: 0
[0321/091058.711389:WARNING:crash_reporting.cc(278)] Failed to set crash key: BuildID with value: 1709846872
[0321/091058.711398:WARNING:crash_reporting.cc(278)] Failed to set crash key: BuildID with value: 1709846872
[0321/091058.711402:WARNING:crash_reporting.cc(278)] Failed to set crash key: SteamUniverse with value: Public
[0321/091058.711406:WARNING:crash_reporting.cc(278)] Failed to set crash key: SteamUniverse with value: Public
[0321/091058.711409:WARNING:crash_reporting.cc(278)] Failed to set crash key: Vendor with value: Valve
[0321/091058.711413:WARNING:crash_reporting.cc(278)] Failed to set crash key: Vendor with value: Valve
[0321/091058.711416:WARNING:crash_reporting.cc(278)] Failed to set crash key: Platform with value: Linux
[0321/091058.711419:WARNING:crash_reporting.cc(278)] Failed to set crash key: Platform with value: Linux
[0321/091058.755955:INFO:crash_reporting.cc(262)] Crash reporting enabled for process: gpu-process
[0321/091058.824801:WARNING:sandbox_linux.cc(385)] InitializeSandbox() called with multiple threads in process gpu-process.
[0321/091058.949315:WARNING:crash_reporting.cc(278)] Failed to set crash key: UserID with value: 0
[0321/091058.949377:WARNING:crash_reporting.cc(278)] Failed to set crash key: BuildID with value: 1709846872
[0321/091058.949385:WARNING:crash_reporting.cc(278)] Failed to set crash key: SteamUniverse with value: Public
[0321/091058.949391:WARNING:crash_reporting.cc(278)] Failed to set crash key: Vendor with value: Valve
[0321/091058.949398:WARNING:crash_reporting.cc(278)] Failed to set crash key: Platform with value: Linux
[0321/091058.951495:INFO:crash_reporting.cc(239)] Crash reporting enabled for process: utility
[0321/091058.991127:INFO:crash_reporting.cc(262)] Crash reporting enabled for process: utility
[0321/091059.041201:INFO:crash_reporting.cc(262)] Crash reporting enabled for process: renderer
Invalid browser dimensions: 0 x 0
src/webhelper/html_chrome.cpp (3435) : CefCurrentlyOn( TID_UI )
failed to create drawable
[0321/091101.434904:ERROR:directory_reader_posix.cc(42)] opendir /tmp/dumps/attachments/048480ef-f6f1-4d59-9d87-ef70fc3d1c82: No such file or directory (2)
[0321/091102.200798:ERROR:ssl_client_socket_impl.cc(985)] handshake failed; returned -1, SSL error code 1, net_error -3
[0321/091102.201168:ERROR:ssl_client_socket_impl.cc(985)] handshake failed; returned -1, SSL error code 1, net_error -3

Journalctl also lists a bunch of coredumps from .local/share/Steam/ubuntu12_64/steamwebhelper:

 coredumpctl dump 13797
           PID: 13797 (steamwebhelper)
           UID: 1000 (jasper)
           GID: 100 (users)
        Signal: 6 (ABRT)
     Timestamp: Thu 2024-03-21 11:11:58 CET (2h 40min ago)
  Command Line: ./steamwebhelper --no-sandbox -lang=en_US -cachedir=/home/jasper/.local/share/Steam/config/htmlcache -steampid=11132 -buildid=1709846872 -steamid=76561198833476742 -logdir=/home/jasper/.local/share/Steam/logs -uimode=7 -startcount=4 -steamuniverse=Public -realm=Global -clientui=/home/jasper/.local/share/Steam/clientui -steampath=/home/jasper/.local/share/Steam/ubuntu12_32/steam -launcher=0 -no-restart-on-ui-mode-change --enable-smooth-scrolling --password-store=basic --log-file=/home/jasper/.local/share/Steam/logs/cef_log.txt --disable-quick-menu --disable-features=DcheckIsFatal
    Executable: /home/jasper/.local/share/Steam/ubuntu12_64/steamwebhelper
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (jasper)
       Boot ID: d92f771698a441e0a72e612e310481c4
    Machine ID: f2eb6f544379483183ef388f7c82f48c
      Hostname: Kainas
       Storage: /var/lib/systemd/coredump/core.steamwebhelper.1000.d92f771698a441e0a72e612e310481c4.13797.1711015918000000.zst (present)
  Size on Disk: 5.7M
       Message: Process 13797 (steamwebhelper) of user 1000 dumped core.

                Module /nix/store/0i92nnpjyn90bqhms380yhmgwzrrz0h7-bzip2-1.0.8/lib/libbz2.so.1.0.8 without build-id.
                Module /nix/store/aqic0pnqxjsnx6nalrj58244ia50qzgc-systemd-minimal-libs-255.2/lib/libudev.so.1.7.8 without build-id.
                Module /nix/store/a3fhvy76y01zs6dpjcpp4iwpfg4pb4h4-libX11-1.8.7/lib/libX11-xcb.so.1.0.0 without build-id.
                Module /nix/store/bamq0s7n2hqmsnf7hyspc1xxrpsiy8y9-zstd-1.5.5/lib/libzstd.so.1.5.5 without build-id.
                Module /nix/store/y2w59ka6i69rka3s5wc66awqh1bgaxjg-xz-5.6.0/lib/liblzma.so.5.6.0 without build-id.
                Module /nix/store/krqp9wj3rgalmqv04y0sqw987mxsnddn-libidn2-2.3.7/lib/libidn2.so.0.4.0 without build-id.
                Module /nix/store/8lcswha0vn2hcqzl2cr6gpjww59sspy3-libxcb-1.16/lib/libxcb-shm.so.0.0.0 without build-id.
                Module /nix/store/bqwpsy99nbgp918w3mwn73jygm1i5ck4-zlib-1.3.1/lib/libz.so.1.3.1 without build-id.
                Module /nix/store/alxp4kb0dgfczqwd7xfrpflhq50w0wck-gcc-13.2.0-libgcc/lib/libgcc_s.so.1 without build-id.
                Module /nix/store/8lcswha0vn2hcqzl2cr6gpjww59sspy3-libxcb-1.16/lib/libxcb.so.1.1.0 without build-id.
                Module /nix/store/b885rdifi33nzvny93jds55zkwvsbspr-expat-2.6.0/lib/libexpat.so.1.9.0 without build-id.
                Module /nix/store/pda887ll2x0fv5hsshq993lz35qibyjm-libdrm-2.4.120/lib/libdrm.so.2.4.0 without build-id.
                Module /nix/store/a3fhvy76y01zs6dpjcpp4iwpfg4pb4h4-libX11-1.8.7/lib/libX11.so.6.4.0 without build-id.
                Module /nix/store/lhini9076xf583b975fdd4wdy9kd8zdi-libglvnd-1.7.0/lib/libGL.so.1.7.0 without build-id.
                Module /nix/store/69z583aq6drx9wrs4l26j07n431d0s52-libXfixes-6.0.1/lib/libXfixes.so.3.1.0 without build-id.
                Module /nix/store/ndrbwvfh7mqi7q84mmxblxjikb3v731x-libXext-1.3.6/lib/libXext.so.6.4.0 without build-id.
                Module libpcsclite.so.1 without build-id.
                Module libbeidpkcs11.so without build-id.
                Module libpciaccess.so.0 without build-id.
                Module libxml2.so.2 without build-id.
                Module libncursesw.so.6 without build-id.
                Module libstdc++.so.6 without build-id.
                Module libdrm_intel.so.1 without build-id.
                Module libdrm_nouveau.so.2 without build-id.
                Module libdrm_amdgpu.so.1 without build-id.
                Module libdrm_radeon.so.1 without build-id.
                Module libsensors.so.5 without build-id.
                Module libxcb-xfixes.so.0 without build-id.
                Module libxcb-sync.so.1 without build-id.
                Module libxcb-present.so.0 without build-id.
                Module libxcb-dri3.so.0 without build-id.
                Module libxshmfence.so.1 without build-id.
                Module libXxf86vm.so.1 without build-id.
                Module libxcb-dri2.so.0 without build-id.
                Module libxcb-glx.so.0 without build-id.
                Module libcap.so.2 without build-id.
                Module libunistring.so.5 without build-id.
                Module libffi.so.8 without build-id.
                Module libxcb-randr.so.0 without build-id.
                Module libXdmcp.so.6 without build-id.
                Module libXau.so.6 without build-id.
                Module libGLdispatch.so.0 without build-id.
                Module libGLX.so.0 without build-id.
                Stack trace of thread 13813:
                #0  0x00007f55874a407c __pthread_kill_implementation (/nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 + 0x8d07c)
                ValveSoftware/steam-for-linux#1  0x00007f5587454e06 raise (/nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 + 0x3de06)
                ValveSoftware/steam-for-linux#2  0x00007f558743d8f5 abort (/nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 + 0x268f5)
                ValveSoftware/steam-for-linux#3  0x000055a7c135d9ac n/a (/home/jasper/.local/share/Steam/ubuntu12_64/steamwebhelper + 0x63a9ac)
                ValveSoftware/steam-for-linux#4  0x00007f5566ffaf20 n/a (n/a + 0x0)
                ValveSoftware/steam-for-linux#5  0x00007f55080ddd40 n/a (libbeidpkcs11.so + 0x22d40)
                ELF object binary architecture: AMD x86-64
Refusing to dump core to tty (use shell redirection or specify --output).

Steps for reproducing:

  1. Open Steam
Jappie3 commented 6 months ago

For the record: I am aware of ValveSoftware/steam-for-linux#10645, but the logs of that issue seem to be completely unrelated to mine:

steam-runtime-launch-client[2083]: E: Could not find requesting pid
smcv commented 6 months ago

libbeidpkcs11.so

Try disabling that module? It looks like it's causing (or involved in) a NULL pointer dereference.

Jappie3 commented 6 months ago

First of all, thank you so much for the quick reply @smcv I have no idea how I looked over that error, libbeid is some module for Belgium's Web Eid software. It seems completely unrelated to Steam though, so I have no idea how it would make a difference.

I don't have the time to dive into this further now, but in a few days I might try to look into it a little more... after all, this used to work just fine.

For any Nix users stumbling upon this: I basically commented the following module out:

  programs.firefox = {
    enable = true;
    nativeMessagingHosts.packages = [pkgs.web-eid-app];
    policies.SecurityDevices.p11-kit-proxy = "${pkgs.p11-kit}/lib/p11-kit-proxy.so";
  };
  services.pcscd.enable = true;
  environment = {
    etc."pkcs11/modules/opensc-pkcs11".text = ''
      module: ${pkgs.opensc}/lib/opensc-pkcs11.so
    '';
    systemPackages = with pkgs; [
      firefox
      eid-mw # eID middleware
      ccid # ccid drivers for pcsclite
      acsccid # PC/SC driver which supports ACS CCID smart card readers
      pinentry # GNUPG interface for passphrase input
      opensc # set of libraries to access smart cards
      p11-kit # library for loading & sharing PKCS#11 modules
    ];
  };
MarkRijckenberg commented 5 months ago

I had the exact same issue. Uninstalling eid-mw (containing libbeidpkcs11.so) solved this issue for me. Thanks for this report.

NorfairKing commented 5 months ago

@MarkRijckenberg I still don't understand why this eid thing breaks anything but you just saved my sanity.

MarkRijckenberg commented 5 months ago

@Norfairking It's thanks to the genius of the nix package management system (and https://hydra.nixos.org/ ). Reproducible builds mean reproducible bugs/results. I have noticed this with other NixOS bugs as well. I can often take a peek at the Hydra build results and immediately see it is a general issue for everyone. I opened a new bugreport about this issue (https://github.com/NixOS/nixpkgs/issues/298662) , because I really want to use eid-mw and steam on the same PC at the same time. Uninstalling eid-mw is just a workaround, not a solution.

MarkRijckenberg commented 5 months ago

@NorfairKing @Jappie3

I have created an ugly hack that circumvents this issue, allowing to run eid-mw and steam(webhelper) on the same PC. steamwebhelper crashloops due to reading /run/current-system/sw/lib/libbeidpkcs11.so from ~/.pki/nssdb/pkcs11.txt steamwebhelper should of course not be reading from ~/.pki/nssdb/pkcs11.txt , but that is the crazy situation we are in.....

See https://github.com/NixOS/nixpkgs/issues/298662#issuecomment-2067634035

NorfairKing commented 5 months ago

@MarkRijckenberg Thanks for figuring this out! Luckily I almost never have to use this e-reader thing. Now that we have a workaround, we can start to think about a long-term solution. What do you think that would look like?

MarkRijckenberg commented 5 months ago

Instead of repeating myself across 2 separate threads, please look at my latest comments here: The thread below is still "open/unresolved", after 30 comments... :

https://github.com/NixOS/nixpkgs/issues/298662

Jappie3 commented 4 months ago

Thanks for putting in the time & effort, I had forgotten about this a little bit until now. I'll have a look at the nixpkgs issue to see if there's anything I can do

MarkRijckenberg commented 4 months ago

@Jappie3 I explained everything in the other open thread. https://github.com/NixOS/nixpkgs/issues/298662

But in summary, my theory is that the long-term solution is to remove libnss3 from both steam-runtime-heavy.tar.xz and steam-runtime-sniper.tar.xz, which are both part of the steam install. Unless steam really needs libnss3, libnss3 should be removed from steam.

See here: https://packages.debian.org/bookworm/libnss3

libnss3 is a set of libraries designed to support cross-platform development of security-enabled client and server applications. It can support SSLv2 and v4, TLS, PKCS ValveSoftware/steam-for-linux#5, ValveSoftware/steam-for-linux#7, ValveSoftware/steam-for-linux#11, ValveSoftware/steam-for-linux#12, S/MIME, X.509 v3 certificates and other security standards.

Now my question is: is steam really going to be using PKCS security modules, like the one used for authenticating Belgian eid cards? I would hope not...... These types of use cases - like PKCS - should be reserved for pure web browsers like chromium, not for gaming clients that should only use certain features of web browsers just to display web pages, nothing more....

MarkRijckenberg commented 4 months ago

One of the NixOS maintainers of the steam client advised me to report this issue to Valve. Issue created here: https://github.com/ValveSoftware/steam-runtime/issues/667 Let's continue the discussion at https://github.com/ValveSoftware/steam-runtime/issues/667 as I don't think the NixOS maintainers can solve this issue.

MarkRijckenberg commented 4 months ago

I solved my crashlooping issue by performing a complete reinstall of the steam client on NixOS unstable. I ran rm -rf ~/.local/share/Steam Then reran steam to force a new install. No more crashlooping of steam, even when libbeidpkcs11.so is loaded via eid-nssdb add