Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

steamwebhelper not starting on ClearLinux when run from terminal: "bwrap: Can't make symlink at /var/cache/ldconfig/ld.so.cache: File exists" #10789

Open
smcv opened this issue Apr 18, 2024 · 12 comments

Comments

@smcv
Copy link
Contributor

smcv commented Apr 18, 2024

System information

Originally reported by @K1ngfish3r in #10577, but I'm separating this into its own more specific issue report, because the messages logged are not consistent with what was originally reported in #10577.

  • Steam client version (build number or date): stable 1709846872 and public beta 1713317598 are both affected
  • Distribution (e.g. Ubuntu): ClearLinux
  • Opted into Steam client beta?: both stable and beta are affected
  • Have you checked for system updates?: not specified
  • Steam Logs: with Stable and with Beta
  • GPU: not specified

Steps for reproducing this issue

Launch Steam (stable or public beta) on ClearLinux from a terminal emulator. @K1ngfish3r appears to be using kgx (GNOME Console), if that matters.

For better logs, running with STEAM_LINUX_RUNTIME_VERBOSE=1 in the environment is useful.

Expected result

Steam runs successfully.

Actual result

steamwebhelper fails to start. The log ends with:

pressure-vessel-wrap[18180]: D: Replacing self with srt-bwrap...
bwrap: Can't make symlink at /var/cache/ldconfig/ld.so.cache: File exists

This is an internal error in the Steam Linux Runtime container runtime framework, and is likely to be specific to the ClearLinux distribution.

Workaround

