ValveSoftware / steam-for-linux

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

Steam Client Maximum number of clients reached #9094

Closed xpander69 closed 1 year ago

xpander69 commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

Opening Steam Client beta build causes issue where after 10-30 min i cannot open any other application anymore, until i close the steam client.

error.log

Issue happens after the log starts spamming "Maximum number of clients reached"

Steps for reproducing this issue:

  1. Opt into Beta
  2. Launch steam
  3. Keep it running for 10-30 min
Leopard1907 commented 1 year ago

Same issue here, KDE/Arch Linux/Steam client beta/X11 as display server.

https://steamcommunity.com/groups/SteamClientBeta/announcements/detail/3642882655783105850

This update triggered the issue.

NTMan commented 1 year ago

Coincidentally, I thought the GPU upgrade to Radeon 7900XTX was to blame. https://gitlab.freedesktop.org/xorg/xserver/-/issues/1425

This is a really annoying problem as it doesn't allow other X11 applications to be used. And I suspect that because of this, games are crashing.

❯ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix
done | grep -Eo '".+"' | sort | uniq -c | sort -rn
     20 "steam"
      6 "chrome"
      4 "steamwebhelper"
      2 "Telegram"
      1 "xrestop"
      1 "xdg-desktop-por"
      1 "ibus-x11"
      1 "gsd-xsettings"
      1 "gnome-shell"
❯ 
❯ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix
done | grep -Eo '".+"' | sort | uniq -c | sort -rn
     47 "steam"
      6 "chrome"
      4 "steamwebhelper"
      2 "Telegram"
      1 "xrestop"
      1 "xdg-desktop-por"
      1 "ibus-x11"
      1 "gsd-xsettings"
      1 "gnome-shell"
❯
❯ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix
done | grep -Eo '".+"' | sort | uniq -c | sort -rn
    131 "steam"
      6 "chrome"
      4 "steamwebhelper"
      2 "Telegram"
      1 "xrestop"
      1 "xdg-desktop-por"
      1 "ibus-x11"
      1 "gsd-xsettings"
      1 "gnome-shell" 
❯ 
❯ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix
done | grep -Eo '".+"' | sort | uniq -c | sort -rn
    182 "steam"
      6 "chrome"
      4 "steamwebhelper"
      2 "Telegram"
      1 "xrestop"
      1 "xdg-desktop-por"
      1 "ibus-x11"
      1 "gsd-xsettings"
      1 "gnome-shell"
❯ 
❯ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix
done | grep -Eo '".+"' | sort | uniq -c | sort -rn
    238 "steam"
      6 "chrome"
      4 "steamwebhelper"
      2 "Telegram"
      1 "xrestop"
      1 "xdg-desktop-por"
      1 "ibus-x11"
      1 "gsd-xsettings"
      1 "gnome-shell"
❯ 
❯ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix
done | grep -Eo '".+"' | sort | uniq -c | sort -rn
    238 "steam"
      6 "chrome"
      4 "steamwebhelper"
      2 "Telegram"
      1 "xrestop"
      1 "xdg-desktop-por"
      1 "ibus-x11"
      1 "gsd-xsettings"
      1 "gnome-shell"
MartiUK commented 1 year ago

Yeah, I noticed the same after the latest beta update, you can monitor the number of clients being opened by steam with xrestop. Steam and "web chat container" opens loads of clients which, when it hits the 256 limit, you see the "Maximum number of clients reached" error. This actually prevents you from opening ANY new application on X11/Wayland when using KDE plasma.

Removing myself from the steam beta update resolved the issue for me.

DanielHouston commented 1 year ago

Evident when watching vis ss as per https://unix.stackexchange.com/a/700637

little512 commented 1 year ago

Having the same issue, I also noticed the continually rising number of clients in xrestop. Opting out of beta does fix the issue.

nyaalex commented 1 year ago

Same issue X11/Xorg Arch linux. Also found that a new client is created every time I activate a window, including non-steam windows. It crashes in a few seconds if I hold alt tab between two windows, for instance

meklu commented 1 year ago

Can confirm, had this happen on my Gentoo box. Opting out of the beta was a decent workaround for now.

notpentadactyl commented 1 year ago

can confirm on Arch as well (latest steam client beta). closing steam fixes the issue instantly.

Tourfaint commented 1 year ago

Same thing happens on ubuntu. have to opt out of beta to use steam now.

Rosentti commented 1 year ago

Happens on Arch. KDE+Intel iGPU+Wayland

DarkWav commented 1 year ago

Can confirm on openSUSE Tumbleweed KDE + NVIDIA + X11.

