panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 13033 5161 0 0x1000 0x4080000 1K syz-executor.1 *469434 94225 0 0x14000 0x200 0 systqmp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8240fdad) at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff828c2b40,9,0) at witness_checkorder+0x10e0 sys/kern/subr_witness.c:821 __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 sys/kern/kern_lock.c:142 pageflttrap(ffff800020da3300,0) at pageflttrap+0x7f sys/arch/amd64/amd64/trap.c:180 kerntrap(ffff800020da3300) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:302 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b pool_cache_gc(ffffffff828c2ff0) at pool_cache_gc+0x138 pool_cache_list_put sys/kern/subr_pool.c:1970 [inline] pool_cache_gc(ffffffff828c2ff0) at pool_cache_gc+0x138 sys/kern/subr_pool.c:2025 pool_gc_pages(0) at pool_gc_pages+0x6c sys/kern/subr_pool.c:1559 taskq_thread(ffffffff82732d80) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: 5 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 acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8240fdad) at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff828c2b40,9,0) at witness_checkorder+0x10e0 sys/kern/subr_witness.c:821 __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 sys/kern/kern_lock.c:142 pageflttrap(ffff800020da3300,0) at pageflttrap+0x7f sys/arch/amd64/amd64/trap.c:180 kerntrap(ffff800020da3300) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:302 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b pool_cache_gc(ffffffff828c2ff0) at pool_cache_gc+0x138 pool_cache_list_put sys/kern/subr_pool.c:1970 [inline] pool_cache_gc(ffffffff828c2ff0) at pool_cache_gc+0x138 sys/kern/subr_pool.c:2025 pool_gc_pages(0) at pool_gc_pages+0x6c sys/kern/subr_pool.c:1559 taskq_thread(ffffffff82732d80) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020da3070 rbx 0xffff800020da3120 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff8151256f kprintf+0x16f r9 0x1 r10 0x2 r11 0x570bf487b97f3caf r12 0x3000000008 r13 0xffff800020da3080 r14 0x100 r15 0x1 rip 0xffffffff81f0cec8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020da3060 ss 0 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (systqmp) pid=469434 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020d88ea0,0xffff800020d88760 process=0xffff800020d8a000 user=0xffff800020d9e000, vmspace=0xffffffff82921510 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 5161 305358 84200 0 3 0x3000 suspend syz-executor.1 5161 13033 84200 0 7 0x4081000 syz-executor.1 68268 328833 0 0 3 0x14200 acct acct 84200 441154 50195 0 3 0x82 wait syz-executor.1 39178 4653 0 0 3 0x14200 bored sosplice 72824 497884 0 0 3 0x14280 nfsidl nfsio 98621 360520 0 0 3 0x14280 nfsidl nfsio 96430 132344 0 0 3 0x14280 nfsidl nfsio 74553 380249 0 0 3 0x14280 nfsidl nfsio 71164 480948 0 0 3 0x14280 nfsidl nfsio 8376 502935 0 0 3 0x14280 nfsidl nfsio 30587 25943 0 0 3 0x14280 nfsidl nfsio 8544 432695 0 0 3 0x14280 nfsidl nfsio 80188 473115 0 0 3 0x14280 nfsidl nfsio 23713 320033 0 0 3 0x14280 nfsidl nfsio 95882 13701 0 0 3 0x14280 nfsidl nfsio 43966 520252 0 0 3 0x14280 nfsidl nfsio 94145 61094 0 0 3 0x14280 nfsidl nfsio 71455 55018 0 0 3 0x14280 nfsidl nfsio 71762 369277 0 0 3 0x14280 nfsidl nfsio 63309 493468 0 0 3 0x14280 nfsidl nfsio 36086 273729 0 0 3 0x14280 nfsidl nfsio 97990 515200 0 0 3 0x14280 nfsidl nfsio 42152 173939 0 0 3 0x14280 nfsidl nfsio 59127 85545 0 0 3 0x14280 nfsidl nfsio 69596 436478 1 0 3 0x100083 ttyin getty 12953 36937 50195 0 3 0x82 piperd syz-executor.0 50195 507700 48967 0 3 0x82 thrsleep syz-fuzzer 50195 102099 48967 0 3 0x4000082 nanosleep syz-fuzzer 50195 288250 48967 0 3 0x4000082 thrsleep syz-fuzzer 50195 497517 48967 0 3 0x4000082 thrsleep syz-fuzzer 50195 226514 48967 0 3 0x4000082 thrsleep syz-fuzzer 50195 367150 48967 0 3 0x4000082 thrsleep syz-fuzzer 50195 224114 48967 0 3 0x4000082 thrsleep syz-fuzzer 50195 132086 48967 0 2 0x4000002 syz-fuzzer 50195 473650 48967 0 3 0x4000082 thrsleep syz-fuzzer 50195 446809 48967 0 2 0x4000002 syz-fuzzer 48967 19717 33262 0 3 0x10008a pause ksh 33262 196646 90085 0 3 0x92 select sshd 90085 208068 1 0 3 0x80 select sshd 71150 198030 59396 74 3 0x100092 bpf pflogd 59396 181926 1 0 3 0x80 netio pflogd 19683 120311 89592 73 3 0x100090 kqread syslogd 89592 325536 1 0 3 0x100082 netio syslogd 96927 160909 1 77 3 0x100090 poll dhclient 84653 268421 1 0 3 0x80 poll dhclient 84736 366124 0 0 3 0x14200 bored smr 99380 125899 0 0 2 0x14200 zerothread 64915 17818 0 0 3 0x14200 aiodoned aiodoned 46316 506337 0 0 3 0x14200 syncer update 42946 215690 0 0 3 0x14200 cleaner cleaner 32123 464524 0 0 3 0x14200 reaper reaper 45229 170168 0 0 3 0x14200 pgdaemon pagedaemon 72055 355144 0 0 3 0x14200 bored crynlk 29489 431290 0 0 3 0x14200 bored crypto 46505 161991 0 0 3 0x40014200 acpi0 acpi0 41230 127781 0 0 3 0x40014200 idle1 34260 506993 0 0 3 0x14200 bored softnet *94225 469434 0 0 7 0x14200 systqmp 2539 126974 0 0 3 0x14200 bored systq 32398 70307 0 0 2 0x40014200 softclock 75961 427496 0 0 3 0x40014200 idle0 1 384678 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex mbufpl r = 0 (0xffffffff828c3000) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 pool_cache_gc+0x12d pl_enter sys/kern/subr_pool.c:104 [inline] #3 pool_cache_gc+0x12d pool_cache_list_put sys/kern/subr_pool.c:1968 [inline] #3 pool_cache_gc+0x12d sys/kern/subr_pool.c:2025 #4 pool_gc_pages+0x6c sys/kern/subr_pool.c:1559 #5 taskq_thread+0xec sys/kern/kern_task.c:437 #6 proc_trampoline+0x1c Process 5161 (syz-executor.1) thread 0xffff800020e22288 (13033) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828c2b40) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 #2 mi_switch+0x392 sys/kern/sched_bsd.c:435 #3 preempt+0x5a sys/kern/sched_bsd.c:329 #4 uiomove+0x1e4 sys/kern/kern_subr.c:80 #5 ptcwrite+0x1a4 sys/kern/tty_pty.c:551 #6 spec_write+0xd4 sys/kern/spec_vnops.c:309 #7 VOP_WRITE+0xc6 sys/kern/vfs_vops.c:268 #8 vn_write+0x14e sys/kern/vfs_vnops.c:414 #9 dofilewritev+0x1b6 sys/kern/sys_generic.c:365 #10 sys_write+0x83 sys/kern/sys_generic.c:285 #11 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] #11 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 #12 Xsyscall+0x128 Process 94225 (systqmp) thread 0xffff800020d889c0 (469434) shared rwlock pools r = 0 (0xffffffff8272a990) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 pool_gc_pages+0x21 sys/kern/subr_pool.c:1555 #2 taskq_thread+0xec sys/kern/kern_task.c:437 #3 proc_trampoline+0x1c shared rwlock systqmp r = 0 (0xffffffff82732df0) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 taskq_thread+0xdf sys/kern/kern_task.c:436 #2 proc_trampoline+0x1c exclusive mutex mbufpl r = 0 (0xffffffff828c3000) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 pool_cache_gc+0x12d pl_enter sys/kern/subr_pool.c:104 [inline] #3 pool_cache_gc+0x12d pool_cache_list_put sys/kern/subr_pool.c:1968 [inline] #3 pool_cache_gc+0x12d sys/kern/subr_pool.c:2025 #4 pool_gc_pages+0x6c sys/kern/subr_pool.c:1559 #5 taskq_thread+0xec sys/kern/kern_task.c:437 #6 proc_trampoline+0x1c ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9553 6438K 7253K 78643K 15175 0 pcb 13 8K 8K 78643K 168 0 rtable 113 15K 17K 78643K 731 0 ifaddr 99 19K 19K 78643K 294 0 counters 43 33K 34K 78643K 81 0 ioctlops 0 0K 4K 78643K 1794 0 iov 0 0K 32K 78643K 123 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 2410 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 6 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 291 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 5 13K 25K 78643K 1094 0 sigio 0 0K 0K 78643K 35 0 proc 65 63K 95K 78643K 600 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 87 0 in_multi 55 3K 3K 78643K 319 0 ether_multi 1 0K 0K 78643K 29 0 mrt 0 0K 0K 78643K 4 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 61 281K 281K 78643K 61 0 exec 0 0K 1K 78643K 307 0 pfkey data 0 0K 0K 78643K 2 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 131 103K 120K 78643K 4189 0 UVM aobj 21 2K 2K 78643K 24 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 145 0 NDP 16 0K 0K 78643K 76 0 temp 154 3879K 3947K 78643K 16013 0 kqueue 3 4K 12K 78643K 62 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 10 0 3 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 78 0 76 1 0 1 1 0 8 0 rtentry 112 152 0 114 2 0 2 2 0 8 0 unpcb 120 1093 0 1081 1 0 1 1 0 8 0 syncache 264 17 0 17 7 7 0 1 0 8 0 tcpqe 32 1045 0 1045 2 2 0 1 0 8 0 tcpcb 544 368 0 364 1 0 1 1 0 8 0 inpcb 296 1143 0 1136 8 7 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 49 0 43 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 pfstscr 40 2 0 2 1 1 0 1 0 8 0 pffrag 232 7 0 6 3 2 1 1 0 482 0 pffrnode 88 7 0 6 3 2 1 1 0 8 0 pffrent 40 26 0 25 3 2 1 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 51 0 43 1 0 1 1 0 8 0 pfstitem 24 26 0 22 1 0 1 1 0 8 0 pfstkey 112 28 0 24 1 0 1 1 0 8 0 pfstate 328 27 0 24 2 0 2 2 0 8 1 pfrule 1360 55 0 29 4 1 3 3 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 657 0 482 17 4 13 16 0 8 0 art_table 32 659 0 482 3 1 2 3 0 8 0 art_node 16 151 0 118 1 0 1 1 0 8 0 sysvmsgpl 40 48 0 28 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 280 0 270 1 0 1 1 0 8 0 shmpl 112 22 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2887 0 1486 89 0 89 89 0 8 0 ffsino 272 2887 0 1486 95 1 94 95 0 8 0 nchpl 144 4672 0 3074 60 0 60 60 0 8 0 uvmvnodes 72 3966 0 0 73 0 73 73 0 8 0 vnodes 208 3966 0 0 209 0 209 209 0 8 0 namei 1024 13955 0 13955 5 5 0 1 0 8 0 percpumem 16 51 0 19 1 0 1 1 0 8 0 vcpupl 1984 11 0 0 2 0 2 2 0 8 0 vmpool 560 19 0 8 3 2 1 1 0 8 0 pfiaddrpl 120 22 0 12 2 1 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 14290 0 14290 16 15 1 7 0 8 1 plimitpl 152 73 0 64 1 0 1 1 0 8 0 sigapl 424 1329 0 1276 6 0 6 6 0 8 0 futexpl 56 20094 0 20094 4 4 0 1 0 8 0 knotepl 112 147 0 128 1 0 1 1 0 8 0 kqueuepl 144 153 0 151 1 0 1 1 0 8 0 pipelkpl 48 242 0 232 1 0 1 1 0 8 0 pipepl 120 484 0 465 1 0 1 1 0 8 0 fdescpl 496 1292 0 1276 3 0 3 3 0 8 0 filepl 152 8256 0 8153 5 0 5 5 0 8 0 lockfpl 104 304 0 303 1 0 1 1 0 8 0 lockfspl 48 101 0 100 1 0 1 1 0 8 0 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 28 0 17 1 0 1 1 0 8 0 ucredpl 96 698 0 689 1 0 1 1 0 8 0 zombiepl 144 1276 0 1276 3 3 0 1 0 8 0 processpl 984 1329 0 1276 7 0 7 7 0 8 0 procpl 624 3347 0 3284 10 5 5 6 0 8 0 sosppl 128 13 0 13 4 4 0 1 0 8 0 sockpl 400 2321 0 2300 11 8 3 4 0 8 0 mcl64k 65536 264 0 0 33 12 21 33 0 8 1 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 13 0 0 2 0 2 2 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 16 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 188 0 0 22 0 22 22 0 8 0 mtagpl 96 305 0 0 8 0 8 8 0 8 0 mbufpl 256 1227 0 0 74 0 74 74 0 8 0 mbufpl: pool(0xffffffff828c2ff0:mbufpl): free list modified: page 0xfffffd8064572000; item ordinal 4; addr 0xfffffd8064572e00 (p 0xfffffd8064346000); offset 0x0=0xa0e300000000000 bufpl 280 5926 0 141 414 0 414 414 0 8 0 anonpl 16 127667 0 108077 122 43 79 83 0 124 0 amapchunkpl 152 8070 0 7900 45 37 8 21 0 158 0 amappl16 192 6285 0 5222 83 29 54 56 0 8 0 amappl15 184 1 0 1 1 1 0 1 0 8 0 amappl14 176 22 0 19 1 0 1 1 0 8 0 amappl13 168 419 0 414 1 0 1 1 0 8 0 amappl12 160 861 0 856 1 0 1 1 0 8 0 amappl11 152 66 0 50 1 0 1 1 0 8 0 amappl10 144 20 0 15 1 0 1 1 0 8 0 amappl9 136 389 0 388 1 0 1 1 0 8 0 amappl8 128 358 0 327 2 0 2 2 0 8 0 amappl7 120 130 0 115 1 0 1 1 0 8 0 amappl6 112 30 0 23 2 1 1 1 0 8 0 amappl5 104 1853 0 1834 1 0 1 1 0 8 0 amappl4 96 700 0 670 1 0 1 1 0 8 0 amappl3 88 340 0 333 1 0 1 1 0 8 0 amappl2 80 9336 0 9265 2 0 2 2 0 8 0 amappl1 72 35204 0 34755 23 13 10 18 0 8 0 amappl 80 3604 0 3550 2 0 2 2 0 84 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 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 64 23 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1311 0 1284 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1311 0 1284 1 0 1 1 0 8 0 vmmpekpl 168 12860 0 12819 2 0 2 2 0 8 0 vmmpepl 168 159225 0 156984 168 70 98 123 0 357 0 vmsppl 368 1310 0 1284 3 0 3 3 0 8 0 pdppl 4096 2629 0 2579 7 0 7 7 0 8 0 pvpl 32 382362 0 360086 282 102 180 196 0 265 0 pmappl 232 1310 0 1284 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 382 0 38 11 0 11 11 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8240fdad) at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff828c2b40,9,0) at witness_checkorder+0x10e0 sys/kern/subr_witness.c:821 __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff828c2938) at __mp_lock+0xa1 sys/kern/kern_lock.c:142 pageflttrap(ffff800020da3300,0) at pageflttrap+0x7f sys/arch/amd64/amd64/trap.c:180 kerntrap(ffff800020da3300) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:302 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b pool_cache_gc(ffffffff828c2ff0) at pool_cache_gc+0x138 pool_cache_list_put sys/kern/subr_pool.c:1970 [inline] pool_cache_gc(ffffffff828c2ff0) at pool_cache_gc+0x138 sys/kern/subr_pool.c:2025 pool_gc_pages(0) at pool_gc_pages+0x6c sys/kern/subr_pool.c:1559 taskq_thread(ffffffff82732d80) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: -10 ddb{0}> machine ddbcpu 1