@K1ngfish3r reports that launching Steam from the .desktop file (from the desktop environment's menus) works as expected.

@smcv
Copy link
Contributor Author

smcv commented Apr 18, 2024

@K1ngfish3r writes:

Find attached steamwebhelper.log with the updated command Exec=env STEAM_LINUX_RUNTIME_VERBOSE=1 /usr/bin/steam %U

This is a log while using the workaround of starting Steam from the .desktop file instead of from a terminal. I'll compare the logs next.

@smcv
Copy link
Contributor Author

smcv commented Apr 18, 2024

gvimdiff tells me that the "bad" log (from a terminal) has a bunch of environment variable differences.

  • terminal adds AR, CC, CFLAGS, CXX, CXXFLAGS, FCFLAGS, FFLAGS, GCC_COLORS, JAVA_INCLUDE_PATH, LA_*, LD_ORDERING_SCRIPT_MAP, MPI_*, NM, RANLIB, THEANO_FLAGS: development stuff, probably irrelevant/harmless. As a side note, a lot of this is explicitly set to what ought to be a default anyway - I would recommend leaving things set to their defaults unless you specifically need them changed.

  • terminal adds COLORTERM, TERM, TERM_PROGRAM, TERM_PROGRAM_VERSION, VTE_VERSION: terminal info, should be irrelevant/harmless

  • .desktop has a simpler DBUS_SESSION_BUS_ADDRESS and doesn't have DBUS_STARTER_ADDRESS or DBUS_STARTER_BUS_TYPE: expected, harmless

  • terminal adds EDITOR, LS_COLORS: user preferences, probably irrelevant/harmless

  • terminal adds ENABLE_VK_LAYER_VALVE_steam_overlay_1=1: possibly relevant, worth a closer look

  • .desktop adds GIO_LAUNCHED_DESKTOP_FILE, GIO_LAUNCHED_DESKTOP_FILE_PID: expected, harmless

  • .desktop adds GJS_DEBUG_OUTPUT, GJS_DEBUG_TOPICS: arguably a minor bug in GNOME Shell, but expected and harmless

  • terminal has GTK_IM_MODULE=ibus, .desktop does not

  • different INVOCATION_ID, JOURNAL_STREAM, SHLVL, SYSTEMD_EXEC_PID: expected, harmless

  • terminal has LANG=en_US.UTF-8, .desktop has LANG=C.UTF-8: this looks like a system misconfiguration, but should be harmless

  • terminal has a couple of extra PATH entries at the end, probably harmless (although you maybe want GNOME Shell to search those too...)

  • terminal adds QTWEBENGINE_DISABLE_SANDBOX=1: probably irrelevant, we don't use Qt

  • terminal adds PYTHONIOENCODING=utf-8:surrogateescape, probably irrelevant here

  • terminal adds SDL_GAMECONTROLLERCONFIG, Steam3Master, SteamUser: I'm surprised that the .desktop doesn't also inherit these down from Steam to the steamwebhelper, probably irrelevant here but odd

  • XDG_DATA_DIRS is different

    • in the terminal, /var/cache is in XDG_DATA_DIRS: what's going on here? this seems really strange
    • the order is different, e.g. Flatpak is first on the terminal but last from the .desktop

@smcv
Copy link
Contributor Author

smcv commented Apr 18, 2024

@K1ngfish3r, I think this is probably caused by /var/cache being in your XDG_DATA_DIRS. This causes two parts of the Steam container runtime framework to conflict with each other: the part that tries to share each item in XDG_DATA_DIRS with the container in case it might be important, and the part that needs to create /var/cache/ldconfig/ld.so.cache because ClearLinux requires it.

Why is /var/cache in your XDG_DATA_DIRS? I can't think of a situation where that would be useful or desirable. /var/cache is the system-wide equivalent of XDG_CACHE_HOME, whereas XDG_DATA_DIRS is the system-wide equivalent of XDG_DATA_HOME. They have different roles and meanings.

There are a couple of things to try, both in a terminal and both with STEAM_LINUX_RUNTIME_VERBOSE=1:

  1. Run Steam with Steam Linux Runtime 3.0 (sniper) client_beta branch installed, and environment variable PRESSURE_VESSEL_PREFIX set to the absolute path to your steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel directory. Whether this works or not, please collect the steamwebhelper.log and attach/gist it as updated-pv.log. With this workaround, you should find that the verbose log will say -> bubblewrap 0.9.0, instead of the -> bubblewrap 0.8.0 from the current version.

  2. Run Steam with unset PRESSURE_VESSEL_PREFIX to undo the workaround above, but with /var/cache removed from the XDG_DATA_DIRS. Whether this works or not, please collect the steamwebhelper.log and attach/gist it as no-var-cache.log.

@K1ngfish3r
Copy link

K1ngfish3r commented Apr 18, 2024

updated pressure vessel
with no var/cache variable

I am happy to report that removing /var/cache from XDG_DATA_DIRS fixed the issue.
Using the command below

i@clr~ $ systemctl --user show-environment
HOME=/home/i
LANG=C.UTF-8
LOGNAME=i
PATH=/usr/bin/haswell:/usr/bin:/usr/local/bin:/opt/3rd-party/bundles/clearfraction/bin:/opt/3rd-party/bundles/clearfraction/usr/bin:/opt/3rd-party/bundles/clearfraction/usr/local/bin
SHELL=/bin/bash
USER=i
XDG_DATA_DIRS=/usr/share:/usr/local/share:/opt/3rd-party/bundles/clearfraction/usr/share:/opt/3rd-party/bundles/clearfraction/usr/local/share:/home/i/.local/share/flatpak/exports/share:/home/i/.local/share/flatpak/exports/share
XDG_RUNTIME_DIR=/run/user/1000
LD_LIBRARY_PATH=/usr/lib64:/opt/3rd-party/bundles/clearfraction/usr/lib64:/opt/3rd-party/bundles/clearfraction/usr/local/lib64
XDG_CONFIG_DIRS=/usr/share/xdg:/etc/xdg:/opt/3rd-party/bundles/clearfraction/usr/share/xdg:/opt/3rd-party/bundles/clearfraction/etc/xdg
FONTCONFIG_PATH=/usr/share/defaults/fonts
GST_PLUGIN_PATH_1_0=/usr/lib64/gstreamer-1.0:/opt/3rd-party/bundles/clearfraction/usr/lib64/gstreamer-1.0
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=gnome-wayland
DISPLAY=:0
GDMSESSION=gnome-wayland
GDM_LANG=C.UTF-8
GNOME_SETUP_DISPLAY=:1
PWD=/home/i
QT_IM_MODULE=ibus
SESSION_MANAGER=local/clr:@/tmp/.ICE-unix/1599,unix/clr:/tmp/.ICE-unix/1599
SHLVL=0
USERNAME=i
WAYLAND_DISPLAY=wayland-0
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.1Y5JM2
XDG_CURRENT_DESKTOP=GNOME
XDG_MENU_PREFIX=gnome-
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=gnome-wayland
XDG_SESSION_TYPE=wayland
XMODIFIERS=@im=ibus

I was unable to find /var/cache however printenv does show /var/cache so I looked into /usr/share/defaults/etc/profile and was able to find and remove it. Find attached logs for completeness.

@smcv
Copy link
Contributor Author

smcv commented Apr 18, 2024

I was unable to find /var/cache however printenv does show /var/cache so I looked into /usr/share/defaults/etc/profile and was able to find and remove it. Find attached logs for completeness.

I'm curious why it was there. Is this a default setting for ClearLinux, or something that you changed, or a change made by third-party software, or what?

(The answer to this question affects my decision for how the Steam Linux Runtime framework should fix this.)

@smcv
Copy link
Contributor Author

smcv commented Apr 18, 2024

updated pressure vessel

The updated bubblewrap doesn't work around this as I had hoped, but it does at least log a better error message: bwrap: Can't make symlink at /var/cache/ldconfig/ld.so.cache: destination exists and is not a symlink.

with no var/cache variable

As I had hoped, this avoids the issue.

@K1ngfish3r
Copy link

I'm curious why it was there. Is this a default setting for ClearLinux, or something that you changed, or a change made by third-party software, or what?

(The answer to this question affects my decision for how the Steam Linux Runtime framework should fix this.)

files defined under /usr/ are provided by ClearLinux and are default to all users. They can be overridden by defining profile under /etc/profile (which I had not done).

@smcv
Copy link
Contributor Author

smcv commented Apr 18, 2024

It looks like ClearLinux might rely on /var/cache being in the XDG_DATA_DIRS so that /var/cache/applications/mimeinfo.cache will be found. We'll have to filter this out in pressure-vessel.

@smcv
Copy link
Contributor Author

smcv commented Apr 19, 2024

A simple reproducer for this on a more typical OS is:

XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/local/share:/usr/share}:/var/cache \
.../steamapps/common/SteamLinuxRuntime_sniper/run -- xterm

