After having the steam client open for a day, closing it causes immense lag
inxi -F here: https://imgur.com/iH3XH3H
- Steam client version : Dec 12 2017, at 21:27:51
- Distribution: Xubuntu 17.10
- Opted into Steam client beta?: Yes
- Have you checked for system updates?: Yes
- Issue on on video here: https://webmshare.com/NRwGX
This started happening about 3 weeks ago, I only recently got up to record the issue. After playing Dota for the whole day, stopping and shutting down steam causes it to gobble all of the UI responsiveness. What you can't see on that video is that hardware mouse still works and I can easily move it around. The UI just doesn't respond immediately. I don't know if it's because I have Discord on the whole time and have streamlined microphone on in Dota.
Yesterday I did strace one of the steam processes and it gave me wait4(-1, before I had to forcefully shut down the system as I couldn't get control back. Do note that steam climbs to 1,7GiB before agreeing to shut itself. (shown in video)
I am willing to provide any extra information you need to tackle this problem. Probably going to have to wait a day again so I can get steam clogged enough again.
I get the same issue on Arch, running the steam-native bin. On exit, the Xorg process shoots up to 100% utilization, and the last few lines in steam's console window are:
Refresh rate: 1 Refresh rate: 0 Refresh rate: 0 <repeated a bunch> Refresh rate: 60 Refresh rate: 60 <repeated a bunch> Refresh rate: 0 Refresh rate: 0 <repeated a bunch> Refresh rate: 60 Refresh rate: 60 <repeated a bunch> Refresh rate: 1 Refresh rate: 1 Refresh rate: 1
And steam just hangs.
Same issue on Linux Mint 18.3 (Ubuntu 16.04 LTS).
Same problem on Debian 9, but not sure what causes this issue. It does not always happen.
What do you people usually do before this happens? Any specific activity?
What do you people usually do before this happens? Any specific activity?
Nothing that stands out. Sometimes I've played a few games here and there and there, but I'm not certain that I always have when experiencing this. I've definitely used Steam's chat functionality, and likely have downloaded updates and/or switched to beta branches (have tried jumping around branches, but that doesn't seem to trigger a problem in the short term at least).
The trouble with something that seems to manifest over such a long period of time is that I'm also using my computer for normal work while Steam is open - narrowing down a specific action or application that might be playing a role is hard.
The only thing I do within Steam before the problem occurs is playing Dota 2.
Yep, same here on Solus. It seems inconsistent. Sometimes occurs even if there are hours between the last game session and attempting to close Steam.
I'm not able to reproduce this on my end after letting Steam run for a long time and running/downloading games so far. For someone that is able to reproduce this pretty often, would it be possible to trigger the situation where Steam is unresponsive/busy during shutdown, and kill it with SIGBUS while it's in the middle of doing that? That would generate a .dmp file that would let us see what it's doing if attached here.
Haven't seen this happen for a few days that I've now autostarted steam. I'm guessing some patch to some program around 20 days ago fixed it.
It still happens for me. Seems like the longer Steam has been open, the longer it lags on exit. I had it open for ~30 hours and tried to get the dump, but the freeze only lasted ~30 seconds. I'll try again after leaving it open for a few days.
It puts a massive load on Xorg which uses 100% CPU until Steam exits. True, it's incosistent. For me it usually happens after playing Natural Selection 2 for several hours in the evening. I opened htop in terminal and looked at the processes, the terminal doesn't freeze and I could see that Xorg consumes an enormous amount of CPU time. Still, nothing interesting in the system or Xorg's logs. A random guess would be that Steam allocates a lot of X resources like bitmaps and it takes time to free them on exit.
What does xrestop report for you after Steam has been running for a long time?
OK, I ran xrestop before attempting to exit steam:
res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier
3200000 50 1 1 1 141 0B 5K 5K ? Friends
3400000 7 26 0 1 14 4B 1K 1K 22036 Steam
Nothing seemed out of the ordinary there. Then I exited steam from the UI, confirmed I was in the frozen state, and sent SIGBUS. Steam outputted the following:
...
Refresh rate: 60
Refresh rate: 60
Refresh rate: 60
Refresh rate: 60
crash_20180124210626_1.dmp[18978]: Uploading dump (out-of-process)
/tmp/dumps/crash_20180124210626_1.dmp
crash_20180124210626_1.dmp[18978]: Finished uploading minidump (out-of-process): success = yes
crash_20180124210626_1.dmp[18978]: response: CrashID=bp-991ab573-0bb4-4c9f-8e53-6b7152180125
crash_20180124210626_1.dmp[18978]: file ''/tmp/dumps/crash_20180124210626_1.dmp'', upload yes: ''CrashID=bp-991ab573-0bb4-4c9f-8e53-6b7152180125''
/home/sean/.local/share/Steam/steam.sh: line 927: 22036 Bus error (core dumped) $STEAM_DEBUGGER "$STEAMROOT/$STEAMEXEPATH" "$@"
The gdb backtrace of the dump looked like this:
(gdb) bt
#0 0xf7f2bdb9 in __kernel_vsyscall ()
#1 0xf7a05493 in poll () from /usr/lib32/libc.so.6
#2 0xf78fad23 in ?? () from /usr/lib32/libxcb.so.1
#3 0xf78fb35c in ?? () from /usr/lib32/libxcb.so.1
#4 0xf78f8989 in ?? () from /usr/lib32/libxcb.so.1
#5 0xf78fa69d in ?? () from /usr/lib32/libxcb.so.1
#6 0xf78fa864 in xcb_wait_for_reply64 () from /usr/lib32/libxcb.so.1
#7 0xf7d92d19 in _XReply () from /usr/lib32/libX11.so.6
#8 0xf7d8e46f in XSync () from /usr/lib32/libX11.so.6
#9 0xf7d6f515 in XCloseDisplay () from /usr/lib32/libX11.so.6
#10 0xf198dfc1 in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/libSDL2-2.0.so.0
#11 0xf1956cfa in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/libSDL2-2.0.so.0
#12 0xf18c579f in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/libSDL2-2.0.so.0
#13 0xf18d7cf9 in SDL_QuitSubSystem () from /home/sean/.local/share/Steam/ubuntu12_32/libSDL2-2.0.so.0
#14 0xf2b43c87 in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/steamui.so
#15 0xf2b4409c in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/steamui.so
#16 0xf2b27355 in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/steamui.so
#17 0xf305a270 in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/steamui.so
#18 0xefc02cad in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/vgui2_s.so
#19 0xf2fb3f9a in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/steamui.so
#20 0xf2fbaa88 in ?? () from /home/sean/.local/share/Steam/ubuntu12_32/steamui.so
#21 0x56598bd0 in RunSteam(int, char**, bool) ()
#22 0x56599b0b in ?? ()
#23 0x56584dec in ?? ()
#24 0xf7931793 in __libc_start_main () from /usr/lib32/libc.so.6
#25 0x56588681 in _start ()
And I can upload the actual dump file if needed. Thanks for taking a look at this, @Plagman
Also:
[sean@coach ~]$ /usr/lib/xorg-server/Xorg -version
X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.9.71-1-lts x86_64
Current Operating System: Linux coach 4.14.13-1-ARCH #1 SMP PREEMPT Wed Jan 10 11:14:50 UTC 2018 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=386f5eab-ae6f-48fd-8b27-1aaa50edc521 rw quiet
Build Date: 25 December 2017 02:02:38PM
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[sean@coach ~]$ pacman -Qi nvidia | grep Version
Version : 387.34-19
xrestop output (removed unrelated processes):
res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier
1200000 15 3 1 8 66 18814K 2K 18817K 21101 Terminal
0800000 11 2 1 2 1011 18167K 25K 18192K 1520 awesome
3200000 50 2 1 1 76 0B 4K 4K ? Steam
3800000 4 25 0 1 12 4B 984B 988B 740 Steam
There was a lag at Steam exit but not as significant as usual (I played just a bit today), killall -BUS steam couldn't find the process, should've used pkill. Will try SIGBUS tomorrow then.
The process name is "Steam" (capital S). You can also just use the PID that xrestop lists (740 in your example) like:
kill -SIGBUS 740
Thanks for the backtrace, that's helpful. Getting more samples would be great, as it could be performing multiple operations during shutdown.
I tried both "steam" and "Steam", killall couldn't find the process, probably because it has a full path in its name and I've installed Steam to /opt. pkill worked fine on a newly started Steam so I'll try it later today.
I've done it two more times on my machine, the backtrace has been identical each time. I've been opted in to the Steam client beta this whole time if that makes any difference.
Here's a crashdump of Steam freezing Xorg/Awesome WM.
For reference, the attached minidump is a SIGBUS in linux-gate.so in a steamui.so thread.