freebsd / drm-kmod

drm driver for FreeBSD
155 stars 69 forks source link

6.1-lts destroys my dmesg #281

Closed kevans91 closed 3 months ago

kevans91 commented 8 months ago

Describe the bug I didn't check if 5.10-lts was doing the same, but I get hundreds of this spew per minute:

WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const volatile __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) *)&(((volatile const unsigned long *)(&ce->flags))[((12) / 64)])); }); __asm__ __volatile__("": : :"memory"); __var; }) & (1UL << ((12) & (64 - 1)))) failed at /usr/local/sys/modules/drm-kmod/drivers/gpu/drm/i915/gt/intel_context.h:217

This one is also seemingly reported with some frequently:

Jan 23 19:38:27 ifrit kernel: r; }) & (1UL << ((12) & (64 - 1)))) failed at /usr/local/sys/modules/drm-kmod/drivers/gpu/drm/i915/gt/intel_context.h:217 

To be precise, here's a ~1-minute window from syslogd:

1172 Jan 23 19:36:44 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1173 Jan 23 19:37:02 ifrit syslogd: last message repeated 351 times                  
1174 Jan 23 19:37:02 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1175 Jan 23 19:37:02 ifrit kernel: 12) / 64)]) *)&(((volatile const unsigned long *)(&ce->flags))[((12) / 64)])); }); __asm__ __volatile__("": : :"memory"); __var; }) & (1UL << ((12) & (64 - 1)))) failed at /usr/local/sys/m
1176 Jan 23 19:37:03 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1177 Jan 23 19:37:20 ifrit syslogd: last message repeated 78 times                   
1178 Jan 23 19:37:20 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) 
1179 Jan 23 19:37:20 ifrit kernel: __var = ({ __asm__ __volatile__("": : :"memory"); (*(const volatile __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) *)&(((volatile const unsigned long *)(&ce->flags))
1180 Jan 23 19:37:20 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1181 Jan 23 19:37:29 ifrit syslogd: last message repeated 595 times                  
1182 Jan 23 19:37:29 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1183 Jan 23 19:37:29 ifrit kernel: r; }) & (1UL << ((12) & (64 - 1)))) failed at /usr/local/sys/modules/drm-kmod/drivers/gpu/drm/i915/gt/intel_context.h:217
1184 Jan 23 19:37:29 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1185 Jan 23 19:37:41 ifrit syslogd: last message repeated 282 times                  
1186 Jan 23 19:37:41 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1187 Jan 23 19:37:41 ifrit kernel: 12) / 64)]) *)&(((volatile const unsigned long *)(&ce->flags))[((12) / 64)])); }); __asm__ __volatile__("": : :"memory"); __var; }) & (1UL << ((12) & (64 - 1)))) failed at /usr/local/sys/m
1188 Jan 23 19:37:41 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1189 Jan 23 19:37:43 ifrit syslogd: last message repeated 142 times                  
1190 Jan 23 19:37:43 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1191 Jan 23 19:37:43 ifrit kernel: r; }) & (1UL << ((12) & (64 - 1)))) failed at /usr/local/sys/modules/drm-kmod/drivers/gpu/drm/i915/gt/intel_context.h:217
1192 Jan 23 19:37:43 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1193 Jan 23 19:37:50 ifrit syslogd: last message repeated 308 times                  
1194 Jan 23 19:37:50 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1195 Jan 23 19:37:50 ifrit kernel: r; }) & (1UL << ((12) & (64 - 1)))) failed at /usr/local/sys/modules/drm-kmod/drivers/gpu/drm/i915/gt/intel_context.h:217
1196 Jan 23 19:37:50 ifrit kernel: WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const vol
1197 Jan 23 19:38:02 ifrit syslogd: last message repeated 388 times                  

FreeBSD version FreeBSD 15.0-CURRENT FreeBSD 15.0-CURRENT kbsd/next-n267365-8aa2734d89d4 GENERIC amd64 1500008 1500008

PCI Info

hostb0@pci0:0:0:0:  class=0x060000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a14 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = '11th Gen Core Processor Host Bridge/DRAM Registers'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:2:0: class=0x030000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a49 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'TigerLake-LP GT2 [Iris Xe Graphics]'
    class      = display
    subclass   = VGA
none0@pci0:0:4:0:   class=0x118000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a03 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'TigerLake-LP Dynamic Tuning Processor Participant'
    class      = dasp
pcib1@pci0:0:6:0:   class=0x060400 rev=0x01 hdr=0x01 vendor=0x8086 device=0x9a09 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = '11th Gen Core Processor PCIe Controller'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:7:0:   class=0x060400 rev=0x01 hdr=0x01 vendor=0x8086 device=0x9a23 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Thunderbolt 4 PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:7:1:   class=0x060400 rev=0x01 hdr=0x01 vendor=0x8086 device=0x9a25 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Thunderbolt 4 PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:7:2:   class=0x060400 rev=0x01 hdr=0x01 vendor=0x8086 device=0x9a27 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Thunderbolt 4 PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:7:3:   class=0x060400 rev=0x01 hdr=0x01 vendor=0x8086 device=0x9a29 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Thunderbolt 4 PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
none1@pci0:0:8:0:   class=0x088000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a11 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'GNA Scoring Accelerator module'
    class      = base peripheral