@smcv
Copy link
Contributor Author

smcv commented Apr 19, 2024

@K1ngfish3r, if you're comfortable with using prerelease code, please try this:

  1. download https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/jobs/508836/artifacts/raw/_build/pressure-vessel-bin.tar.gz and unpack it somewhere convenient (I normally use ~/tmp/pressure-vessel/)
  2. completely exit from Steam
  3. run Steam with these environment variables:
    • XDG_DATA_DIRS containing /var/cache
    • PRESSURE_VESSEL_PREFIX set to the unpacked pressure-vessel directory, e.g. I use PRESSURE_VESSEL_PREFIX="$HOME/tmp/pressure-vessel"
    • STEAM_LINUX_RUNTIME_VERBOSE=1

For this test, it shouldn't matter whether you're using the stable or beta releases of Steam and SLR 3.0 (sniper) (but if you report that it didn't work, please say which ones you were using).

You should find that steamwebhelper launches successfully, and SLR/Proton games like Dota 2 should also still launch successfully.

(Note to self: the pressure-vessel build linked above is !706 v1.)

@K1ngfish3r
Copy link

K1ngfish3r commented Apr 21, 2024

pre-release PV.log

I restored the default profile with the /var/cache in the XDG_DATA_DIRS and ran PRESSURE_VESSEL_PREFIX=/home/i/tmp/pressure-vessel-bin/pressure-vessel STEAM_LINUX_RUNTIME_VERBOSE=1 steam

Steam: works
Dota2: works

I can confirm this is working.

Ref:
SLR: pre-release
Steam client: beta

@smcv
Copy link
Contributor Author

smcv commented Apr 22, 2024

Thanks for testing! I'll try to get that change into a future Steam beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants