panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *236409 68749 0 0x8000000 0 0 syz-executor662539998 255929 83276 0 0x18000012 0x8 1 sshd db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e2817) at panic+0x17b sys/kern/subr_prf.c:198 witness_checkorder(ffffffff82e90fa0,9,0) at witness_checkorder+0xd03 witness_debugger sys/kern/subr_witness.c:2524 [inline] witness_checkorder(ffffffff82e90fa0,9,0) at witness_checkorder+0xd03 sys/kern/subr_witness.c:786 __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 sys/kern/kern_lock.c:142 intr_handler(ffff80002a1e6530,ffff80000067b300) at intr_handler+0x62 sys/arch/amd64/amd64/intr.c:539 Xintr_ioapic_edge26_untramp() at Xintr_ioapic_edge26_untramp+0x18f pool_do_get(ffffffff82ddb9e0,9,ffff80002a1e66d8) at pool_do_get+0x2ea pool_get(ffffffff82ddb9e0,9) at pool_get+0xf0 sys/kern/subr_pool.c:582 uvmspace_alloc(0,411ef000,1,0) at uvmspace_alloc+0x41 sys/uvm/uvm_map.c:3279 vm_impl_init(ffff80002a19fb30,ffff8000ffffd720) at vm_impl_init+0x92 sys/arch/amd64/amd64/vmm_machdep.c:1245 vm_create(ffff800000da8800,ffff8000ffffd720) at vm_create+0x13e sys/dev/vmm/vmm.c:388 vmmioctl(a00,c2585601,ffff800000da8800,1,ffff8000ffffd720) at vmmioctl+0x2de VOP_IOCTL(fffffd8072751b00,c2585601,ffff800000da8800,1,fffffd807f7d3af8,ffff8000ffffd720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:264 vn_ioctl(fffffd806ede70a0,c2585601,ffff800000da8800,ffff8000ffffd720) at vn_ioctl+0xc0 sys/kern/vfs_vnops.c:525 end trace frame: 0xffff80002a1e6b90, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e2817) at panic+0x17b sys/kern/subr_prf.c:198 witness_checkorder(ffffffff82e90fa0,9,0) at witness_checkorder+0xd03 witness_debugger sys/kern/subr_witness.c:2524 [inline] witness_checkorder(ffffffff82e90fa0,9,0) at witness_checkorder+0xd03 sys/kern/subr_witness.c:786 __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 sys/kern/kern_lock.c:142 intr_handler(ffff80002a1e6530,ffff80000067b300) at intr_handler+0x62 sys/arch/amd64/amd64/intr.c:539 Xintr_ioapic_edge26_untramp() at Xintr_ioapic_edge26_untramp+0x18f pool_do_get(ffffffff82ddb9e0,9,ffff80002a1e66d8) at pool_do_get+0x2ea pool_get(ffffffff82ddb9e0,9) at pool_get+0xf0 sys/kern/subr_pool.c:582 uvmspace_alloc(0,411ef000,1,0) at uvmspace_alloc+0x41 sys/uvm/uvm_map.c:3279 vm_impl_init(ffff80002a19fb30,ffff8000ffffd720) at vm_impl_init+0x92 sys/arch/amd64/amd64/vmm_machdep.c:1245 vm_create(ffff800000da8800,ffff8000ffffd720) at vm_create+0x13e sys/dev/vmm/vmm.c:388 vmmioctl(a00,c2585601,ffff800000da8800,1,ffff8000ffffd720) at vmmioctl+0x2de VOP_IOCTL(fffffd8072751b00,c2585601,ffff800000da8800,1,fffffd807f7d3af8,ffff8000ffffd720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:264 vn_ioctl(fffffd806ede70a0,c2585601,ffff800000da8800,ffff8000ffffd720) at vn_ioctl+0xc0 sys/kern/vfs_vnops.c:525 sys_ioctl(ffff8000ffffd720,ffff80002a1e6c70,ffff80002a1e6bc0) at sys_ioctl+0x4a9 syscall(ffff80002a1e6c70) at syscall+0x8cf mi_syscall sys/sys/syscall_mi.h:180 [inline] syscall(ffff80002a1e6c70) at syscall+0x8cf sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c326288d430, count: -17 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a1e6320 rbx 0xffffffff82ce7d77 cpu_info_full_primary+0x2d77 rdx 0x3fd rcx 0 rax 0x68 r8 0x101010101010101 r9 0x8080808080808080 r10 0x2e6059ba2bc12037 r11 0x3a1c63d8823eae8c r12 0xffffffff82ce7b78 cpu_info_full_primary+0x2b78 r13 0 r14 0 r15 0x1 rip 0xffffffff825bf6cc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002a1e6310 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor662539998) tid=236409 pid=68749 tcnt=1 stat=onproc flags process=8000000 proc=0 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff8000ffffdc40,0xffffffff82d626c8 process=0xffff8000ffff8480 user=0xffff80002a1e1000, vmspace=0xfffffd807eff26e0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=0, intr=1 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *68749 236409 35780 0 7 0x8000000 syz-executor662539998 35780 438644 98556 0 3 0x8000082 nanoslp syz-executor662539998 98556 405033 83276 0 3 0x810008a sigsusp ksh 83276 255929 10594 0 7 0x1800001a sshd 23151 509514 1 0 3 0x18100083 ttyin getty 10594 154769 1 0 3 0x18000088 kqread sshd 49316 5053 39917 73 3 0x19100010 ffs_fsync syslogd 39917 335136 1 0 3 0x18100082 sbwait syslogd 95891 271352 1 0 3 0x18100080 kqread resolvd 64185 394306 13418 77 3 0x18100092 kqread dhcpleased 51669 185583 13418 77 3 0x18100092 kqread dhcpleased 13418 169857 1 0 3 0x18000080 kqread dhcpleased 54560 23160 0 0 3 0x14200 bored smr 51407 489620 0 0 3 0x14200 pgzero zerothread 58388 86139 0 0 3 0x14200 aiodoned aiodoned 60586 404260 0 0 3 0x14200 syncer update 76086 208925 0 0 3 0x14200 cleaner cleaner 42326 241647 0 0 3 0x14200 reaper reaper 6682 149952 0 0 3 0x14200 pgdaemon pagedaemon 44393 387830 0 0 3 0x14200 bored viomb 60060 48816 0 0 3 0x40014200 acpi0 acpi0 65908 510009 0 0 3 0x40014200 idle1 13785 358077 0 0 3 0x14200 bored softnet3 29451 440934 0 0 3 0x14200 bored softnet2 98193 98945 0 0 3 0x14200 bored softnet1 86101 73696 0 0 3 0x14200 bored softnet0 50179 8687 0 0 3 0x14200 bored systqmp 71944 10420 0 0 3 0x14200 bored systq 83590 109080 0 0 3 0x14200 tmoslp softclockmp 70529 266299 0 0 3 0x40014200 tmoslp softclock 40315 275276 0 0 3 0x40014200 idle0 1 366349 0 0 3 0x8000082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex vmsppl r = 0 (0xffffffff82ddb9f0) #0 witness_lock+0x446 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x446 sys/kern/subr_witness.c:1157 #1 mtx_enter_try+0x103 #2 mtx_enter+0x4e sys/kern/kern_lock.c:266 #3 pool_get+0xc4 sys/kern/subr_pool.c:579 #4 uvmspace_alloc+0x41 sys/uvm/uvm_map.c:3279 #5 vm_impl_init+0x92 sys/arch/amd64/amd64/vmm_machdep.c:1245 #6 vm_create+0x13e sys/dev/vmm/vmm.c:388 #7 vmmioctl+0x2de #8 VOP_IOCTL+0x9a sys/kern/vfs_vops.c:264 #9 vn_ioctl+0xc0 sys/kern/vfs_vnops.c:525 #10 sys_ioctl+0x4a9 #11 syscall+0x8cf mi_syscall sys/sys/syscall_mi.h:180 [inline] #11 syscall+0x8cf sys/arch/amd64/amd64/trap.c:577 #12 Xsyscall+0x128 Process 49316 (syslogd) thread 0xffff8000ffffd200 (5053) exclusive rrwlock inode r = 0 (0xfffffd806e74a2c0) #0 witness_lock+0x446 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x446 sys/kern/subr_witness.c:1157 #1 rw_enter+0x32d sys/kern/kern_rwlock.c:309 #2 rrw_enter+0x91 sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0x8b sys/kern/vfs_vops.c:518 #4 vn_lock+0x85 sys/kern/vfs_vnops.c:564 #5 sys_fsync+0xf1 sys/kern/vfs_syscalls.c:2904 #6 syscall+0x854 mi_syscall sys/sys/syscall_mi.h:180 [inline] #6 syscall+0x854 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10143 6388K 6419K 166960K 11221 0 pcb 17 12K 12K 166960K 17 0 rtable 58 1K 2K 166960K 113 0 pf 12 6K 10K 166960K 23 0 ifaddr 12 9K 9K 166960K 12 0 ifgroup 17 1K 1K 166960K 17 0 counters 48 34K 34K 166960K 48 0 ioctlops 1 1K 4K 166960K 20135 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1260 79K 79K 166960K 1279 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 1 0K 0K 166960K 1 0 proc 55 78K 79K 166960K 256 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 11 0K 0K 166960K 11 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 25 122K 122K 166960K 25 0 exec 0 0K 1K 166960K 258 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 94 4K 20K 166960K 58528 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 22 44K 48K 166960K 19544 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 3 0K 0K 166960K 3 0 temp 1 6804K 6868K 166960K 3000 0 kqueue 11 16K 18K 166960K 24 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 20 0 17 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 unpcb 144 33 0 20 1 0 1 1 0 8 0 syncache 336 5 0 5 2 2 0 1 0 8 0 tcpcb 808 8 0 5 1 0 1 1 0 8 0 arp 120 2 0 0 1 0 1 1 0 8 0 inpcb 384 30 0 24 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 9 0 8 1 0 1 1 0 8 0 pfstkey 128 9 0 8 1 0 1 1 0 8 0 pfstate 376 9 0 8 1 0 1 1 0 8 0 pfrule 1344 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 96 0 0 6 0 6 6 0 8 0 art_table 32 97 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1507 0 40 92 0 92 92 0 8 0 ffsino 272 1507 0 40 98 0 98 98 0 8 0 nchpl 144 1695 0 47 63 1 62 62 0 8 0 uvmvnodes 80 1520 0 0 32 0 32 32 0 8 0 vnodes 216 1520 0 0 85 0 85 85 0 8 0 namei 1024 23154 0 23154 2 1 1 1 0 8 1 percpumem 16 38 0 0 1 0 1 1 0 8 0 vmpool 696 18662 0 18661 1 0 1 1 0 8 0 kstatmem 264 6 0 0 1 0 1 1 0 8 0 scxspl 216 86012 0 86011 10 9 1 8 1 8 0 plimitpl 152 16 0 10 1 0 1 1 0 8 0 sigapl 424 18987 0 18955 4 0 4 4 0 8 0 knotepl 120 45 0 0 2 0 2 2 0 8 0 kqueuepl 216 20 0 13 1 0 1 1 0 8 0 pipepl 320 93 0 90 2 1 1 1 0 8 0 fdescpl 496 18969 0 18955 3 1 2 3 0 8 0 filepl 152 19882 0 19828 3 0 3 3 0 8 0 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 17 0 9 1 0 1 1 0 8 0 pgrppl 48 17 0 9 1 0 1 1 0 8 0 ucredpl 104 66 0 56 1 0 1 1 0 8 0 zombiepl 144 18955 0 18955 2 1 1 1 0 8 1 processpl 1136 18987 0 18955 3 0 3 3 0 8 0 procpl 656 18987 0 18955 3 0 3 3 0 8 0 sockpl 664 83 0 61 2 0 2 2 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 355 0 0 45 3 42 45 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 367 0 0 23 0 23 23 0 8 0 bufpl 280 2793 0 93 193 0 193 193 0 8 0 anonpl 24 292725 0 290936 26 15 11 23 0 186 0 amapchunkpl 152 27385 0 27255 7 1 6 7 0 158 0 amappl16 200 23737 0 23736 6 5 1 5 0 8 0 amappl15 192 11 0 10 1 0 1 1 0 8 0 amappl14 184 130 0 121 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 1 0 1 0 8 0 amappl12 168 828 0 816 1 0 1 1 0 8 0 amappl11 160 72 0 62 1 0 1 1 0 8 0 amappl10 152 43 0 42 1 0 1 1 0 8 0 amappl9 144 140 0 140 1 1 0 1 0 8 0 amappl8 136 31 0 29 1 0 1 1 0 8 0 amappl7 128 24 0 23 1 0 1 1 0 8 0 amappl6 120 165 0 155 1 0 1 1 0 8 0 amappl5 112 132 0 120 1 0 1 1 0 8 0 amappl4 104 19080 0 19053 1 0 1 1 0 8 0 amappl3 96 2482 0 2458 1 0 1 1 0 8 0 amappl2 88 19266 0 19213 2 0 2 2 0 8 0 amappl1 80 46305 0 45892 15 4 11 11 0 8 0 amappl 88 39554 0 39506 2 0 2 2 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 37630 0 37616 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 37630 0 37616 1 0 1 1 0 8 0 vmmpekpl 168 43018 0 42999 1 0 1 1 0 8 0 vmmpepl 168 408679 0 407759 51 9 42 46 0 357 0 vmsppl 440 37630 0 37616 2 0 2 2 0 8 0 rwobjpl 56 56496 0 54367 32 1 31 32 0 8 0 pdppl 4096 75267 0 75232 59 22 37 41 0 8 2 pvpl 32 6326 0 0 52 0 52 52 0 265 0 pmappl 248 37629 0 37616 2 1 1 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 337 0 30 9 0 9 9 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e2817) at panic+0x17b sys/kern/subr_prf.c:198 witness_checkorder(ffffffff82e90fa0,9,0) at witness_checkorder+0xd03 witness_debugger sys/kern/subr_witness.c:2524 [inline] witness_checkorder(ffffffff82e90fa0,9,0) at witness_checkorder+0xd03 sys/kern/subr_witness.c:786 __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff82e90d98) at __mp_lock+0xa2 sys/kern/kern_lock.c:142 intr_handler(ffff80002a1e6530,ffff80000067b300) at intr_handler+0x62 sys/arch/amd64/amd64/intr.c:539 Xintr_ioapic_edge26_untramp() at Xintr_ioapic_edge26_untramp+0x18f pool_do_get(ffffffff82ddb9e0,9,ffff80002a1e66d8) at pool_do_get+0x2ea pool_get(ffffffff82ddb9e0,9) at pool_get+0xf0 sys/kern/subr_pool.c:582 uvmspace_alloc(0,411ef000,1,0) at uvmspace_alloc+0x41 sys/uvm/uvm_map.c:3279 vm_impl_init(ffff80002a19fb30,ffff8000ffffd720) at vm_impl_init+0x92 sys/arch/amd64/amd64/vmm_machdep.c:1245 vm_create(ffff800000da8800,ffff8000ffffd720) at vm_create+0x13e sys/dev/vmm/vmm.c:388 vmmioctl(a00,c2585601,ffff800000da8800,1,ffff8000ffffd720) at vmmioctl+0x2de VOP_IOCTL(fffffd8072751b00,c2585601,ffff800000da8800,1,fffffd807f7d3af8,ffff8000ffffd720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:264 vn_ioctl(fffffd806ede70a0,c2585601,ffff800000da8800,ffff8000ffffd720) at vn_ioctl+0xc0 sys/kern/vfs_vnops.c:525 sys_ioctl(ffff8000ffffd720,ffff80002a1e6c70,ffff80002a1e6bc0) at sys_ioctl+0x4a9 syscall(ffff80002a1e6c70) at syscall+0x8cf mi_syscall sys/sys/syscall_mi.h:180 [inline] syscall(ffff80002a1e6c70) at syscall+0x8cf sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c326288d430, count: -17 ddb{0}> machine ddbcpu 1