none2@pci0:0:10:0:  class=0x118000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a0d subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tigerlake Telemetry Aggregator Driver'
    class      = dasp
xhci0@pci0:0:13:0:  class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a13 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Thunderbolt 4 USB Controller'
    class      = serial bus
    subclass   = USB
none3@pci0:0:13:2:  class=0x0c0340 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a1b subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Thunderbolt 4 NHI'
    class      = serial bus
    subclass   = USB
none4@pci0:0:13:3:  class=0x0c0340 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a1d subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Thunderbolt 4 NHI'
    class      = serial bus
    subclass   = USB
none5@pci0:0:18:0:  class=0x070000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0fc subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Integrated Sensor Hub'
    class      = simple comms
    subclass   = UART
xhci1@pci0:0:20:0:  class=0x0c0330 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0ed subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller'
    class      = serial bus
    subclass   = USB
none6@pci0:0:20:2:  class=0x050000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0ef subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Shared SRAM'
    class      = memory
    subclass   = RAM
ig4iic0@pci0:0:21:0:    class=0x0c8000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0e8 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Serial IO I2C Controller'
    class      = serial bus
ig4iic1@pci0:0:21:1:    class=0x0c8000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0e9 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Serial IO I2C Controller'
    class      = serial bus
ig4iic2@pci0:0:21:3:    class=0x0c8000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0eb subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Serial IO I2C Controller'
    class      = serial bus
none7@pci0:0:22:0:  class=0x078000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0e0 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Management Engine Interface'
    class      = simple comms
pcib6@pci0:0:29:0:  class=0x060400 rev=0x20 hdr=0x01 vendor=0x8086 device=0xa0b1 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:  class=0x060100 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa082 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP LPC Controller'
    class      = bridge
    subclass   = PCI-ISA
hdac0@pci0:0:31:3:  class=0x040380 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0c8 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP Smart Sound Technology Audio Controller'
    class      = multimedia
    subclass   = HDA
ichsmb0@pci0:0:31:4:    class=0x0c0500 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0a3 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP SMBus Controller'
    class      = serial bus
    subclass   = SMBus
none8@pci0:0:31:5:  class=0x0c8000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0a4 subvendor=0xf111 subdevice=0x0001
    vendor     = 'Intel Corporation'
    device     = 'Tiger Lake-LP SPI Controller'
    class      = serial bus
nvme0@pci0:1:0:0:   class=0x010802 rev=0x00 hdr=0x00 vendor=0x15b7 device=0x5006 subvendor=0x15b7 subdevice=0x5006
    vendor     = 'Sandisk Corp'
    device     = 'SanDisk Extreme Pro / WD Black SN750 / PC SN730 / Red SN700 NVMe SSD'
    class      = mass storage
    subclass   = NVM
iwlwifi0@pci0:170:0:0:  class=0x028000 rev=0x1a hdr=0x00 vendor=0x8086 device=0x2725 subvendor=0x8086 subdevice=0x0024
    vendor     = 'Intel Corporation'
    device     = 'Wi-Fi 6 AX210/AX211/AX411 160MHz'
    class      = network

DRM KMOD version

commit b66c0a09276885836524a9724bab5d053891ddd2 (HEAD -> 6.1-lts, tag: drm_v6.1.69, origin/6.1-lts)
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Dec 5 20:03:08 2023 +0200

To Reproduce Boot my laptop

Additional context This laptop can't boot with i915kms on Linux, so I've no path for trying to bisect along upstream drm to see if it happens / has happened there / where it might be fixed

emaste commented 8 months ago

I also get it on the 6.6 WIP

WARNING !lockdep_is_held(&ce->timeline->mutex) || !!(({ __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) __var = ({ __asm__ __volatile__("": : :"memory"); (*(const volatile __typeof(((volatile const unsigned long *)(&ce->flags))[((12) / 64)]) *)&(((volatile const unsigned long *)(&ce->flags))[((12) / 64)])); }); __asm__ __volatile__("": : :"memory"); __var; }) & (1UL << ((12) & (64 - 1)))) failed at /root/freebsd/sys/modules/drm-kmod/drivers/gpu/drm/i915/gt/intel_context.h:221

emaste commented 3 months ago

Note that lockdep_assert are only under INVARIANTS, if building for a non-INVARIANTS kernel will not print these warnings.

emaste commented 3 months ago

Fixed by https://github.com/freebsd/freebsd-src/commit/21f4cf5ccf87fd15d4d71f89d4c3ecab13f26146

emaste commented 3 months ago

(Issue should be closed -- I don't have permission.)