[Bug 261166] graphics/drm-devel-kmod kernel panics: mi_switch: switch in a critical section

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 13 Jan 2022 02:58:01 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261166

--- Comment #1 from Graham Perrin <grahamperrin@gmail.com> ---
Created attachment 230971
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=230971&action=edit
core.txt.1

Unread portion of the kernel message buffer:
panic: mi_switch: switch in a critical section
cpuid = 1
time = 1642031271
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01311a83a0
vpanic() at vpanic+0x17f/frame 0xfffffe01311a83f0
panic() at panic+0x43/frame 0xfffffe01311a8450
mi_switch() at mi_switch+0x19a/frame 0xfffffe01311a8470
__mtx_lock_sleep() at __mtx_lock_sleep+0x1d9/frame 0xfffffe01311a8500
__mtx_lock_flags() at __mtx_lock_flags+0xe5/frame 0xfffffe01311a8550
linux_wake_up() at linux_wake_up+0x38/frame 0xfffffe01311a85a0
radeon_fence_is_signaled() at radeon_fence_is_signaled+0x9b/frame
0xfffffe01311a85f0
dma_resv_add_shared_fence() at dma_resv_add_shared_fence+0x8a/frame
0xfffffe01311a8640
ttm_eu_fence_buffer_objects() at ttm_eu_fence_buffer_objects+0x6a/frame
0xfffffe01311a8670
radeon_cs_parser_fini() at radeon_cs_parser_fini+0x53/frame 0xfffffe01311a86a0
radeon_cs_ioctl() at radeon_cs_ioctl+0x788/frame 0xfffffe01311a8b20
drm_ioctl_kernel() at drm_ioctl_kernel+0xc7/frame 0xfffffe01311a8b70
drm_ioctl() at drm_ioctl+0x2c4/frame 0xfffffe01311a8c60
linux_file_ioctl() at linux_file_ioctl+0x30a/frame 0xfffffe01311a8cc0
kern_ioctl() at kern_ioctl+0x202/frame 0xfffffe01311a8d30
sys_ioctl() at sys_ioctl+0x126/frame 0xfffffe01311a8e00
amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe01311a8f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01311a8f30
--- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x27a426f501a, rsp =
0x7fffde617ec8, rbp = 0x7fffde617ef0 ---
KDB: enter: panic
Uptime: 22m3s
(ada0:ahcich0:0:0:0): spin-down
Dumping 1817 out of 16265 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
55              __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct
pcpu,
(kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=textdump@entry=1)
    at /usr/src/sys/kern/kern_shutdown.c:399
#2  0xffffffff80c00ba4 in kern_reboot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:487
#3  0xffffffff80c0100e in vpanic (
    fmt=0xffffffff811ac565 "mi_switch: switch in a critical section", 
    ap=<optimized out>) at /usr/src/sys/kern/kern_shutdown.c:920
#4  0xffffffff80c00d63 in panic (fmt=<unavailable>)
    at /usr/src/sys/kern/kern_shutdown.c:844
#5  0xffffffff80c0df5a in mi_switch (flags=flags@entry=259)
    at /usr/src/sys/kern/kern_synch.c:503
#6  0xffffffff80c67eea in turnstile_wait (ts=ts@entry=0xfffff8001f327240, 
    owner=owner@entry=0xfffffe015f7f03a0, queue=<optimized out>, 
    queue@entry=0) at /usr/src/sys/kern/subr_turnstile.c:817
#7  0xffffffff80bdc659 in __mtx_lock_sleep (c=c@entry=0xfffffe00de6798a8, 
    v=<optimized out>, opts=<optimized out>, opts@entry=0, 
    file=<optimized out>, 
    file@entry=0xffffffff81284276
"/usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c",
line=line@entry=207) at /usr/src/sys/kern/kern_mutex.c:668
#8  0xffffffff80bdc405 in __mtx_lock_flags (c=0xfffffe00de6798a8, 
    opts=<unavailable>, 
    file=0xffffffff81284276
"/usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c", line=207) at
/usr/src/sys/kern/kern_mutex.c:284
#9  0xffffffff80e7a028 in linux_wake_up (wqh=0xfffffe00de679890, state=3, 
    nr=0, locked=false)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_schedule.c:207
#10 0xffffffff8394520b in radeon_fence_is_signaled ()
   from /boot/modules/radeonkms.ko
#11 0xffffffff83a890ca in dma_resv_add_shared_fence ()
   from /boot/modules/linuxkpi_gplv2.ko
#12 0xffffffff83a96a6a in ttm_eu_fence_buffer_objects ()
   from /boot/modules/ttm.ko
#13 0xffffffff83937513 in radeon_cs_parser_fini ()
   from /boot/modules/radeonkms.ko
#14 0xffffffff83937298 in radeon_cs_ioctl () from /boot/modules/radeonkms.ko
#15 0xffffffff83a2ca97 in drm_ioctl_kernel () from /boot/modules/drm.ko
#16 0xffffffff83a2ce54 in drm_ioctl () from /boot/modules/drm.ko
#17 0xffffffff80e6b7da in linux_file_ioctl_sub (fp=0xedef, filp=0x1, 
    fop=<optimized out>, cmd=<optimized out>, data=<optimized out>, 
    td=<optimized out>)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_compat.c:1024
#18 linux_file_ioctl (fp=0xedef, 
    fp@entry=<error reading variable: value is not available>, 
    cmd=<unavailable>, 
    cmd@entry=<error reading variable: value is not available>, 
    data=<unavailable>, 
    data@entry=<error reading variable: value is not available>, 
    cred=<optimized out>, 
    cred@entry=<error reading variable: value is not available>, td=0x0, 
    td@entry=<error reading variable: value is not available>)
    at /usr/src/sys/compat/linuxkpi/common/src/linux_compat.c:1648
#19 0xffffffff80c77482 in fo_ioctl (fp=<optimized out>, com=3223348326, 
    data=<unavailable>, active_cred=<unavailable>, td=0xfffffe013480b020)
    at /usr/src/sys/sys/file.h:364
#20 kern_ioctl (td=<optimized out>, td@entry=0xfffffe013480b020, 
    fd=<optimized out>, com=com@entry=3223348326, data=<unavailable>, 
    data@entry=0xfffffe01311a8d50 "\003")
    at /usr/src/sys/kern/sys_generic.c:803
#21 0xffffffff80c771d6 in sys_ioctl (td=0xfffffe013480b020, 
    td@entry=<error reading variable: value is not available>, 
    uap=0xfffffe013480b410, 
    uap@entry=<error reading variable: value is not available>)
    at /usr/src/sys/kern/sys_generic.c:711
#22 0xffffffff810c93be in syscallenter (td=<optimized out>)
    at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:189
#23 amd64_syscall (td=0xfffffe013480b020, traced=0)
    at /usr/src/sys/amd64/amd64/trap.c:1191
#24 <signal handler called>
#25 0x0000027a426f501a in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffde617ec8
(kgdb)

-- 
You are receiving this mail because:
You are the assignee for the bug.