Leopard1907 commented 1 year ago

@kisak-valve That update affects every distro fwiw, not just Arch.

purplebar0 commented 1 year ago

I can confirm that this happens on my updated Arch Linux installation on today's Steam Client Beta update. Reverting fixed the issue, steam only makes 8 connections to X now as it should, rather than 100+.

Protip: Don't even try to raise the limit with (Xorg) -maxclients 2048 for testing this, the same issue occurred, but it ended with freezing my entire window manager instead of just not letting me spawn more windows.

Unaccounted4 commented 1 year ago

Can confirm, same behaviour on Nobara. It's exacerbated if you launch a game with SteamTinkerLaunch or gamescope, as well.

Trezamere commented 1 year ago

Happening on Fedora 37 as well.

3vi1 commented 1 year ago

Can confirm:

(base) 10:41:44 evil@H510 ~» sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix 
done | grep -Eo '".+"' | sort | uniq -c | sort -rn

    184 "steam"
      7 "signal-desktop-"
      5 "steamwebhelper"
      3 "xdg-desktop-por"
      3 "kglobalaccel5"
      3 "kded5"

Ubuntu 23.04 Lunar Lobster alpha.

sylware commented 1 year ago

Same issue here, xserver(xorg)/mesa(radeon/radv)/linux-amd-dev, all git from last sunday.

dCosminn commented 1 year ago

Same issue Ubuntu 22.04, Wayland, Mesa 22.3.3

AmmarkoV commented 1 year ago

Same issue with Steam Beta and

LxQT Ubuntu 22.04.1 LTS Linux 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

sudo X -version

X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
Current Operating System: Linux elina-kriti 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-57-generic root=UUID=fa5dc9d9-1ee5-47de-a1a8-4ab195a79b02 ro quiet splash noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off vt.handoff=7
xorg-server 2:21.1.3-2ubuntu2.5 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
3plus4i commented 1 year ago

yep a recent update effectively rendered Steam unusable with Linux, or more specifically, X11

https://steamcommunity.com/groups/SteamClientBeta/discussions/0/5946473955225892135/

TTimo commented 1 year ago

thanks, we're looking into it

KianGreenMoon commented 1 year ago

Gentoo, i3wm, NVIDIA, Steam beta - same issue. That just overflow the connection amount to X-org.

mathew2214 commented 1 year ago

i am also having this issue. how could valve not forsee this?

michaelBelsanti commented 1 year ago

It's a beta, things happen. Don't use it if you want stability.

FamiliarBreakfast commented 1 year ago

Relavant lsof -U snippet: https://gist.github.com/FamiliarBreakfast/c3f78511e86fd9351c9b7815f17a49b2 Taken ~15 minutes after starting steam

sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix
done | grep -Eo '".+"' | sort | uniq -c | sort -rn
    153 "steam"
    4 "steamwebhelper"
    2 "ksmserver"
    2 "ILSpy"
    1 "xsettingsd"
    1 "xembedsniproxy"
    1 "pipewire"
    1 "kded5"
    1 "kaccess"
    1 "gmenudbusmenupr"

Running using Xwayland xorg-x11-server-Xwayland 22.1.3-2.fc37 Xorg 12201003

ghost commented 1 year ago

Same issue on Nobara (Fedora-Based)

dev-rfc commented 1 year ago

Can confirm, same here! Arch + amdgpu (RX 6600) + Wayland + Kwin/KDE

HurricanePootis commented 1 year ago

Happens to me too on Arch Linux, KDE Wayland, RX 580.

Edit: I thought I was going insane. Literally tried it with XFCE, and I eventually got it down to a point where this bug would only happen with TF2 and Source SDK. I was able to launch and quit HL2 and Yakuza 0, and not run out of any room for xclients.

hxdeci commented 1 year ago

Can reproduce. Debian testing/bullseye, amdgpu (also RX 6600), Cinnamon X11.

I also thought i was going insane- apps just stopped opening. Had to use Discord's built-in text viewer to see the .xsession-errors log lol

TTimo commented 1 year ago

Fix has shipped.

caitisgreat commented 1 year ago

Can reproduce. Debian testing/bullseye, amdgpu (also RX 6600), Cinnamon X11.

I also thought i was going insane- apps just stopped opening. Had to use Discord's built-in text viewer to see the .xsession-errors log lol

Funny thing is Cinnamon updated today too and I spent a good portion of the afternoon messing around with Timeshift to see if Cinnamon broke.

Anyway, I’m also reporting in with this exact problem on Linux Mint 21 X11.

Lightsockie commented 1 year ago

