panic: mtx 0xffffffff821bfc00: locking against myself Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *188423 30841 0 0 0 1 syz-executor.1 156633 30841 0 0 0x4000000 0K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 __mtx_enter_try(ffffffff821bfc00) at __mtx_enter_try+0x131 sys/kern/kern_lock.c:297 _mtx_enter(ffffffff821bfc00,ffffffff81fba7e7,1ff) at _mtx_enter+0x54 __mtx_enter sys/kern/kern_lock.c:267 [inline] _mtx_enter(ffffffff821bfc00,ffffffff81fba7e7,1ff) at _mtx_enter+0x54 sys/kern/kern_lock.c:447 printf(ffffffff81fcf2c8) at printf+0x6b sys/kern/subr_prf.c:511 splassert_fail(d,e,ffffffff81fb3340) at splassert_fail+0x67 sys/kern/subr_prf.c:223 witness_lock(ffffffff82393178,8,ffffffff81fa6980,1bc) at witness_lock+0x423 witness_lock_stack_get sys/kern/subr_witness.c:1880 [inline] witness_lock(ffffffff82393178,8,ffffffff81fa6980,1bc) at witness_lock+0x423 sys/kern/subr_witness.c:1199 wakeup_n(ffff800000970888,ffffffff) at wakeup_n+0x43 sys/kern/kern_synch.c:444 tputchar(73,ffff800000970800) at tputchar+0xf5 ttstart sys/kern/tty.c:1341 [inline] tputchar(73,ffff800000970800) at tputchar+0xf5 sys/kern/tty.c:2277 kputchar(73,5,0) at kputchar+0xe6 sys/kern/subr_prf.c:342 kprintf() at kprintf+0x1b2c sys/kern/subr_prf.c:1058 printf(ffffffff81f6b24f) at printf+0x80 sys/kern/subr_prf.c:512 start_vmm_on_cpu(ffff800020aa0ff0) at start_vmm_on_cpu+0x165 sys/arch/amd64/amd64/vmm.c:922 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 end trace frame: 0xffff800020bffb00, count: 0 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic mtx 0xffffffff821bfc00: locking against myself ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 __mtx_enter_try(ffffffff821bfc00) at __mtx_enter_try+0x131 sys/kern/kern_lock.c:297 _mtx_enter(ffffffff821bfc00,ffffffff81fba7e7,1ff) at _mtx_enter+0x54 __mtx_enter sys/kern/kern_lock.c:267 [inline] _mtx_enter(ffffffff821bfc00,ffffffff81fba7e7,1ff) at _mtx_enter+0x54 sys/kern/kern_lock.c:447 printf(ffffffff81fcf2c8) at printf+0x6b sys/kern/subr_prf.c:511 splassert_fail(d,e,ffffffff81fb3340) at splassert_fail+0x67 sys/kern/subr_prf.c:223 witness_lock(ffffffff82393178,8,ffffffff81fa6980,1bc) at witness_lock+0x423 witness_lock_stack_get sys/kern/subr_witness.c:1880 [inline] witness_lock(ffffffff82393178,8,ffffffff81fa6980,1bc) at witness_lock+0x423 sys/kern/subr_witness.c:1199 wakeup_n(ffff800000970888,ffffffff) at wakeup_n+0x43 sys/kern/kern_synch.c:444 tputchar(73,ffff800000970800) at tputchar+0xf5 ttstart sys/kern/tty.c:1341 [inline] tputchar(73,ffff800000970800) at tputchar+0xf5 sys/kern/tty.c:2277 kputchar(73,5,0) at kputchar+0xe6 sys/kern/subr_prf.c:342 kprintf() at kprintf+0x1b2c sys/kern/subr_prf.c:1058 printf(ffffffff81f6b24f) at printf+0x80 sys/kern/subr_prf.c:512 start_vmm_on_cpu(ffff800020aa0ff0) at start_vmm_on_cpu+0x165 sys/arch/amd64/amd64/vmm.c:922 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi(0,0,16,0,0,dbdb310a000) at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7f7ffffd3850, count: -15 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020bff480 rbx 0xffff800020bff530 rdx 0xffffffff81fba7e7 apollo_pio_rec+0x9592 rcx 0xffff800020aa0ff0 rax 0xffff800020aa0ff0 r8 0xffffffff811f9343 kprintf+0x173 r9 0x1 r10 0x25 r11 0x6ba2bdb843523194 r12 0x3000000008 r13 0xffff800020bff490 r14 0x100 r15 0x1 rip 0xffffffff81891f88 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bff470 ss 0 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=188423 stat=onproc flags process=0 proc=0 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28720,0xffff800020b29798 process=0xffff800020b7c9f0 user=0xffff800020bfa000, vmspace=0xfffffd807effe9d8 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *30841 188423 12927 0 7 0 syz-executor.1 30841 156633 12927 0 7 0x4000000 syz-executor.1 38569 326289 99668 0 3 0x80 nanosleep syz-executor.0 38569 117277 99668 0 3 0x4000080 poll syz-executor.0 38569 126828 99668 0 3 0x4000080 fsleep syz-executor.0 12927 494864 83943 0 3 0x82 nanosleep syz-executor.1 9122 500438 1 0 3 0x100083 ttyin getty 99668 430892 83943 0 3 0x82 nanosleep syz-executor.0 23900 184570 0 0 3 0x14200 bored sosplice 83943 294072 3975 0 3 0x82 thrsleep syz-fuzzer 83943 300910 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 13716 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 400274 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 219496 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 400009 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 232081 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 407754 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 433112 3975 0 3 0x4000082 thrsleep syz-fuzzer 83943 447022 3975 0 3 0x4000082 kqread syz-fuzzer 3975 217640 86711 0 3 0x10008a pause ksh 86711 293585 49595 0 3 0x92 select sshd 49595 483781 1 0 3 0x80 select sshd 62296 183175 69383 74 3 0x100092 bpf pflogd 69383 484134 1 0 3 0x80 netio pflogd 92692 371851 83922 73 3 0x100090 kqread syslogd 83922 207517 1 0 3 0x100082 netio syslogd 63695 471335 1 77 3 0x100090 poll dhclient 60574 514189 1 0 3 0x80 poll dhclient 9320 184948 0 0 3 0x14200 pgzero zerothread 89184 88925 0 0 3 0x14200 aiodoned aiodoned 73972 333143 0 0 3 0x14200 syncer update 74211 74558 0 0 3 0x14200 cleaner cleaner 89930 30285 0 0 3 0x14200 reaper reaper 32059 137357 0 0 3 0x14200 pgdaemon pagedaemon 40201 305345 0 0 3 0x14200 bored crynlk 82897 105442 0 0 3 0x14200 bored crypto 66582 408521 0 0 3 0x40014200 acpi0 acpi0 72903 118795 0 0 3 0x40014200 idle1 83636 9946 0 0 3 0x14200 bored softnet 13885 466269 0 0 3 0x14200 bored systqmp 47665 20799 0 0 3 0x14200 bored systq 15932 372880 0 0 3 0x40014200 bored softclock 1842 161228 0 0 3 0x40014200 idle0 10277 260393 0 0 3 0x14200 bored smr 1 269717 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive sched_lock &sched_lock r = 0 (0xffffffff82393178) locked @ /syzkaller/managers/multicore/kernel/sys/kern/kern_synch.c:444 Process 30841 (syz-executor.1) thread 0xffff800020b29788 (156633) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8238f270) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 syscall+0x45e mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x45e sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9537 6420K 6935K 78643K 13467 0 0 pcb 25 9K 11K 78643K 582 0 0 rtable 103 4K 4K 78643K 779 0 0 ifaddr 65 14K 15K 78643K 261 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 1 2K 4K 78643K 1492 0 0 iov 0 0K 24K 78643K 96 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 76K 78643K 2406 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 169 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 1298 0 0 sigio 0 0K 0K 78643K 29 0 0 proc 53 50K 71K 78643K 690 0 0 subproc 64 65538K 67586K 78643K 444 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 96 0 0 in_multi 33 2K 2K 78643K 200 0 0 ether_multi 1 0K 0K 78643K 13 0 0 mrt 0 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 323 0 0 pfkey data 0 0K 0K 78643K 4 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 103 21K 30K 78643K 5067 0 0 UVM aobj 39 2K 2K 78643K 40 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 133 0 0 NDP 14 0K 0K 78643K 85 0 0 temp 187 2712K 2839K 78643K 7830 0 0 kqueue 1 0K 0K 78643K 11 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 15 0 11 1 0 1 1 0 8 0 inpcbpl 280 689 0 682 1 0 1 1 0 8 0 plimitpl 152 89 0 81 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 141 0 101 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 11 0 11 1 1 0 1 0 8 0 tcpcb 544 277 0 273 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 26 0 22 1 0 1 1 0 8 0 ppxss 1128 24 0 24 4 3 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 41 0 30 1 0 1 1 0 8 0 pfstkey 112 41 0 30 1 0 1 1 0 8 0 pfstate 328 41 0 30 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 655 0 463 12 0 12 12 0 8 0 art_table 32 656 0 463 2 0 2 2 0 8 0 art_node 16 140 0 106 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 6 1 0 1 1 0 8 0 semupl 112 4 0 4 2 2 0 1 0 8 0 semapl 112 163 0 153 1 0 1 1 0 8 0 shmpl 112 38 0 1 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3429 0 1975 47 0 47 47 0 8 0 ffsino 272 3429 0 1975 98 1 97 97 0 8 0 nchpl 144 5394 0 3753 61 0 61 61 0 8 0 uvmvnodes 72 4313 0 0 79 0 79 79 0 8 0 vnodes 200 4313 0 0 227 0 227 227 0 8 0 namei 1024 17208 0 17208 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 6 0 6 3 3 0 1 0 8 0 scxspl 192 17319 0 17319 11 8 3 5 0 8 3 sigapl 432 1465 0 1449 2 0 2 2 0 8 0 futexpl 56 15244 0 15243 1 0 1 1 0 8 0 knotepl 112 489 0 469 1 0 1 1 0 8 0 kqueuepl 104 310 0 307 1 0 1 1 0 8 0 pipepl 112 900 0 881 3 1 2 2 0 8 1 fdescpl 488 1466 0 1449 3 0 3 3 0 8 0 filepl 152 8692 0 8588 6 1 5 5 0 8 1 lockfpl 104 374 0 374 3 2 1 1 0 8 1 lockfspl 32 132 0 132 3 2 1 1 0 8 1 sessionpl 112 30 0 19 1 0 1 1 0 8 0 pgrppl 48 38 0 27 1 0 1 1 0 8 0 ucredpl 96 1648 0 1639 1 0 1 1 0 8 0 zombiepl 144 1449 0 1449 2 1 1 1 0 8 1 processpl 840 1482 0 1449 4 0 4 4 0 8 0 procpl 600 4159 0 4114 4 0 4 4 0 8 0 srpgc 64 67 0 67 6 6 0 1 0 8 0 sosppl 128 9 0 9 4 4 0 1 0 8 0 sockpl 384 1166 0 1147 4 1 3 4 0 8 1 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 12 0 0 2 0 2 2 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 125 0 0 15 0 15 15 0 8 0 mtagpl 80 3 0 0 1 0 1 1 0 8 0 mbufpl 256 176 0 0 8 0 8 8 0 8 0 bufpl 256 8551 0 1532 439 0 439 439 0 8 0 anonpl 16 140363 0 129725 56 10 46 53 0 125 1 amapchunkpl 152 8479 0 8366 14 9 5 10 0 158 0 amappl16 192 6432 0 5842 45 13 32 42 0 8 2 amappl15 184 80 0 80 1 1 0 1 0 8 0 amappl14 176 55 0 50 2 1 1 1 0 8 0 amappl13 168 285 0 283 3 2 1 1 0 8 0 amappl12 160 633 0 630 1 0 1 1 0 8 0 amappl11 152 145 0 127 1 0 1 1 0 8 0 amappl10 144 160 0 156 1 0 1 1 0 8 0 amappl9 136 641 0 636 1 0 1 1 0 8 0 amappl8 128 210 0 188 1 0 1 1 0 8 0 amappl7 120 135 0 129 1 0 1 1 0 8 0 amappl6 112 168 0 160 1 0 1 1 0 8 0 amappl5 104 761 0 746 1 0 1 1 0 8 0 amappl4 96 1973 0 1940 2 1 1 2 0 8 0 amappl3 88 164 0 158 1 0 1 1 0 8 0 amappl2 80 11735 0 11673 2 0 2 2 0 8 0 amappl1 72 41190 0 40720 27 18 9 20 0 8 0 amappl 72 4477 0 4436 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 39 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1466 0 1449 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1466 0 1449 1 0 1 1 0 8 0 vmmpekpl 168 15525 0 15500 2 0 2 2 0 8 0 vmmpepl 168 167483 0 165778 149 62 87 92 0 357 12 vmsppl 360 1465 0 1449 2 0 2 2 0 8 0 pdppl 4096 2940 0 2898 6 0 6 6 0 8 0 pvpl 32 434613 0 420704 160 39 121 143 0 265 6 pmappl 232 1465 0 1449 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 592 0 4 17 0 17 17 0 8 0