protonscr

Steam doesn't work properly with firewalled loopback

steamopen Steam client
ValveSoftware/steam-for-linux#5082 · opened 2017-07-15 by tpruzina · updated 2019-07-18 · 2 comments · github
Ttpruzina 2017-07-15 github

With (mis?)configured firewall, steam ceases to work properly (presents as UI lag and games not starting up).

Fairly popular "simple stateful firewall" will break steam:

:INPUT DROP
:OUTPUT ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

Unless loopback device is allowed:

-A INPUT -i lo -j ACCEPT

steam output

wireshark

Not sure this classifies as a bug, but it's fairly hard to debug (processes stuck waiting on file descriptors) and prevents steam from functioning properly. I suppose steam could do IPC over something other than loopback.

Aardje 2017-07-18 github

To be honest, I would classify blocking lo a bug.
But it is a good to know that blocking lo causes this behaviour on the
steam client.
I wonder if removing 127.0.0.1 and just leaving ::1 on lo would make it
switcht to using ipv6.

Hh1z1 2017-07-18 github

From a security standpoint blocking lo isn't a bad thing but quite advanced. Maybe related but I'm more confused with what this process is doing? Steam isn't even opened yet it's spinning, constantly reconnecting to the X server??

$ strace  -p 11931 -c -T & sleep 10 ; kill $!
Process 11931 attached
[ Process PID=11931 runs in 32 bit mode. ]

Process 11931 detached
System call usage summary for 32 bit mode:
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 63.40    0.033463          57       587           poll
 21.29    0.011236           1      8037           clock_gettime
  5.62    0.002966          13       225        27 futex
  1.77    0.000935           5       196           nanosleep
  1.75    0.000921           1      1791           gettid
  1.60    0.000845           1       608           time
  1.26    0.000663           1       588       588 recvmsg
  1.04    0.000549           4       149           write
  0.62    0.000325           2       196       196 semop
  0.51    0.000271           1       196           read
  0.42    0.000224           1       196           waitpid
  0.28    0.000147           1       103           select
  0.22    0.000118         118         1           restart_syscall
  0.18    0.000095           1        98           kill
  0.04    0.000020           1        26           tgkill
------ ----------- ----------- --------- --------- ----------------
100.00    0.052778                 12997       811 total
$

Is this a joke??

$ ps -u -p `pidof steam`
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
steam     11931  1.4  0.9 350236 152204 pts/101 Sl+  Jul17  50:44 /home/steam/.local/share/Steam/ubuntu12_32/steam
steam     11934  0.0  0.2 135204 37008 pts/101  S+   Jul17   0:00 /home/steam/.local/share/Steam/ubuntu12_32/steam

At over 50 CPU minutes in a little over a day, it literally is the 3rd biggest CPU pig on that box behind X itself and Firefox. Valve??

Nothing extracted yet.