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 *506915 7197 0 0 0x4000000 1 syz-executor.0 111874 40299 0 0x2 0x4000080 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff8265f5f8,9,0) at witness_checkorder+0x10cc sys/kern/subr_witness.c:820 __mp_lock(ffffffff8265f3f0) at __mp_lock+0xa1 pageflttrap() at pageflttrap+0x6f sys/arch/amd64/amd64/trap.c:162 kerntrap(ffff800020b428f0) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd8007dec054,fffffd8070bd4f40) at alltraps_kern_meltdown+0x7b frag6_input(ffff800020b42c58,ffff800020b42c64,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800020b42c58,ffff800020b42c64,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800020b42c58,ffff800020b42c64,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800020b42c58,ffff800020b42c64,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806f1fc600) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806f1fc600,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd8069736c00,ffff800000a9c080,fffffd806f6bbc78,0,0,fffffd806f6bbc08) at ip6_output+0xd59 rip6_output(fffffd8069736c00,fffffd8007dafab0,ffff800020b42fc8,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 end trace frame: 0xffff800020b43060, 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 acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff8265f5f8,9,0) at witness_checkorder+0x10cc sys/kern/subr_witness.c:820 __mp_lock(ffffffff8265f3f0) at __mp_lock+0xa1 pageflttrap() at pageflttrap+0x6f sys/arch/amd64/amd64/trap.c:162 kerntrap(ffff800020b428f0) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd8007dec054,fffffd8070bd4f40) at alltraps_kern_meltdown+0x7b frag6_input(ffff800020b42c58,ffff800020b42c64,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800020b42c58,ffff800020b42c64,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800020b42c58,ffff800020b42c64,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800020b42c58,ffff800020b42c64,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806f1fc600) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806f1fc600,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd8069736c00,ffff800000a9c080,fffffd806f6bbc78,0,0,fffffd806f6bbc08) at ip6_output+0xd59 rip6_output(fffffd8069736c00,fffffd8007dafab0,ffff800020b42fc8,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd8007dafab0,9,fffffd8069736c00,0,0,ffff800020acf400) at rip6_usrreq+0x5cd sys/netinet6/raw_ip6.c:670 sosend(fffffd8007dafab0,0,ffff800020b431f8,0,0,0) at sosend+0x668 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020acf400,3,ffff800020b431f8,0,ffff800020b43300) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020acf400,ffff800020b43298,ffff800020b43300) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020b43370) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020b43370) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,c,0,3,4e817a2d010) at Xsyscall+0x128 end of kernel end trace frame: 0x4ea9a93c6c0, count: -20 ddb{1}> show registers rdi 0xffffffff81d56a37 db_enter+0x17 rsi 0x37de __ALIGN_SIZE+0x27de rbp 0xffff800020b42650 rbx 0xffff800020b42700 rdx 0x37df __ALIGN_SIZE+0x27df rcx 0xffff80002216c000 rax 0xffff80002216c000 r8 0xffffffff812e94e3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x76477b155eb9edf1 r12 0x3000000008 r13 0xffff800020b42660 r14 0x100 r15 0x1 rip 0xffffffff81d56a38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b42640 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=506915 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020acf8f0,0xffffffff826641e8 process=0xffff800020add500 user=0xffff800020b3e000, vmspace=0xfffffd807f00b8a0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 7197 523521 19644 0 2 0 syz-executor.0 * 7197 506915 19644 0 7 0x4000000 syz-executor.0 80710 382564 1 0 3 0x100083 ttyin getty 7467 249584 40299 0 2 0x2 syz-executor.1 19644 193475 40299 0 3 0x82 nanosleep syz-executor.0 34141 241957 0 0 3 0x14200 bored sosplice 40299 131044 90105 0 3 0x82 thrsleep syz-fuzzer 40299 509689 90105 0 3 0x4000082 nanosleep syz-fuzzer 40299 121110 90105 0 3 0x4000082 thrsleep syz-fuzzer 40299 205459 90105 0 3 0x4000082 thrsleep syz-fuzzer 40299 9929 90105 0 3 0x4000082 thrsleep syz-fuzzer 40299 200986 90105 0 3 0x4000082 thrsleep syz-fuzzer 40299 294757 90105 0 3 0x4000082 thrsleep syz-fuzzer 40299 325414 90105 0 3 0x4000082 nanosleep syz-fuzzer 40299 111874 90105 0 7 0x4000082 syz-fuzzer 40299 209889 90105 0 3 0x4000082 thrsleep syz-fuzzer 90105 502249 45268 0 3 0x10008a pause ksh 45268 303768 25492 0 3 0x92 select sshd 25492 62163 1 0 3 0x80 select sshd 14702 286149 10119 74 3 0x100092 bpf pflogd 10119 273581 1 0 3 0x80 netio pflogd 14650 213417 20258 73 3 0x100090 kqread syslogd 20258 448853 1 0 3 0x100082 netio syslogd 41908 362358 1 77 3 0x100090 poll dhclient 27502 359376 1 0 3 0x80 poll dhclient 54049 104464 0 0 3 0x14200 pgzero zerothread 63520 7368 0 0 3 0x14200 aiodoned aiodoned 53354 62604 0 0 3 0x14200 syncer update 9606 449526 0 0 3 0x14200 cleaner cleaner 72883 489060 0 0 3 0x14200 reaper reaper 53056 108291 0 0 3 0x14200 pgdaemon pagedaemon 77576 27084 0 0 3 0x14200 bored crynlk 39890 368393 0 0 3 0x14200 bored crypto 65901 405290 0 0 3 0x40014200 acpi0 acpi0 50968 99240 0 0 3 0x40014200 idle1 1263 373097 0 0 3 0x14200 bored softnet 18946 265453 0 0 3 0x14200 bored systqmp 50426 441442 0 0 3 0x14200 bored systq 74159 360529 0 0 3 0x40014200 bored softclock 31291 362940 0 0 3 0x40014200 idle0 95244 252139 0 0 3 0x14200 bored smr 1 523629 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive mutex /syzkaller/managers/multicore/kernel/sys/netinet6/frag6.c:57 r = 0 (0xffffffff824bae40) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 frag6_input+0x237 sys/netinet6/frag6.c:183 #4 ip_deliver+0x353 sys/netinet/ip_input.c:665 #5 ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] #5 ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 #6 ipv6_input+0x48 sys/netinet6/ip6_input.c:171 #7 if_input_local+0x121 sys/net/if.c:783 #8 ip6_output+0xd59 #9 rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 #10 rip6_usrreq+0x5cd sys/netinet6/raw_ip6.c:670 #11 sosend+0x668 sys/kern/uipc_socket.c:524 #12 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #13 sys_write+0x83 sys/kern/sys_generic.c:284 #14 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #14 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #15 Xsyscall+0x128 Process 7197 (syz-executor.0) thread 0xffff800020acf400 (506915) exclusive rwlock netlock r = 0 (0xffffffff824c5488) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sosend+0x52c sys/kern/uipc_socket.c:512 #3 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #4 sys_write+0x83 sys/kern/sys_generic.c:284 #5 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #5 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #6 Xsyscall+0x128 exclusive mutex /syzkaller/managers/multicore/kernel/sys/netinet6/frag6.c:57 r = 0 (0xffffffff824bae40) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 frag6_input+0x237 sys/netinet6/frag6.c:183 #4 ip_deliver+0x353 sys/netinet/ip_input.c:665 #5 ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] #5 ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 #6 ipv6_input+0x48 sys/netinet6/ip6_input.c:171 #7 if_input_local+0x121 sys/net/if.c:783 #8 ip6_output+0xd59 #9 rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 #10 rip6_usrreq+0x5cd sys/netinet6/raw_ip6.c:670 #11 sosend+0x668 sys/kern/uipc_socket.c:524 #12 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #13 sys_write+0x83 sys/kern/sys_generic.c:284 #14 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #14 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #15 Xsyscall+0x128 Process 7467 (syz-executor.1) thread 0xffff800020abec70 (249584) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8265f5f8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 pipe_write+0x32 sys/kern/sys_pipe.c:442 #2 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #3 sys_write+0x83 sys/kern/sys_generic.c:284 #4 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #4 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #5 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9569 6563K 7781K 78643K 15196 0 0 pcb 14 8K 8K 78643K 226 0 0 rtable 114 12K 13K 78643K 804 0 0 ifaddr 71 15K 15K 78643K 242 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1545 0 0 iov 0 0K 16K 78643K 187 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 77K 78643K 2835 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 21 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 204 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 1909 0 0 sigio 0 0K 0K 78643K 31 0 0 proc 54 51K 83K 78643K 860 0 0 subproc 32 2K 2K 78643K 154 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 163 0 0 in_multi 33 2K 2K 78643K 160 0 0 ether_multi 1 0K 0K 78643K 10 0 0 mrt 0 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 447 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 111 22K 31K 78643K 7095 0 0 UVM aobj 77 3K 3K 78643K 82 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 2 0K 0K 78643K 229 0 0 NDP 16 0K 0K 78643K 75 0 0 temp 201 3556K 4195K 78643K 47693 0 0 kqueue 0 0K 0K 78643K 12 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 20 0 14 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 110 0 108 1 0 1 1 0 8 0 rtentry 112 128 0 84 2 0 2 2 0 8 0 unpcb 120 595 0 585 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9482 0 9482 1 1 0 1 0 8 0 tcpcb 544 381 0 377 1 0 1 1 0 8 0 inpcb 280 1101 0 1093 1 0 1 1 0 8 0 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 48 1 0 0 1 0 1 1 0 8 0 nd6 48 27 0 21 1 0 1 1 0 8 0 pkpcb 40 8 0 8 3 3 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 24 0 24 7 6 1 1 0 8 1 pffrag 232 5 0 5 3 3 0 1 0 482 0 pffrnode 88 5 0 5 3 3 0 1 0 8 0 pffrent 40 10 0 10 3 3 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 pfstitem 24 66 0 47 1 0 1 1 0 8 0 pfstkey 112 66 0 47 1 0 1 1 0 8 0 pfstate 328 66 0 47 3 0 3 3 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 507 0 315 13 1 12 13 0 8 0 art_table 32 508 0 315 2 0 2 2 0 8 0 art_node 16 121 0 81 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 3 1 0 1 1 0 8 0 semapl 112 202 0 192 1 0 1 1 0 8 0 shmpl 112 80 0 5 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4278 0 2852 47 0 47 47 0 8 0 ffsino 272 4278 0 2852 96 0 96 96 0 8 0 nchpl 144 7100 0 5473 62 0 62 62 0 8 0 uvmvnodes 72 5464 0 0 100 0 100 100 0 8 0 vnodes 200 5464 0 0 288 0 288 288 0 8 0 namei 1024 22477 0 22477 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 7 0 7 5 4 1 1 0 8 1 scxspl 192 20576 0 20576 13 12 1 7 0 8 1 plimitpl 152 207 0 199 1 0 1 1 0 8 0 sigapl 432 2089 0 2074 4 2 2 3 0 8 0 futexpl 56 23197 0 23197 1 0 1 1 0 8 1 knotepl 112 481 0 462 1 0 1 1 0 8 0 kqueuepl 104 392 0 390 1 0 1 1 0 8 0 pipepl 112 1146 0 1127 3 2 1 2 0 8 0 fdescpl 488 2090 0 2074 3 0 3 3 0 8 0 filepl 152 12045 0 11945 9 4 5 7 0 8 1 lockfpl 104 548 0 548 2 1 1 1 0 8 1 lockfspl 48 180 0 180 2 1 1 1 0 8 1 sessionpl 112 26 0 15 1 0 1 1 0 8 0 pgrppl 48 50 0 39 1 0 1 1 0 8 0 ucredpl 96 2224 0 2215 1 0 1 1 0 8 0 zombiepl 144 2074 0 2074 2 1 1 1 0 8 1 processpl 896 2106 0 2074 4 0 4 4 0 8 0 procpl 632 5957 0 5915 9 4 5 5 0 8 0 srpgc 64 14 0 14 4 4 0 1 0 8 0 sosppl 128 20 0 20 5 4 1 1 0 8 1 sockpl 384 1835 0 1815 7 4 3 4 0 8 0 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 14 0 0 2 0 2 2 0 8 0 mcl9k 9216 14 0 0 1 0 1 1 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 143 0 0 17 0 17 17 0 8 0 mtagpl 80 26 0 0 1 0 1 1 0 8 0 mbufpl 256 196 0 0 10 0 10 10 0 8 0 bufpl 256 9879 0 2860 439 0 439 439 0 8 0 anonpl 16 208930 0 195936 112 43 69 69 0 124 14 amapchunkpl 152 12345 0 12204 17 9 8 11 0 158 0 amappl16 192 9808 0 9122 90 47 43 46 0 8 8 amappl15 184 1112 0 1110 2 1 1 1 0 8 0 amappl14 176 653 0 647 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 322 0 317 1 0 1 1 0 8 0 amappl11 152 76 0 62 1 0 1 1 0 8 0 amappl10 144 356 0 350 1 0 1 1 0 8 0 amappl9 136 692 0 687 1 0 1 1 0 8 0 amappl8 128 228 0 205 1 0 1 1 0 8 0 amappl7 120 346 0 339 1 0 1 1 0 8 0 amappl6 112 75 0 66 1 0 1 1 0 8 0 amappl5 104 496 0 481 1 0 1 1 0 8 0 amappl4 96 1519 0 1485 2 1 1 2 0 8 0 amappl3 88 1662 0 1647 1 0 1 1 0 8 0 amappl2 80 15861 0 15790 3 1 2 3 0 8 0 amappl1 72 55510 0 55074 27 17 10 20 0 8 0 amappl 80 6345 0 6299 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 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 81 0 5 2 0 2 2 0 8 0 uaddrrnd 24 2090 0 2074 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2090 0 2074 1 0 1 1 0 8 0 vmmpekpl 168 19666 0 19634 2 0 2 2 0 8 0 vmmpepl 168 262265 0 260432 174 78 96 104 0 357 11 vmsppl 368 2089 0 2074 2 0 2 2 0 8 0 pdppl 4096 4187 0 4148 7 1 6 6 0 8 0 pvpl 32 583873 0 567677 251 82 169 169 0 265 36 pmappl 232 2089 0 2074 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 600 0 6 17 0 17 17 0 8 0