Been killing the terminal running steam and bringing it back up in a new one all day, just to see it update which made me jump here to check and low and behold the update was for this! (Have "Steam package versions: 1673573268")

Stable so far, though usually takes a few minutes to roughly an hour to kick in for me. I'll update this if it happens again, but here's at least one timer counting on if things're fixed. Using Artix Linux with a 7900 XT,

OpenGL renderer string: AMD Radeon Graphics (gfx1100, LLVM 16.0.0, DRM 3.49, 6.2.0-rc2-273-tkg-cfs)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.0.0-devel (git-c412b21d85)
Tourfaint commented 1 year ago

Downloaded the update, left steam running for like 10 minutes, and the amount of clients seem reasonable (8) and is not growing. Seems fixed. Thanks TTimo.

isivisi commented 1 year ago

Got the update, it only took about 10 - 20 minutes for my computer to be unusable before, been running for an hour so far with no issues :)

parkerlreed commented 1 year ago

Smooth sailing after the update here as well on the deck

caitisgreat commented 1 year ago

I’m now seeing a stable 8 X11 socket/session connections post patch. No change after 10 minutes observation.

lucifertdark commented 1 year ago

I've had it running for an hour so far no problems. Pretty sure this can be marked as fixed. :)

xpander69 commented 1 year ago

The issue is fixed now indeed. Thank you. Should i close it or?

mbriar commented 1 year ago

The Maximum number of clients reached issue is fixed for me too with the latest hotfix, however, the journal is still continuously spammed with

Xlib: sequence lost (0x10000 > 0x1cfb) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d06) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d15) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d20) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d8e) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1dae) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1e45) in reply type 0x21!

while steam is running. Not sure if that's related or deserves it's own bug report.

mferraci commented 1 year ago

Issue is fixed for me as well, but getting the same message in journal.

steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6040) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6054) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6067) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x607d) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6092) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60a4) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60b6) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60d3) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60e7) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60f1) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60f7) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60fb) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x60ff) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6106) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x610a) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x610e) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6112) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6116) in reply type 0xc!
steam.desktop[97106]: Xlib: sequence lost (0x10000 > 0x6133) in reply type 0xc!

Note that when steam is running in background, I don't get the messages.

Leopard1907 commented 1 year ago

The Maximum number of clients reached issue is fixed for me too with the latest hotfix, however, the journal is still continuously spammed with

Xlib: sequence lost (0x10000 > 0x1cfb) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d06) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d15) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d20) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1d8e) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1dae) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x1e45) in reply type 0x21!

while steam is running. Not sure if that's related or deserves it's own bug report.

https://github.com/ValveSoftware/csgo-osx-linux/issues/3105#issuecomment-1356876782

I think that is the result of that said upstream package getting broken and then being worked around in Arch, so not related to this issue.

TTimo commented 1 year ago

Please make a separate report for the xlib spam if needed. Closing this.

grinapo commented 1 year ago

I've got the same effect with the latest beta and wasn't able to even start a few games (namely skyrim). Had to revert to release version.

aaronw2 commented 1 year ago

The maximum number of clients can be increased from 256. I found this page quite helpful: https://unix.stackexchange.com/questions/498652/does-x-window-have-a-maximum-number-limit-on-clients. In my case, I added the following section under /etc/X11/xorg.conf.d/10-quirks.conf:

Section "ServerFlags" Option "MaxClients" "2048" EndSection

You might need to edit a different file there, or it can be added to /etc/X11/xorg.conf.

turol commented 1 year ago

The issue was that the handles were leaking indefinitely. Raising the limit just delays the problem and can lead to other resources running out first. And it's a moot point since it's been fixed and there's hopefully a unit test now.

aaronw2 commented 1 year ago

The issue was that the handles were leaking indefinitely. Raising the limit just delays the problem and can lead to other resources running out first. And it's a moot point since it's been fixed and there's hopefully a unit test now.

I just hit this the other day, so I don't think it's fixed.

kisak-valve commented 1 year ago

Hello @turol, @aaronw2, you're most likely looking for #9561 instead of this issue report.

Xlaits commented 3 months ago

Mentioning that this is still happening for me at least.

roge commented 3 months ago

Still happening for me as well. Xwayland refused to let any clients connect until I quit Steam.

Not absolutely sure this is related, but this happened after I got a bunch of notification spam from Steam once I woke my machine up from suspend (I guess Steam was just catching up with all the notifications it missed while the machine was asleep?). Using Ubuntu 24.04 with GNOME 46 on Wayland. I am not enrolled in any Steam client betas.

TTimo commented 3 months ago

Please make clean reports with full information. We don't follow up on closed issues, it's just too much noise.