SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

[Steam Frame] Qt app with a tray icon kills the session dbus-broker in Game Mode (fd exhaustion), ending the whole session

Open genericJE opened this issue 2 weeks ago • 1 comments

Your system information

  • Steam client version: 1794424036 (client beta linux_arm64_beta_861407927dc8efb407da7cf)
  • SteamOS version: 0.5.8 (BUILD_ID=20261106.6144341, VARIANT_ID=vr, update branch beta), Steam Frame, aarch64
  • Opted into Steam client beta?: Yes
  • Opted into SteamOS beta?: Yes
  • Have you checked for updates in Settings > System?: Not rechecked before filing

Please describe your issue in as much detail as possible:

Expected: launching a flatpak app from Game Mode cannot take down the session.

Actual: launching flatpak VLC from Game Mode ("Launch Program") ends the entire gamescope session about 3 seconds later. Steam, SteamVR's web helpers and WirePlumber all crash at the same moment and the device returns to a fresh session.

This is the session-bus fd exhaustion mentioned as "secondary impact" in #2904, here with a fast, deterministic trigger and no xdg-desktop-portal-holo crash involved.

The cause is the user session dbus-broker exiting with Too many open files. Three things combine:

  1. The game-mode environment exports QT_QPA_PLATFORMTHEME=kde, but no org.kde.StatusNotifierWatcher is on the game-mode session bus. A Qt app that loads the KDE platform theme and enables a tray icon then retries tray registration in a tight loop, opening a new session-bus connection on each attempt (long-standing KDE bug, https://bugs.kde.org/show_bug.cgi?id=353062).
  2. The user dbus-broker.service runs with a soft RLIMIT_NOFILE of 1024 (hard 524288).
  3. dbus-broker 37 treats EMFILE while accepting a peer as fatal and exits (CVE-2026-16730, https://bugzilla.redhat.com/show_bug.cgi?id=2506348).

Any sandboxed app with session-bus access can trigger 2 + 3; VLC is just the one that does it by accident.

System

  • dbus-broker 37-3, systemd 257.7-2.5, gamescope 3.16.30-4, flatpak 1.16.3
  • VLC 3.0.24 from Flathub (runtime org.kde.Platform 5.15-25.08, Qt 5.15.18), default settings

Journal at the moment of failure

systemd[1611]: Started app-flatpak-org.videolan.VLC-445256089.scope.            (19:00:02.83)
dbus-broker-launch[1700]: ERROR sockopt_get_peerpidfd @ ../dbus-broker-37/src/util/sockopt.c +244: Too many open files   (19:00:05.53)
dbus-broker-launch[1700]:       peer_new_with_fd @ ../dbus-broker-37/src/bus/peer.c +290
dbus-broker-launch[1700]:       listener_dispatch @ ../dbus-broker-37/src/bus/listener.c +54
dbus-broker-launch[1700]:       dispatch_context_dispatch @ ../dbus-broker-37/src/util/dispatch.c +344
dbus-broker-launch[1700]:       broker_run @ ../dbus-broker-37/src/broker/broker.c +209
systemd[1611]: Got disconnect on API bus.
cef_log[2168]: FATAL:bus.cc(1246)] D-Bus connection was disconnected. Aborting.      (steamwebhelper, SIGTRAP)
select_steamvr.sh[166428]: FATAL:bus.cc(1246)] D-Bus connection was disconnected. Aborting.   (vrwebhelper, SIGTRAP)
steamos[223571]: Gamescope Session Ended - Performing Final Cleanup
dbus-broker-launch[1699]: Exiting due to fatal error: -131
systemd[1611]: dbus-broker.service: Failed with result 'exit-code'.

WirePlumber also segfaults right after losing the bus (wp_spa_json_new_from_string called from a Lua script, both times), which is what first drew attention to this.

Measurements

To reproduce without losing the session, I raised the running broker's soft limit (prlimit --pid <dbus-broker pid> --nofile=524288:524288), launched VLC with Steam's game-mode environment, and sampled ls /proc/<broker>/fd | wc -l:

VLC launch Broker open fds
Default settings, game-mode environment 87 -> 2,615 in 18 s, still climbing
Same, with --no-qt-system-tray peak 95
Tray enabled, QT_QPA_PLATFORMTHEME unset peak 89, no warnings
Tray enabled, QT_QPA_PLATFORMTHEME=kde 1,769 after 8 s; 841 QSystemTrayIcon::setVisible: No Icon set lines

The fds are released as soon as VLC exits. The idle broker sits at about 87 fds, so the 1024 limit is reached within about 3 seconds.

Suggested fixes

Any one of these would stop the session from dying; the first two are the general ones.

  • Raise the soft LimitNOFILE for the user dbus-broker.service. With the limit raised to 524288 on the running broker the session survived the same launch.
  • Ship a dbus-broker build that refuses the connection on EMFILE instead of exiting (CVE-2026-16730).
  • Do not export QT_QPA_PLATFORMTHEME=kde into the gamescope session, or provide a StatusNotifierWatcher there, since the KDE platform theme assumes one exists.

Workaround for users

Set qt-system-tray=0 in ~/.var/app/org.videolan.VLC/config/vlc/vlcrc.

Steps for reproducing this issue:

  1. Install VLC from Flathub (org.videolan.VLC) and leave its settings at defaults (tray icon enabled).
  2. In Game Mode, start it via "Launch Program".
  3. About 3 seconds later the session dies. This happened twice in a row, the second time 28 seconds after boot.

genericJE avatar Nov 12 '26 18:11 genericJE

there is already a fix for this queued for a future beta release

matte-schwartz avatar Nov 13 '26 01:11 matte-schwartz