SIGABRT on uevent from i915 about gvt-g vGPU
Short summary: i915 module fires a display ready uevent for a GVT-g vGPU during boot of a VM that has it attached. That causes X server to first remove and then to re-attach the host's DRM device for Intel Graphics (not vGPU), and that causes server to crash. If I suspend uevent processing by udevadm control -s
, X server doesn't crash.
To reproduce the issue, dGPU should be enabled as the OpenGL renderer (on my laptop it's achieved with prime-select nvidia
). Otherwise X server fails to remove the device and thus doesn't re-add it and doesn't crash. But it still tries!
uevents in question:
KERNEL[140.631014] add /devices/pci0000:00/0000:00:02.0/drm/card0 (drm)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
SUBSYSTEM=drm
GVT_DISPLAY_READY=0
VMID=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=5760
MAJOR=226
MINOR=0
KERNEL[140.631014] add /devices/pci0000:00/0000:00:02.0/drm/card0 (drm)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
SUBSYSTEM=drm
GVT_DISPLAY_READY=0
VMID=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=5760
MAJOR=226
MINOR=0
Link to kernel code that sends them: i915/gvt/handlers.c.
Xorg.0.log when server crashes (with dGPU enabled):
[ 87.492] (II) config/udev: removing GPU device /sys/devices/pci0000:00/0000:00:02.0/drm/card0 /dev/dri/card0
[ 87.492] xf86: remove device 1 /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[ 87.524] (II) UnloadModule: "modesetting"
[ 87.524] (II) UnloadSubModule: "glamoregl"
[ 87.524] (II) Unloading glamoregl
[ 87.524] (II) config/udev: Adding drm device (/dev/dri/card0)
[ 87.524] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 87.524] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[ 87.524] (II) LoadModule: "modesetting"
[ 87.524] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 87.524] (II) Module modesetting: vendor="X.Org Foundation"
[ 87.524] compiled for 1.21.1.3, module version = 1.21.1
[ 87.524] Module class: X.Org Video Driver
[ 87.524] ABI class: X.Org Video Driver, version 25.2
[ 87.524] (II) UnloadModule: "modesetting"
[ 87.524] (II) Unloading modesetting
[ 87.524] (II) Failed to load module "modesetting" (already loaded, 0)
[ 87.524] (II) modeset(G0): using drv /dev/dri/card0
[ 87.524] (==) modeset(G0): Depth 24, (==) framebuffer bpp 32
[ 87.524] (==) modeset(G0): RGB weight 888
[ 87.524] (==) modeset(G0): Default visual is TrueColor
[ 87.524] (II) Loading sub module "glamoregl"
[ 87.524] (II) LoadModule: "glamoregl"
[ 87.524] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[ 87.528] (II) Module glamoregl: vendor="X.Org Foundation"
[ 87.528] compiled for 1.21.1.3, module version = 1.0.1
[ 87.528] ABI class: X.Org ANSI C Emulation, version 0.4
[ 87.538] (II) modeset(G0): glamor X acceleration enabled on Mesa Intel(R) UHD Graphics 630 (CFL GT2)
[ 87.538] (II) modeset(G0): glamor initialized
[ 87.540] (II) modeset(G0): Output eDP-1-1 has no monitor section
[ 87.604] (II) modeset(G0): Output DP-1-1 has no monitor section
[ 87.604] (II) modeset(G0): Output DP-1-2 has no monitor section
[ 87.608] (II) modeset(G0): Output DP-1-3 has no monitor section
[ 87.677] (==) modeset(G0): Using gamma correction (1.0, 1.0, 1.0)
[ 87.677] (==) modeset(G0): DPI set to (96, 96)
[ 87.677] (II) Loading sub module "fb"
[ 87.677] (II) LoadModule: "fb"
[ 87.677] (II) Module "fb" already built-in
[ 87.678] (EE)
[ 87.678] (EE) Backtrace:
[ 87.678] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x139) [0x55e15b5526e9]
[ 87.679] (EE) 1: /lib/x86_64-linux-gnu/libc.so.6 (__sigaction+0x50) [0x7f865431a520]
[ 87.679] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (pthread_kill+0x12c) [0x7f865436ea7c]
[ 87.680] (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (raise+0x16) [0x7f865431a476]
[ 87.680] (EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (abort+0xd3) [0x7f86543007f3]
[ 87.680] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 87.680] (EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f865430071b]
[ 87.681] (EE) 6: /lib/x86_64-linux-gnu/libc.so.6 (__assert_fail+0x46) [0x7f8654311e96]
[ 87.681] (EE) 7: /usr/lib/xorg/Xorg (dixRegisterPrivateKey+0x249) [0x55e15b3fccf9]
[ 87.681] (EE) 8: /usr/lib/xorg/modules/libglamoregl.so (glamor_init+0xcf) [0x7f8653aed6af]
[ 87.682] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 87.682] (EE) 9: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7f8653b5011a]
[ 87.682] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 87.682] (EE) 10: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7f8653b462de]
[ 87.682] (EE) 11: /usr/lib/xorg/Xorg (AddGPUScreen+0xf5) [0x55e15b3dc8a5]
[ 87.682] (EE) 12: /usr/lib/xorg/Xorg (xf86PlatformMatchDriver+0xaa6) [0x55e15b43a0d6]
[ 87.682] (EE) 13: /usr/lib/xorg/Xorg (xf86PlatformDeviceCheckBusID+0x245) [0x55e15b43fcf5]
[ 87.682] (EE) 14: /usr/lib/xorg/Xorg (config_fini+0xfec) [0x55e15b43c30c]
[ 87.682] (EE) 15: /usr/lib/xorg/Xorg (config_fini+0x1580) [0x55e15b43c8a0]
[ 87.683] (EE) 16: /usr/lib/xorg/Xorg (OsCleanup+0x571) [0x55e15b5530d1]
[ 87.683] (EE) 17: /usr/lib/xorg/Xorg (WaitForSomething+0x193) [0x55e15b54be23]
[ 87.683] (EE) 18: /usr/lib/xorg/Xorg (SendErrorToClient+0x117) [0x55e15b3dc257]
[ 87.683] (EE) 19: /usr/lib/xorg/Xorg (InitFonts+0x3c4) [0x55e15b3e0524]
[ 87.683] (EE) 20: /lib/x86_64-linux-gnu/libc.so.6 (__libc_init_first+0x90) [0x7f8654301d90]
[ 87.684] (EE) 21: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0x80) [0x7f8654301e40]
[ 87.684] (EE) 22: /usr/lib/xorg/Xorg (_start+0x25) [0x55e15b3c95f5]
[ 87.684] (EE)
[ 87.684] (EE)
Fatal server error:
[ 87.684] (EE) Caught signal 6 (Aborted). Server aborting
Xorg.0.log when it doesn't crash (with dGPU disabled, note that it still tries to remove card0):
[ 140.861] (II) config/udev: removing GPU device /sys/devices/pci0000:00/0000:00:02.0/drm/card0 /dev/dri/card0
[ 140.861] xf86: remove device 1 /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[ 140.861] failed to find screen to remove
[ 152.662] (II) modeset(0): EDID vendor "SHP", prod id 5274
[ 152.662] (II) modeset(0): Printing DDC gathered Modelines:
[ 152.662] (II) modeset(0): Modeline "1920x1080"x0.0 142.52 1920 1968 2000 2080 1080 1083 1088 1142 -hsync -vsync (68.5 kHz eP)
[ 152.745] (II) config/udev: removing GPU device /sys/devices/pci0000:00/0000:00:02.0/drm/card0 /dev/dri/card0
[ 152.745] xf86: remove device 1 /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[ 152.745] failed to find screen to remove
My system details:
- Distro: Ubuntu 22.04.1 LTS
- CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
- dGPU: NVIDIA Quadro P2000 Mobile
- Kernel: 5.15.0-48-generic
Please let me know if you need any furher details.