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 344395 64830 0 0x2 0x4000000 1 syz-fuzzer * 31478 28489 0 0x14000 0x200 0 systqmp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82416644) at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff828c8768,9,0) at witness_checkorder+0x10e0 sys/kern/subr_witness.c:821 __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 sys/kern/kern_lock.c:142 pageflttrap(ffff800020da3990,0) at pageflttrap+0x7f sys/arch/amd64/amd64/trap.c:180 kerntrap(ffff800020da3990) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:302 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b pool_cache_gc(ffffffff828bfab0) at pool_cache_gc+0x138 pool_cache_list_put sys/kern/subr_pool.c:1970 [inline] pool_cache_gc(ffffffff828bfab0) 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(ffffffff82723420) 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(ffffffff82416644) at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff828c8768,9,0) at witness_checkorder+0x10e0 sys/kern/subr_witness.c:821 __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 sys/kern/kern_lock.c:142 pageflttrap(ffff800020da3990,0) at pageflttrap+0x7f sys/arch/amd64/amd64/trap.c:180 kerntrap(ffff800020da3990) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:302 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b pool_cache_gc(ffffffff828bfab0) at pool_cache_gc+0x138 pool_cache_list_put sys/kern/subr_pool.c:1970 [inline] pool_cache_gc(ffffffff828bfab0) 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(ffffffff82723420) 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 0xffff800020da3700 rbx 0xffff800020da37b0 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff81ec8d2f kprintf+0x16f r9 0x1 r10 0x2 r11 0x910a13b7ac39e529 r12 0x3000000008 r13 0xffff800020da3710 r14 0x100 r15 0x1 rip 0xffffffff81efc068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020da36f0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (systqmp) pid=31478 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020d88270,0xffff800020d889d0 process=0xffff800020d8a000 user=0xffff800020d9e000, vmspace=0xffffffff828b7fb0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 14329 18377 1 0 3 0x100083 ttyin getty 42596 438060 0 0 3 0x14200 acct acct 31505 160174 64830 0 3 0x82 piperd syz-executor.0 54413 419465 0 0 3 0x14200 bored sosplice 86133 473176 64830 0 3 0x82 wait syz-executor.1 64830 364921 93007 0 3 0x82 thrsleep syz-fuzzer 64830 498508 93007 0 3 0x4000082 nanosleep syz-fuzzer 64830 65894 93007 0 3 0x4000082 thrsleep syz-fuzzer 64830 496162 93007 0 3 0x4000082 thrsleep syz-fuzzer 64830 344244 93007 0 3 0x4000082 thrsleep syz-fuzzer 64830 342949 93007 0 3 0x4000082 thrsleep syz-fuzzer 64830 225086 93007 0 3 0x4000082 thrsleep syz-fuzzer 64830 259899 93007 0 3 0x4000082 kqread syz-fuzzer 64830 344395 93007 0 7 0x4000002 syz-fuzzer 64830 29714 93007 0 3 0x4000082 thrsleep syz-fuzzer 93007 225913 7751 0 3 0x10008a pause ksh 7751 508777 87697 0 3 0x92 select sshd 87697 181057 1 0 3 0x80 select sshd 41944 340894 91596 74 3 0x100092 bpf pflogd 91596 450374 1 0 3 0x80 netio pflogd 73935 246480 85914 73 3 0x100090 kqread syslogd 85914 5508 1 0 3 0x100082 netio syslogd 23417 155821 1 77 3 0x100090 poll dhclient 9734 305517 1 0 3 0x80 poll dhclient 62670 155352 0 0 3 0x14200 bored smr 50303 339577 0 0 3 0x14200 pgzero zerothread 84897 32715 0 0 3 0x14200 aiodoned aiodoned 87218 439838 0 0 3 0x14200 syncer update 78042 266210 0 0 3 0x14200 cleaner cleaner 75359 225709 0 0 3 0x14200 reaper reaper 86594 7953 0 0 3 0x14200 pgdaemon pagedaemon 74274 34702 0 0 3 0x14200 bored crynlk 4285 273366 0 0 3 0x14200 bored crypto 76399 155349 0 0 3 0x40014200 acpi0 acpi0 25072 142500 0 0 3 0x40014200 idle1 88733 52725 0 0 3 0x14200 bored softnet *28489 31478 0 0 7 0x14200 systqmp 30831 143566 0 0 3 0x14200 bored systq 61926 54464 0 0 3 0x40014200 bored softclock 25372 359141 0 0 3 0x40014200 idle0 1 59548 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 (0xffffffff828bfac0) #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 28489 (systqmp) thread 0xffff800020d88750 (31478) shared rwlock pools r = 0 (0xffffffff82738bd0) #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 (0xffffffff82723490) #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 (0xffffffff828bfac0) #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 9545 6433K 6818K 78643K 11670 0 pcb 13 8K 8K 78643K 199 0 rtable 126 11K 12K 78643K 678 0 ifaddr 104 20K 20K 78643K 247 0 sysctl 2 0K 0K 78643K 2 0 counters 43 33K 34K 78643K 75 0 ioctlops 0 0K 4K 78643K 1592 0 iov 0 0K 16K 78643K 149 0 mount 1 1K 1K 78643K 1 0 vnodes 1215 76K 77K 78643K 1587 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 15 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 122 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 5 13K 25K 78643K 908 0 sigio 0 0K 0K 78643K 10 0 proc 65 63K 95K 78643K 618 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 1164 0 in_multi 74 3K 3K 78643K 298 0 ether_multi 1 0K 0K 78643K 22 0 mrt 0 0K 0K 78643K 6 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 280 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 137 88K 88K 78643K 4021 0 UVM aobj 19 2K 2K 78643K 33 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 105 0 NDP 15 0K 0K 78643K 63 0 temp 150 3875K 3968K 78643K 25970 0 kqueue 3 4K 18K 78643K 71 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 11 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 62 0 60 1 0 1 1 0 8 0 rtentry 112 139 0 103 2 0 2 2 0 8 0 unpcb 120 1379 0 1369 1 0 1 1 0 8 0 syncache 264 7 0 7 4 4 0 1 0 8 0 tcpqe 32 430 0 430 1 1 0 1 0 8 0 tcpcb 544 1000 0 996 3 2 1 2 0 8 0 inpcb 296 2093 0 2086 4 3 1 2 0 8 0 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 48 0 46 1 0 1 1 0 8 0 pkpcb 40 14 0 14 2 2 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 4 0 4 1 1 0 1 0 8 0 pfstscr 40 4 0 4 1 1 0 1 0 8 0 pffrag 232 4 0 4 2 2 0 1 0 482 0 pffrnode 88 4 0 4 2 2 0 1 0 8 0 pffrent 40 146 0 146 4 4 0 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 55 0 40 4 2 2 2 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 264 2 0 2 1 1 0 1 0 8 0 pfstitem 24 77 0 69 1 0 1 1 0 8 0 pfstkey 112 79 0 71 2 0 2 2 0 8 0 pfstate 328 77 0 69 6 2 4 6 0 8 0 pfsrctr 152 56 0 56 1 1 0 1 0 8 0 pfrule 1360 41 0 23 4 2 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 471 0 317 18 7 11 16 0 8 0 art_table 32 472 0 317 2 0 2 2 0 8 0 art_node 16 138 0 104 1 0 1 1 0 8 0 sysvmsgpl 40 23 0 8 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 118 0 108 1 0 1 1 0 8 0 shmpl 112 30 0 14 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2644 0 1243 90 1 89 89 0 8 0 ffsino 272 2644 0 1243 96 2 94 95 0 8 0 nchpl 144 4099 0 2501 60 0 60 60 0 8 0 uvmvnodes 72 2936 0 0 54 0 54 54 0 8 0 vnodes 208 2936 0 0 155 0 155 155 0 8 0 namei 1024 11409 0 11409 4 3 1 1 0 8 1 percpumem 16 48 0 16 1 0 1 1 0 8 0 vcpupl 1984 11 0 0 2 0 2 2 0 8 0 vmpool 560 14 0 3 3 2 1 1 0 8 0 pfiaddrpl 120 22 0 12 2 1 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 13303 0 13303 13 13 0 7 0 8 0 plimitpl 152 72 0 64 1 0 1 1 0 8 0 sigapl 424 1124 0 1091 4 0 4 4 0 8 0 futexpl 56 14482 0 14482 3 2 1 1 0 8 1 knotepl 112 142 0 123 1 0 1 1 0 8 0 kqueuepl 144 157 0 155 1 0 1 1 0 8 0 pipepl 304 175 0 165 4 3 1 2 0 8 0 fdescpl 496 1107 0 1091 3 0 3 3 0 8 0 filepl 152 7612 0 7509 6 1 5 5 0 8 0 lockfpl 104 257 0 256 1 0 1 1 0 8 0 lockfspl 48 84 0 83 1 0 1 1 0 8 0 sessionpl 112 21 0 10 1 0 1 1 0 8 0 pgrppl 48 37 0 26 1 0 1 1 0 8 0 ucredpl 96 488 0 479 1 0 1 1 0 8 0 zombiepl 144 1092 0 1091 2 1 1 1 0 8 0 processpl 992 1124 0 1091 6 1 5 5 0 8 0 procpl 624 3159 0 3117 4 0 4 4 0 8 0 sosppl 128 11 0 11 4 4 0 1 0 8 0 sockpl 400 3550 0 3531 9 7 2 4 0 8 0 mcl64k 65536 15 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 7 0 0 1 0 1 1 0 8 0 mcl9k 9216 5 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 10 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 169 0 0 21 1 20 21 0 8 0 mtagpl 96 58 0 0 2 0 2 2 0 8 0 mbufpl 256 362 0 0 19 0 19 19 0 8 0 bufpl 280 5732 0 135 400 0 400 400 0 8 0 anonpl 16 108914 0 91740 87 16 71 86 0 124 0 amapchunkpl 152 7083 0 6927 33 24 9 20 0 158 0 amappl16 192 5507 0 4585 61 14 47 59 0 8 0 amappl15 184 1 0 1 1 1 0 1 0 8 0 amappl14 176 27 0 21 1 0 1 1 0 8 0 amappl13 168 43 0 40 1 0 1 1 0 8 0 amappl12 160 10 0 7 1 0 1 1 0 8 0 amappl11 152 59 0 44 1 0 1 1 0 8 0 amappl10 144 163 0 159 1 0 1 1 0 8 0 amappl9 136 608 0 605 1 0 1 1 0 8 0 amappl8 128 402 0 360 2 0 2 2 0 8 0 amappl7 120 282 0 269 1 0 1 1 0 8 0 amappl6 112 28 0 22 2 1 1 1 0 8 0 amappl5 104 1473 0 1454 1 0 1 1 0 8 0 amappl4 96 520 0 490 1 0 1 1 0 8 0 amappl3 88 146 0 141 1 0 1 1 0 8 0 amappl2 80 7861 0 7790 2 0 2 2 0 8 0 amappl1 72 34470 0 34033 24 14 10 18 0 8 0 amappl 80 3444 0 3391 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 32 0 14 1 0 1 1 0 8 0 uaddrrnd 24 1121 0 1094 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1121 0 1094 1 0 1 1 0 8 0 vmmpekpl 168 11806 0 11766 2 0 2 2 0 8 0 vmmpepl 168 141363 0 139243 155 57 98 126 0 357 0 vmsppl 368 1120 0 1094 3 0 3 3 0 8 0 pdppl 4096 2249 0 2199 8 1 7 7 0 8 0 pvpl 32 338285 0 317407 210 34 176 201 0 265 7 pmappl 232 1120 0 1094 4 2 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 291 0 28 8 0 8 8 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(ffffffff82416644) at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff828c8768,9,0) at witness_checkorder+0x10e0 sys/kern/subr_witness.c:821 __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline] __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline] __mp_lock(ffffffff828c8560) at __mp_lock+0xa1 sys/kern/kern_lock.c:142 pageflttrap(ffff800020da3990,0) at pageflttrap+0x7f sys/arch/amd64/amd64/trap.c:180 kerntrap(ffff800020da3990) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:302 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b pool_cache_gc(ffffffff828bfab0) at pool_cache_gc+0x138 pool_cache_list_put sys/kern/subr_pool.c:1970 [inline] pool_cache_gc(ffffffff828bfab0) 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(ffffffff82723420) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d70ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0xc0030259f8, count: 12 ddb{1}> trace x86_ipi_db(ffff800020d70ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0xc0030259f8, count: -3