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 * 60060 59808 0 0 0x4000000 1 syz-executor.1 380550 40226 0 0x14000 0x40000200 0 softclock 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(ffff800020b630d0) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd8007db7054,fffffd8065ad2f40) at alltraps_kern_meltdown+0x7b frag6_input(ffff800020b63438,ffff800020b63444,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800020b63438,ffff800020b63444,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800020b63438,ffff800020b63444,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800020b63438,ffff800020b63444,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806d737300) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806d737300,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd806f09b300,ffff800000023000,fffffd806f6c1070,0,0,fffffd806f6c1000) at ip6_output+0xd59 rip6_output(fffffd806f09b300,fffffd80717f5aa0,ffff800020b637a8,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 end trace frame: 0xffff800020b63840, 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(ffff800020b630d0) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd8007db7054,fffffd8065ad2f40) at alltraps_kern_meltdown+0x7b frag6_input(ffff800020b63438,ffff800020b63444,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800020b63438,ffff800020b63444,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800020b63438,ffff800020b63444,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800020b63438,ffff800020b63444,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806d737300) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806d737300,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd806f09b300,ffff800000023000,fffffd806f6c1070,0,0,fffffd806f6c1000) at ip6_output+0xd59 rip6_output(fffffd806f09b300,fffffd80717f5aa0,ffff800020b637a8,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd80717f5aa0,9,fffffd806f09b300,0,0,ffff800020a88290) at rip6_usrreq+0x5cd sys/netinet6/raw_ip6.c:670 sosend(fffffd80717f5aa0,0,ffff800020b639d8,0,0,0) at sosend+0x668 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020a88290,3,ffff800020b639d8,0,ffff800020b63ae0) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020a88290,ffff800020b63a78,ffff800020b63ae0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020b63b50) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020b63b50) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,c,0,3,26175a71010) at Xsyscall+0x128 end of kernel end trace frame: 0x2638a0980c0, count: -20 ddb{1}> show registers rdi 0xffffffff81d56a37 db_enter+0x17 rsi 0x327c __ALIGN_SIZE+0x227c rbp 0xffff800020b62e30 rbx 0xffff800020b62ee0 rdx 0x327d __ALIGN_SIZE+0x227d rcx 0xffff800020b7a000 rax 0xffff800020b7a000 r8 0xffffffff812e94e3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x3462ebbba7dee92a r12 0x3000000008 r13 0xffff800020b62e40 r14 0x100 r15 0x1 rip 0xffffffff81d56a38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b62e20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=60060 stat=onproc flags process=0 proc=4000000 pri=70, usrpri=70, nice=20 forw=0xffffffffffffffff, list=0xffff800020a89650,0xffffffff826641e8 process=0xffff800020adc000 user=0xffff800020b5e000, vmspace=0xfffffd807f00b730 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 59808 135093 6929 0 2 0 syz-executor.1 *59808 60060 6929 0 7 0x4000000 syz-executor.1 26901 35380 0 0 3 0x14200 bored sosplice 54635 347613 33602 0 2 0x2 syz-executor.0 6929 364278 33602 0 2 0x482 syz-executor.1 33602 352881 46487 0 3 0x82 kqread syz-fuzzer 33602 196358 46487 0 3 0x4000082 nanosleep syz-fuzzer 33602 400119 46487 0 3 0x4000082 thrsleep syz-fuzzer 33602 163559 46487 0 3 0x4000082 thrsleep syz-fuzzer 33602 9700 46487 0 3 0x4000082 thrsleep syz-fuzzer 33602 22029 46487 0 3 0x4000082 thrsleep syz-fuzzer 33602 30908 46487 0 3 0x4000082 thrsleep syz-fuzzer 33602 213822 46487 0 3 0x4000082 thrsleep syz-fuzzer 33602 491434 46487 0 3 0x4000082 thrsleep syz-fuzzer 33602 119965 46487 0 3 0x4000082 thrsleep syz-fuzzer 46487 11494 31378 0 3 0x10008a pause ksh 31378 284855 61746 0 3 0x92 select sshd 72834 131266 1 0 3 0x100083 ttyin getty 61746 395555 1 0 3 0x80 select sshd 17818 112397 16425 74 3 0x100092 bpf pflogd 16425 419353 1 0 3 0x80 netio pflogd 18435 485514 99976 73 3 0x100090 kqread syslogd 99976 480083 1 0 3 0x100082 netio syslogd 30433 298156 1 77 3 0x100090 poll dhclient 27179 428074 1 0 3 0x80 poll dhclient 26468 11578 0 0 3 0x14200 pgzero zerothread 25469 82367 0 0 3 0x14200 aiodoned aiodoned 78978 247545 0 0 3 0x14200 syncer update 35797 34139 0 0 3 0x14200 cleaner cleaner 67325 490724 0 0 3 0x14200 reaper reaper 21665 218601 0 0 3 0x14200 pgdaemon pagedaemon 83059 428342 0 0 3 0x14200 bored crynlk 57732 502347 0 0 3 0x14200 bored crypto 20627 161297 0 0 3 0x40014200 acpi0 acpi0 17149 376094 0 0 3 0x40014200 idle1 80693 511661 0 0 3 0x14200 bored softnet 70942 118641 0 0 3 0x14200 bored systqmp 5904 116471 0 0 3 0x14200 bored systq 40226 380550 0 0 7 0x40014200 softclock 58236 499055 0 0 3 0x40014200 idle0 85741 365698 0 0 3 0x14200 bored smr 1 15984 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 59808 (syz-executor.1) thread 0xffff800020a88290 (60060) 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 54635 (syz-executor.0) thread 0xffff800020a88508 (347613) exclusive rrwlock inode r = 0 (0xfffffd80645fc708) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x13e sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0xce sys/kern/vfs_vops.c:449 #8 domkdirat+0x121 sys/kern/vfs_syscalls.c:2983 #9 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #9 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806d82df88) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:561 #5 vfs_lookup+0xec sys/kern/vfs_lookup.c:418 #6 namei+0x61c sys/kern/vfs_lookup.c:248 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:2968 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9492 6397K 6655K 78643K 10781 0 0 pcb 14 8K 8K 78643K 34 0 0 rtable 105 3K 3K 78643K 207 0 0 ifaddr 48 11K 11K 78643K 50 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1865 0 0 iov 0 0K 16K 78643K 10 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1216 76K 77K 78643K 1946 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 4 0 0 VM map 2 1K 1K 78643K 4 0 0 sem 12 0K 0K 78643K 406 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 655 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 53 50K 83K 78643K 418 0 0 subproc 32 2K 2K 78643K 34 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 12 0 0 in_multi 33 2K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 223 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 96 21K 22K 78643K 2676 0 0 UVM aobj 8 2K 2K 78643K 8 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 32 0 0 NDP 9 0K 0K 78643K 13 0 0 temp 119 3543K 3607K 78643K 4645 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 6 0 0 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 19 0 17 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 57 0 47 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 5142 0 5142 1 1 0 1 0 8 0 tcpcb 544 49 0 44 1 0 1 1 0 8 0 inpcb 280 133 0 125 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 6 0 0 1 0 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 pfstitem 24 16 0 7 1 0 1 1 0 8 0 pfstkey 112 16 0 7 1 0 1 1 0 8 0 pfstate 328 16 0 7 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 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 3 2 1 1 1 0 8 1 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 404 0 394 1 0 1 1 0 8 0 shmpl 112 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2897 0 1471 47 0 47 47 0 8 0 ffsino 272 2897 0 1471 96 0 96 96 0 8 0 nchpl 144 3820 0 2174 62 0 62 62 0 8 0 uvmvnodes 72 2998 0 0 55 0 55 55 0 8 0 vnodes 200 2998 0 0 158 0 158 158 0 8 0 namei 1024 10830 0 10829 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 vmpool 552 2 0 2 1 0 1 1 0 8 1 scxspl 192 8831 0 8831 9 8 1 7 0 8 1 plimitpl 152 26 0 18 1 0 1 1 0 8 0 sigapl 432 855 0 840 3 1 2 3 0 8 0 futexpl 56 10059 0 10059 1 0 1 1 0 8 1 knotepl 112 76 0 57 1 0 1 1 0 8 0 kqueuepl 104 812 0 810 1 0 1 1 0 8 0 pipepl 112 1022 0 1003 1 0 1 1 0 8 0 fdescpl 488 856 0 840 3 0 3 3 0 8 0 filepl 152 6196 0 6096 6 1 5 5 0 8 1 lockfpl 104 57 0 57 3 2 1 1 0 8 1 lockfspl 48 21 0 21 3 2 1 1 0 8 1 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 1456 0 1447 1 0 1 1 0 8 0 zombiepl 144 840 0 840 2 1 1 1 0 8 1 processpl 896 872 0 840 4 0 4 4 0 8 0 procpl 632 1909 0 1867 5 1 4 5 0 8 0 sosppl 128 2 0 2 1 0 1 1 0 8 1 sockpl 384 209 0 189 5 2 3 3 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 173 0 0 20 0 20 20 0 8 0 mtagpl 80 6 0 0 1 0 1 1 0 8 0 mbufpl 256 221 0 0 13 0 13 13 0 8 0 bufpl 256 7396 0 1166 390 0 390 390 0 8 0 anonpl 16 81355 0 68661 65 13 52 64 0 124 0 amapchunkpl 152 3801 0 3681 8 2 6 7 0 158 0 amappl16 192 3477 0 2795 44 9 35 44 0 8 0 amappl15 184 625 0 621 1 0 1 1 0 8 0 amappl14 176 480 0 472 1 0 1 1 0 8 0 amappl13 168 8 0 7 1 0 1 1 0 8 0 amappl12 160 10 0 9 2 1 1 1 0 8 0 amappl11 152 59 0 44 1 0 1 1 0 8 0 amappl10 144 74 0 69 1 0 1 1 0 8 0 amappl9 136 596 0 593 1 0 1 1 0 8 0 amappl8 128 151 0 132 1 0 1 1 0 8 0 amappl7 120 43 0 38 1 0 1 1 0 8 0 amappl6 112 58 0 53 1 0 1 1 0 8 0 amappl5 104 139 0 125 1 0 1 1 0 8 0 amappl4 96 698 0 667 2 1 1 2 0 8 0 amappl3 88 1036 0 1022 1 0 1 1 0 8 0 amappl2 80 6493 0 6422 3 1 2 3 0 8 0 amappl1 72 25514 0 25076 27 16 11 20 0 8 0 amappl 80 2170 0 2130 1 0 1 1 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 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 858 0 840 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 858 0 840 1 0 1 1 0 8 0 vmmpekpl 168 10380 0 10352 2 0 2 2 0 8 0 vmmpepl 168 106070 0 104262 121 36 85 95 0 357 4 vmsppl 368 855 0 840 2 0 2 2 0 8 0 pdppl 4096 1723 0 1684 7 1 6 6 0 8 1 pvpl 32 245355 0 229519 171 35 136 157 0 265 7 pmappl 232 857 0 842 3 1 2 2 0 8 1 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 555 0 5 16 0 16 16 0 8 0