protonscr

Client crash if /sys/class/net doesn't exist

steamclosed bugreviewedSteam client
ValveSoftware/steam-for-linux#4691 · opened 2016-11-04 by DeHackEd · updated 2016-11-04 · 4 comments · github
DDeHackEd 2016-11-04 github

Your system information

  • Steam client version: Built Oct 13 2016 @ 00:48:25, package versions 1476379980
  • Distribution (e.g. Ubuntu): Ubuntu 14.04 container (LXC) on 4.5 kernel
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes, crash appears caused by update to current version

Please describe your issue in as much detail as possible:

Client consistently crashes on startup if /sys is not mounted, or at a minimum /sys/class/net is not able to be opened.

Steps for reproducing this issue:

  1. Unmount or in some way deny access to /sys/class/net
  2. Launch steam
  3. After validating the package, it will promptly crash
strace -f ./steam.sh
[filtered output to show only affected thread]
7022  set_robust_list(0xeadffbb0, 12 
7022  <... set_robust_list resumed> )   = 0
7022  prctl(PR_SET_NAME, 0xeadff30c, 0, 0, 0 
7022  <... prctl resumed> )             = 0
7022  gettid( 
7022  <... gettid resumed> )            = 7022
7022  mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0 
7022  <... mmap2 resumed> )             = 0xffffffffeaaff000
7022  munmap(0xeaaff000, 4096 
7022  <... munmap resumed> )            = 0
7022  munmap(0xeac00000, 1044480 
7022  <... munmap resumed> )            = 0
7022  mprotect(0xeab00000, 135168, PROT_READ|PROT_WRITE 
7022  <... mprotect resumed> )          = 0
7022  futex(0xed9daa98, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0xed9daa94, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1} 
7022  <... futex resumed> )             = 1
7022  gettid( 
7022  <... gettid resumed> )            = 7022
7022  write(2, "Installing breakpad exception ha"..., 75 
7022  <... write resumed> )             = 75
7022  time( 
7022  <... time resumed> NULL)          = 1478219043
7022  futex(0xf74a1ba0, FUTEX_WAIT_PRIVATE, 2, NULL 
7022  <... futex resumed> )             = 0
7022  stat64("/etc/localtime",  
7022  <... stat64 resumed> {st_mode=S_IFREG|0644, st_size=3477, ...}) = 0
7022  futex(0xf74a1ba0, FUTEX_WAKE_PRIVATE, 1 
7022  <... futex resumed> )             = 0
7022  access("/var/lib/dbus/machine-id", F_OK 
7022  <... access resumed> )            = 0
7022  open("/var/lib/dbus/machine-id", O_RDONLY 
7022  <... open resumed> )              = 48
7022  fstat64(48,  
7022  <... fstat64 resumed> {st_mode=S_IFREG|0644, st_size=33, ...}) = 0
7022  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 
7022  <... mmap2 resumed> )             = 0xfffffffff495c000
7022  read(48,  
7022  <... read resumed> "bc8c443dc302c9498dcfc7455389f2c5"..., 512) = 33
7022  read(48,  
7022  <... read resumed> "", 512)       = 0
7022  close(48 
7022  <... close resumed> )             = 0
7022  munmap(0xf495c000, 4096 
7022  <... munmap resumed> )            = 0
7022  gettid( 
7022  <... gettid resumed> )            = 7022
7022  gettid( 
7022  <... gettid resumed> )            = 7022
7022  access("/sys/class/net", F_OK 
7022  <... access resumed> )            = -1 ENOENT (No such file or directory)
7022  access("/sys/class/net", F_OK 
7022  <... access resumed> )            = -1 ENOENT (No such file or directory)
7022  access("/sys", F_OK 
7022  <... access resumed> )            = 0
7022  access("/sys/class", F_OK 
7022  <... access resumed> )            = -1 ENOENT (No such file or directory)
7022  openat(AT_FDCWD, "/sys", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC 
7022  <... openat resumed> )            = 48
7022  mprotect(0xeab21000, 32768, PROT_READ|PROT_WRITE 
7022  <... mprotect resumed> )          = 0
7022  getdents64(48,  
7022  <... getdents64 resumed> /* 2 entries */, 32768) = 48
7022  getdents64(48,  
7022  <... getdents64 resumed> /* 0 entries */, 32768) = 0
7022  close(48 
7022  <... close resumed> )             = 0
7022  openat(AT_FDCWD, "/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC 
7022  <... openat resumed> )            = 48
7022  getdents64(48,  
7022  <... getdents64 resumed> /* 23 entries */, 32768) = 584
7022  getdents64(48,  
7022  <... getdents64 resumed> /* 0 entries */, 32768) = 0
7022  close(48 
7022  <... close resumed> )             = 0
7022  openat(AT_FDCWD, "/sys/class/net", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC 
7022  <... openat resumed> )            = -1 ENOENT (No such file or directory)
7022  --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4} ---

Workaround: any successful open of /sys/class/net, even if it is an empty directory, results in a successful start.

Ttycho 2016-11-04 github

Thank you for your report. We should have a fix out for this soon.

Ttycho 2016-11-04 github

Can you try opting into the beta client and see if the issue persists?

DDeHackEd 2016-11-04 github

That worked.

Received build 1478210409

PPlagman 2016-11-04 github

Thanks for confirming the fix!

Nothing extracted yet.