protonscr

Steam process goes into an infinite loop (100% CPU usage)

steamclosed Steam clientDistro Family: Ubuntu
ValveSoftware/steam-for-linux#6769 · opened 2019-12-15 by Emanem · updated 2019-12-21 · 7 comments · github
EEmanem 2019-12-15 github

System Info

  • Steam client version (build number or date): Dec 12 2019, at 22:37:09
  • Distribution (e.g. Ubuntu): Ubuntu 64 bit 18.04.3 (with HWE, kernel 5.0.0-37-generic)
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

After 1 minute running, the steam client uses 100% CPU until closing it down.
I can clearly see from htop that the CPU time is 60% user and 40% system.

That's why I've attached a strace of the steam process.

Please find also a strace at startup, when the CPU is only used around 10% or less.
At the end of this trace the infinite loop starts.

Looking at the traces, seems like when it goes into an infinite loop there are calls to futex and other OS APIs which are not present in the sane strace:

recvmsg(27, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(27, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(27, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=27, events=POLLIN}, {fd=28, events=POLLIN}], 2, 0) = 0 (Timeout)
read(5, "", 1023)                       = 0
semop(524288, [{0, -1, IPC_NOWAIT}], 1) = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({tv_sec=0, tv_nsec=0}, NULL)  = 0
waitpid(-1, NULL, WNOHANG)              = 0
write(41, "\1\0\0\0\0\0\0\0", 8)        = 8
futex(0x58c1e6b0, FUTEX_WAIT_PRIVATE, 0, {tv_sec=89, tv_nsec=999999821}) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x58c1e66c, FUTEX_WAKE_PRIVATE, 1) = 0
write(41, "\1\0\0\0\0\0\0\0", 8)        = 8
futex(0x58c1e6ac, FUTEX_WAIT_PRIVATE, 0, {tv_sec=89, tv_nsec=999999923}) = 0
futex(0x58c1e66c, FUTEX_WAKE_PRIVATE, 1) = 0
waitpid(-1, NULL, WNOHANG)              = 0
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=2944, tv_nsec=154365720}) = 0
recvmsg(34, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=34, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
poll([{fd=114, events=POLLIN}], 1, 0)   = 0 (Timeout)
poll([{fd=22, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)

Steps for reproducing this issue:

  1. Execute Steam
  2. Go to any page of any game of your library, or wait 1 minute in your main Steam page
  3. Wait ~30 seconds (happens with both IPv6 enabled or disabled)
EEmanem 2019-12-15 github

Seems to be definitely related. @TTimo , traces in the bug report may help you?

EEmanem 2019-12-15 github

I can confirm that

mv ~/.steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-system-info ~/.steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-system-info.backup

is a workaround for this issue too.

TTTimo 2019-12-15 github

@Emanem: steam-runtime-system-info is executed at startup and should exit after 10 to 30 seconds typically.

Can you check if that process hangs on your system? If it's still there after a minute or two, see this comment and provide a trace?

If srt-info isn't well behaved and hangs, that shouldn't be causing particular problems for the Steam client, so I'll look at that anyway. Thanks for the traces.

TTTimo 2019-12-19 github

Is this still happening in latest beta client? (>= 2019-12-19 version)

More specifically, is this happening at startup, without going to Help > System Information to trigger steam-runtime-system-info process.

Unless you can reproduce in those conditions, this is likely a duplicate of https://github.com/ValveSoftware/steam-for-linux/issues/5493

EEmanem 2019-12-19 github

@TTimo @kisak-valve Will test as soon as I can, I would tend to agree with you that most likely is a duplicate of #5493

EEmanem 2019-12-21 github

The new steam client build (>= 19-12-2019) seems to have fixed it. Closing this issue.