protonscr

Steam crashes when CD/DVD tray closed and on usb hotplug (udev?).

steamclosed reviewed
ValveSoftware/steam-for-linux#3846 · opened 2015-05-15 by toofar · updated 2018-07-22 · 2 comments · github
Ttoofar 2015-05-15 github

I can with 100% reliability crash steam by closing the CD drive. Also plugging
in my phone. Probably other things that trigger udev events too. I have a
hacky workaround that works for me so no big deal if no-one else can
reproduce. The output of sudo udevadm monitor -p -k -u when closing the
drive follows at the end of the post. Looking at the gdb backtrace (see below)
the last recognisable method is void SDL_JoystickUpdate() so I mocked that
and compiled it to a shared object and loaded it via LD_PRELOAD and problem
solved (I don't hotplug any joysticks).

Oh btw I am running a 32bit userspace on a 64bit kernel. Maybe that is
relevant because the backtrace ends in an sse instruction shrugs.

(gdb) bt
#0  __strcmp_sse4_2 () at ../sysdeps/i386/i686/multiarch/strcmp-sse4.S:229
#1  0xee44ca8a in udev_monitor_receive_device ()
from /lib/i386-linux-gnu/libudev.so.1
#2  0xf21d98a5 in ?? () from
$HOME/.steam/ubuntu12_32/libSDL2-2.0.so.0
#3  0xf21d60ef in ?? () from
$HOME/.steam/ubuntu12_32/libSDL2-2.0.so.0
#4  0xf215d1bd in ?? () from
$HOME/.steam/ubuntu12_32/libSDL2-2.0.so.0
#5  0xf2150e50 in SDL_JoystickUpdate ()
from $HOME/.steam/ubuntu12_32/libSDL2-2.0.so.0
#6  0xf3627f94 in ?? () from
$HOME/.steam/ubuntu12_32/steamui.so
#7  0xf3628430 in ?? () from
$HOME/.steam/ubuntu12_32/steamui.so
#8  0xf362b5ca in ?? () from
$HOME/.steam/ubuntu12_32/steamui.so
#9  0x56596ab0 in RunSteam(int, char**, bool) ()
[#10](/issue/ValveSoftware/steam-for-linux/10) 0x5657df5d in ?? ()
[#11](/issue/ValveSoftware/steam-for-linux/11) 0xf7b6aa63 in __libc_start_main (main=0x5657d1a0, argc=1, argv=0xffffd394, 
    init=0x56844ba0 <__libc_csu_init>, fini=0x56844c10
    <__libc_csu_fini>, rtld_fini=0xf7febc90 <_dl_fini>, stack_end=0xffffd38c) at libc-start.c:287
[#12](/issue/ValveSoftware/steam-for-linux/12) 0x56580ca5 in _start ()

And the udev output:

KERNEL[753966.556501] change   /devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sr0 (block)
ACTION=change
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sr0
DEVTYPE=disk
DISK_MEDIA_CHANGE=1
MAJOR=11
MINOR=0
SEQNUM=4363
SUBSYSTEM=block

UDEV  [753966.813687] change   /devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sr0 (block)
ACTION=change
DEVLINKS=/dev/cdrom /dev/cdrw /dev/disk/by-id/ata-ASUS_DRW-1814BLT /dev/dvd /dev/dvdrw
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sr0
DEVTYPE=disk
DISK_MEDIA_CHANGE=1
ID_ATA=1
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_BUS=ata
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD_R=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_STATE=complete
ID_CDROM_MEDIA_TRACK_COUNT=22
ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=22
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_MODEL=ASUS_DRW-1814BLT
ID_MODEL_ENC=ASUS\x20\x20\x20\x20DRW-1814BLT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=1.13
ID_SERIAL=ASUS_DRW-...
ID_TYPE=cd
MAJOR=11
MINOR=0
SEQNUM=4363
SUBSYSTEM=block
TAGS=:udev-acl:
USEC_INITIALIZED=158
TTele42 2015-05-15 github

This should have more to do with libudev.so.0 and libudev.so.1 interacting with each other.

Ttoofar 2018-07-22 github

Hasn't been an issue for me for years.

Launch options