intel / gvt-linux

Other
512 stars 95 forks source link

Segmentation fault on VM startup #223

Open Lord-Dimwit-Flathead-the-Excessive opened 1 year ago

Lord-Dimwit-Flathead-the-Excessive commented 1 year ago

Description uevent from i915 causes segmentation fault in X when GVT-g enabled virtual machines start up. See References for other cases and further details on my implementation. Logs

[+52930.92s] DEBUG: Session c6 is already active
KERNEL[52972.007430] 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=6883
MAJOR=226
MINOR=0

UDEV  [52972.016323] 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=6883
USEC_INITIALIZED=1566236
ID_PATH=pci-0000:00:02.0
ID_PATH_TAG=pci-0000_00_02_0
ID_FOR_SEAT=drm-pci-0000_00_02_0
PRIMARY_DEVICE_FOR_DISPLAY=1
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:00:02.0-card
TAGS=:snap_snapd-desktop-integration_snapd-desktop-integration:snap_firefox_firefox:snap_firefox_geckodriver:seat:mutter-device-disable-kms-modifiers:uaccess:master-of-seat:
CURRENT_TAGS=:snap_snapd-desktop-integration_snapd-desktop-integration:snap_firefox_firefox:snap_firefox_geckodriver:seat:mutter-device-disable-kms-modifiers:uaccess:master-of-seat:

xf86: remove device 1 /sys/devices/pci0000:00/0000:00:02.0/drm/card0
xf86: found device 2
KERNEL[52975.442201] 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=1
VMID=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=6884
MAJOR=226
MINOR=0

UDEV  [52975.455485] 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=1
VMID=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=6884
USEC_INITIALIZED=1566236
ID_PATH=pci-0000:00:02.0
ID_PATH_TAG=pci-0000_00_02_0
ID_FOR_SEAT=drm-pci-0000_00_02_0
PRIMARY_DEVICE_FOR_DISPLAY=1
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:00:02.0-card
TAGS=:mutter-device-disable-kms-modifiers:snap_firefox_firefox:snap_snapd-desktop-integration_snapd-desktop-integration:seat:uaccess:master-of-seat:snap_firefox_geckodriver:
CURRENT_TAGS=:mutter-device-disable-kms-modifiers:snap_firefox_firefox:seat:snap_snapd-desktop-integration_snapd-desktop-integration:uaccess:master-of-seat:snap_firefox_geckodriver:

xf86: remove device 1 /sys/devices/pci0000:00/0000:00:02.0/drm/card0
(EE) 
(EE) Backtrace:
(EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x139) [0x55bedf33b6d9]
(EE) 1: /lib/x86_64-linux-gnu/libc.so.6 (__sigaction+0x50) [0x7fae21160520]
(EE) 2: ? (?+0x0) [0x0]
(EE) 
(EE) Segmentation fault at address 0x0
(EE) 
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) Server terminated with error (1). Closing log file.
[+52958.71s] DEBUG: Session pid=7256: Exited with return value 1
[+52958.71s] DEBUG: Seat seat0: Session stopped
[+52958.71s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+52958.71s] DEBUG: Sending signal 15 to process 6969

Host

System:
  Host: cview Kernel: 5.15.0-56-generic x86_64 bits: 64 Desktop: MATE 1.26.0
    Distro: Ubuntu 22.04.1 LTS (Jammy Jellyfish)
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME B360M-A v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 3202
    date: 07/10/2021
CPU:
  Info: 6-core model: Intel Core i5-9600K bits: 64 type: MCP cache:
    L2: 1.5 MiB
  Speed (MHz): avg: 800 min/max: 800/4600 cores: 1: 800 2: 800 3: 800
    4: 800 5: 800 6: 800
Graphics:
  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] driver: i915 v: kernel
  Device-2: NVIDIA GM107GL [Quadro K1200] driver: nouveau v: kernel
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: nouveau resolution: 1: 1920x1080~60Hz
    2: 1080x1920~60Hz 3: 1080x1920~60Hz 4: 1920x1080~60Hz
  OpenGL: renderer: NV117 v: 4.3 Mesa 22.0.5

References https://gitlab.freedesktop.org/xorg/xserver/-/issues/1386 https://www.reddit.com/r/VFIO/comments/nle231/xserver_crashes_when_vm_boots_with_igpu_gvtg/ https://superuser.com/questions/1756279/intel-gvt-g-scrambled-graphics-on-virt-manager