xserver 1.20.10 still crashes in xf86PlatformDeviceCheckBusID() with a USB2 DisplayLink adapter
This crash is related to #1068 and #1088, however the fix !508 (merged) applied in version 1.20.10 doesn't work. I create another issue, because it doesn't segfault at the same line.
In xf86PlatformDeviceCheckBusID()
, the PCI device pointer device->pdev
is dereferenced, when being equal to NULL.
This is probably also related to #984 (closed).
Backtrace
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
set = {__val = {171516928, 0, 0, 0, 0, 0, 139965669543552, 0, 94128026455408, 67108868, 139965676567088, 0, 0, 0, 0, 0}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007f4c4c52f864 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x22, sa_sigaction = 0x22}, sa_mask = {__val = {94128026440327, 171515904, 7027446620089064704, 24, 18446744073709550976, 9, 0, 24, 1, 2, 139965675166104, 24, 139965675123341,
139965669543552, 139964394242048, 94128047788752}}, sa_flags = -865231616, sa_restorer = 0x7ffc1563f730}
sigs = {__val = {32, 0, 2, 9223372036854775822, 0, 0, 0, 0, 0, 0, 0, 140720375595012, 139965676567088, 7027446620089064704, 0, 32}}
#2 0x0000559be394538c in OsAbort () at ../../os/utils.c:1351
No locals.
#3 0x0000559be3946130 in AbortServer () at ../../os/log.c:879
No locals.
#4 FatalError (f=f@entry=0x559be3984ff0 "Caught signal %d (%s). Server aborting\n") at ../../os/log.c:1017
args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7ffc1563f5e0, reg_save_area = 0x7ffc1563f510}}
args2 = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0x7ffc1563f5e0, reg_save_area = 0x7ffc1563f510}}
beenhere = 1
#5 0x0000559be3948df9 in OsSigHandler (unused=<optimized out>, sip=0x7ffc1563f730, signo=11) at ../../os/osinit.c:156
No locals.
#6 OsSigHandler (signo=11, sip=0x7ffc1563f730, unused=<optimized out>) at ../../os/osinit.c:110
No locals.
#7 <signal handler called>
No locals.
#8 0x0000559be3842bdb in xf86PlatformDeviceCheckBusID (device=0x559be4e074e8, busid=0x559be4df4af0 "pci:0a:00:00") at os-support/linux/lnx_platform.c:107
pPci = 0x0
syspath = 0x559be4e07420 "/sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:04.0/0000:08:00.0/0000:09:01.0/0000:0a:00.0/usb3/3-1/3-1.1/3-1.1:1.0/drm/card1"
bustype = <optimized out>
id = 0x559be4df4af4 "0a:00:00"
#9 0x0000559be3819c8f in xf86platformProbeDev (drvp=0x559be4e10da0) at common/xf86platformBus.c:544
devList = 0x559be4e10e00
i = 1
foundScreen = 1
numDevs = <optimized out>
j = 1
foundScreen = <optimized out>
devList = <optimized out>
numDevs = <optimized out>
i = <optimized out>
j = <optimized out>
#10 xf86CallDriverProbe (drv=0x559be4e10da0, detect_only=0) at common/xf86Bus.c:83
foundScreen = 0
__PRETTY_FUNCTION__ = "xf86CallDriverProbe"
#11 0x0000559be381ae96 in xf86BusConfig () at common/xf86Bus.c:128
layout = <optimized out>
i = <optimized out>
j = <optimized out>
#12 0x0000559be38231f2 in InitOutput (pScreenInfo=0x559be39ee180 <screenInfo>, argc=15, argv=0x7ffc15640128) at common/xf86Init.c:715
i = <optimized out>
j = <optimized out>
k = <optimized out>
scr_index = <optimized out>
modulelist = <optimized out>
optionlist = <optimized out>
autoconfig = <optimized out>
sigio_blocked = 0
want_hw_access = <optimized out>
configured_device = <optimized out>
#13 0x0000559be37c74f5 in dix_main (envp=<optimized out>, argv=<optimized out>, argc=<optimized out>) at ../../dix/main.c:195
i = <optimized out>
alwaysCheckForInput = {0, 1}
i = <optimized out>
alwaysCheckForInput = {<optimized out>, <optimized out>}
pScreen = <optimized out>
pScreen = <optimized out>
remember_it = <optimized out>
pScreen = <optimized out>
#14 main (argc=15, argv=0x7ffc15640128, envp=<optimized out>) at ../../dix/stubmain.c:34
xorg.conf
Section "Device"
Identifier "IntelDevice"
Driver "modesetting"
# Driver "intel"
BusID "pci:00:02:00"
Option "Monitor-eDP-1" "LaptopMonitor"
Option "Monitor-DP-1-2" "TopLeftMonitor"
Option "Monitor-DP-2-1" "BottomLeftMonitor"
Option "Monitor-DP-2-2" "BottomRightMonitor"
EndSection
Section "Device"
Identifier "DisplayLinkDevice"
Driver "modesetting"
BusID "pci:0a:00:00"
# BusID "pci:0a:00:00-usb-0:1.1:1.0"
Option "kmsdev" "/dev/dri/card1"
Option "PageFlip" "false"
Option "Monitor-DVI-I-1-1" "TopRightMonitor"
EndSection
Section "Monitor"
Identifier "LaptopMonitor"
EndSection
Section "Monitor"
Identifier "TopLeftMonitor"
EndSection
Section "Monitor"
Identifier "TopRightMonitor"
EndSection
Section "Monitor"
Identifier "BottomLeftMonitor"
EndSection
Section "Monitor"
Identifier "BottomRightMonitor"
EndSection
Section "Screen"
Identifier "LaptopScreen"
Device "IntelDevice"
Monitor "LaptopMonitor"
EndSection
Section "Screen"
Identifier "TopLeftScreen"
Device "IntelDevice"
Monitor "TopLeftMonitor"
EndSection
Section "Screen"
Identifier "TopRightScreen"
Device "DisplayLinkDevice"
Monitor "TopRightMonitor"
DefaultDepth 24
Subsection "Display"
Depth 24
EndSubsection
EndSection
Section "Screen"
Identifier "BottomLeftScreen"
Device "IntelDevice"
Monitor "BottomLeftMonitor"
EndSection
Section "Screen"
Identifier "BottomRightScreen"
Device "IntelDevice"
Monitor "BottomRightMonitor"
EndSection
Section "ServerLayout"
Identifier "MultiHeadServerLayout"
Screen 0 "TopLeftScreen" Absolute 0 0
Screen 1 "TopRightScreen" RightOf "TopLeftScreen"
Screen 2 "BottomLeftScreen" Below "TopLeftScreen"
Screen 3 "BottomRightScreen" RightOf "BottomLeftScreen"
Option "AutoAddGPU" "false"
EndSection
udevadm info /dev/dri/card0 (integrated Intel Graphics)
P: /devices/pci0000:00/0000:00:02.0/drm/card0
N: dri/card0
L: 0
S: dri/by-path/pci-0000:00:02.0-card
E: DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
E: DEVNAME=/dev/dri/card0
E: DEVTYPE=drm_minor
E: MAJOR=226
E: MINOR=0
E: SUBSYSTEM=drm
E: USEC_INITIALIZED=27695455
E: ID_PATH=pci-0000:00:02.0
E: ID_PATH_TAG=pci-0000_00_02_0
E: ID_FOR_SEAT=drm-pci-0000_00_02_0
E: DEVLINKS=/dev/dri/by-path/pci-0000:00:02.0-card
E: TAGS=:master-of-seat:seat:uaccess:
udevadm info /dev/dri/card1 (USB DL-165 DisplayLink)
P: /devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:04.0/0000:08:00.0/0000:09:01.0/0000:0a:00.0/usb3/3-1/3-1.1/3-1.1:1.0/drm/card1
N: dri/card1
L: 0
S: dri/by-path/pci-0000:0a:00.0-usb-0:1.1:1.0-card
E: DEVPATH=/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:06:04.0/0000:08:00.0/0000:09:01.0/0000:0a:00.0/usb3/3-1/3-1.1/3-1.1:1.0/drm/card1
E: DEVNAME=/dev/dri/card1
E: DEVTYPE=drm_minor
E: MAJOR=226
E: MINOR=1
E: SUBSYSTEM=drm
E: USEC_INITIALIZED=29681708
E: ID_PATH=pci-0000:0a:00.0-usb-0:1.1:1.0
E: ID_PATH_TAG=pci-0000_0a_00_0-usb-0_1_1_1_0
E: ID_FOR_SEAT=drm-pci-0000_0a_00_0-usb-0_1_1_1_0
E: DEVLINKS=/dev/dri/by-path/pci-0000:0a:00.0-usb-0:1.1:1.0-card
E: TAGS=:uaccess:seat:master-of-seat: