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 *409881 1792 0 0 0x4000000 0 syz-executor.0 406204 68328 0 0 0x4000000 1 syz-executor.1 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(ffffffff8262c5a8,9,0) at witness_checkorder+0x10cc sys/kern/subr_witness.c:820 __mp_lock(ffffffff8262c3a0) at __mp_lock+0xa1 pageflttrap() at pageflttrap+0x6f sys/arch/amd64/amd64/trap.c:162 kerntrap(ffff800021978c90) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd806e534854,fffffd807dffaf40) at alltraps_kern_meltdown+0x7b frag6_input(ffff800021978ff8,ffff800021979004,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800021978ff8,ffff800021979004,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800021978ff8,ffff800021979004,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800021978ff8,ffff800021979004,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806845a200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806845a200,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd8067c0a000,ffff800000a41580,fffffd806f6c82a0,0,0,fffffd806f6c8230) at ip6_output+0xd59 rip6_output(fffffd8067c0a000,fffffd807060f1a0,ffff800021979368,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 end trace frame: 0xffff800021979400, 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 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() at panic+0x15c sys/kern/subr_prf.c:207 witness_checkorder(ffffffff8262c5a8,9,0) at witness_checkorder+0x10cc sys/kern/subr_witness.c:820 __mp_lock(ffffffff8262c3a0) at __mp_lock+0xa1 pageflttrap() at pageflttrap+0x6f sys/arch/amd64/amd64/trap.c:162 kerntrap(ffff800021978c90) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd806e534854,fffffd807dffaf40) at alltraps_kern_meltdown+0x7b frag6_input(ffff800021978ff8,ffff800021979004,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800021978ff8,ffff800021979004,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800021978ff8,ffff800021979004,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800021978ff8,ffff800021979004,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806845a200) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806845a200,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd8067c0a000,ffff800000a41580,fffffd806f6c82a0,0,0,fffffd806f6c8230) at ip6_output+0xd59 rip6_output(fffffd8067c0a000,fffffd807060f1a0,ffff800021979368,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd807060f1a0,9,fffffd8067c0a000,0,0,ffff800020ab0018) at rip6_usrreq+0x5cd sys/netinet6/raw_ip6.c:670 sosend(fffffd807060f1a0,0,ffff800021979598,0,0,0) at sosend+0x668 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ab0018,3,ffff800021979598,0,ffff8000219796a0) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020ab0018,ffff800021979638,ffff8000219796a0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800021979710) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021979710) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,c,0,3,31f55602010) at Xsyscall+0x128 end of kernel end trace frame: 0x322319a51e0, count: -20 ddb{0}> show registers rdi 0xffffffff81ae7517 db_enter+0x17 rsi 0x30f9 __ALIGN_SIZE+0x20f9 rbp 0xffff8000219789f0 rbx 0xffff800021978aa0 rdx 0x30fa __ALIGN_SIZE+0x20fa rcx 0xffff800020b5a000 rax 0xffff800020b5a000 r8 0xffffffff81048ff3 kprintf+0x173 r9 0x1 r10 0x25 r11 0xb077aa6a18ca01c4 r12 0x3000000008 r13 0xffff800021978a00 r14 0x100 r15 0x1 rip 0xffffffff81ae7518 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000219789e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=409881 stat=onproc flags process=0 proc=4000000 pri=79, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab1b40,0xffffffff8262aaa8 process=0xffff800020adc380 user=0xffff800021974000, vmspace=0xfffffd807f00c730 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 1792 351987 46055 0 2 0 syz-executor.0 * 1792 409881 46055 0 7 0x4000000 syz-executor.0 68328 73755 57458 0 2 0 syz-executor.1 68328 406204 57458 0 7 0x4000000 syz-executor.1 57458 66920 57220 0 3 0x82 nanosleep syz-executor.1 46055 243310 57220 0 3 0x82 nanosleep syz-executor.0 75778 241241 0 0 3 0x14200 bored sosplice 57220 221371 50093 0 3 0x82 thrsleep syz-fuzzer 57220 236682 50093 0 3 0x4000082 nanosleep syz-fuzzer 57220 443316 50093 0 3 0x4000082 thrsleep syz-fuzzer 57220 345739 50093 0 3 0x4000082 thrsleep syz-fuzzer 57220 423421 50093 0 3 0x4000082 thrsleep syz-fuzzer 57220 8163 50093 0 3 0x4000082 kqread syz-fuzzer 57220 187466 50093 0 3 0x4000082 thrsleep syz-fuzzer 57220 495374 50093 0 3 0x4000082 thrsleep syz-fuzzer 57220 98451 50093 0 3 0x4000082 thrsleep syz-fuzzer 57220 516104 50093 0 3 0x4000082 thrsleep syz-fuzzer 50093 480868 25529 0 3 0x10008a pause ksh 25529 158412 72258 0 3 0x92 select sshd 60852 147027 1 0 3 0x100083 ttyin getty 72258 252754 1 0 3 0x80 select sshd 64313 63566 5110 74 3 0x100092 bpf pflogd 5110 303858 1 0 3 0x80 netio pflogd 44860 106424 99124 73 3 0x100090 kqread syslogd 99124 474758 1 0 3 0x100082 netio syslogd 6278 331265 1 77 3 0x100090 poll dhclient 29142 328602 1 0 3 0x80 poll dhclient 56695 144038 0 0 2 0x14200 zerothread 23969 163537 0 0 3 0x14200 aiodoned aiodoned 16723 332991 0 0 3 0x14200 syncer update 23783 175725 0 0 3 0x14200 cleaner cleaner 17145 136302 0 0 3 0x14200 reaper reaper 94976 251105 0 0 3 0x14200 pgdaemon pagedaemon 52310 412821 0 0 3 0x14200 bored crynlk 16510 430092 0 0 3 0x14200 bored crypto 95570 519799 0 0 3 0x40014200 acpi0 acpi0 14379 315662 0 0 3 0x40014200 idle1 37807 470883 0 0 3 0x14200 bored softnet 45687 46307 0 0 3 0x14200 bored systqmp 52644 272822 0 0 3 0x14200 bored systq 11844 191732 0 0 3 0x40014200 bored softclock 22322 272058 0 0 3 0x40014200 idle0 67339 484152 0 0 3 0x14200 bored smr 1 170005 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex /syzkaller/managers/multicore/kernel/sys/netinet6/frag6.c:57 r = 0 (0xffffffff824f84e0) #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 1792 (syz-executor.0) thread 0xffff800020ab0018 (409881) exclusive rwlock netlock r = 0 (0xffffffff8250b088) #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 (0xffffffff824f84e0) #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 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9554 6574K 7129K 78643K 14206 0 0 pcb 14 8K 8K 78643K 177 0 0 rtable 111 4K 4K 78643K 796 0 0 ifaddr 66 14K 15K 78643K 267 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1546 0 0 iov 0 0K 32K 78643K 122 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 77K 78643K 2523 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 3 5K 5K 78643K 26 0 0 VM map 2 1K 1K 78643K 4 0 0 sem 12 0K 0K 78643K 179 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 1487 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 55 51K 83K 78643K 774 0 0 subproc 32 2K 2K 78643K 136 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 98 0 0 in_multi 33 2K 2K 78643K 150 0 0 ether_multi 1 0K 0K 78643K 13 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 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 404 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 102 21K 30K 78643K 5659 0 0 UVM aobj 48 2K 2K 78643K 53 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 2 0K 1K 78643K 175 0 0 NDP 14 0K 0K 78643K 79 0 0 temp 186 3556K 3628K 78643K 21658 0 0 kqueue 0 0K 0K 78643K 12 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 18 0 12 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 85 0 83 1 0 1 1 0 8 0 rtentry 112 112 0 68 2 0 2 2 0 8 0 unpcb 120 469 0 459 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9090 0 9090 2 2 0 2 0 8 0 tcpcb 544 312 0 307 1 0 1 1 0 8 0 inpcb 280 847 0 839 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 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 24 0 18 1 0 1 1 0 8 0 pkpcb 40 12 0 12 3 3 0 1 0 8 0 ppxss 1128 37 0 37 4 4 0 1 0 8 0 pffrag 232 6 0 6 2 2 0 1 0 482 0 pffrnode 88 6 0 6 2 2 0 1 0 8 0 pffrent 40 15 0 15 2 2 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 68 0 38 1 0 1 1 0 8 0 pfstkey 112 68 0 38 2 0 2 2 0 8 0 pfstate 328 68 0 38 4 0 4 4 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 469 0 277 14 2 12 13 0 8 0 art_table 32 470 0 277 2 0 2 2 0 8 0 art_node 16 111 0 71 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 10 1 0 1 1 0 8 0 semapl 112 177 0 167 1 0 1 1 0 8 0 shmpl 112 51 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3625 0 2209 47 0 47 47 0 8 0 ffsino 272 3625 0 2209 96 0 96 96 0 8 0 nchpl 144 5811 0 4176 62 0 62 62 0 8 0 uvmvnodes 72 4586 0 0 84 0 84 84 0 8 0 vnodes 200 4586 0 0 242 0 242 242 0 8 0 namei 1024 18345 0 18345 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 vmpool 552 2 0 2 1 1 0 1 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 15571 0 15571 13 12 1 7 0 8 1 plimitpl 152 151 0 143 1 0 1 1 0 8 0 sigapl 432 1669 0 1653 3 1 2 3 0 8 0 futexpl 56 18067 0 18067 1 0 1 1 0 8 1 knotepl 112 365 0 346 1 0 1 1 0 8 0 kqueuepl 104 275 0 273 1 0 1 1 0 8 0 pipepl 112 896 0 877 2 1 1 2 0 8 0 fdescpl 488 1670 0 1653 3 0 3 3 0 8 0 filepl 152 9234 0 9133 8 3 5 6 0 8 1 lockfpl 104 482 0 482 3 2 1 1 0 8 1 lockfspl 48 162 0 162 3 2 1 1 0 8 1 sessionpl 112 24 0 13 1 0 1 1 0 8 0 pgrppl 48 34 0 23 1 0 1 1 0 8 0 ucredpl 96 1524 0 1515 1 0 1 1 0 8 0 zombiepl 144 1653 0 1653 3 2 1 1 0 8 1 processpl 896 1686 0 1653 4 0 4 4 0 8 0 procpl 632 4604 0 4560 8 3 5 5 0 8 1 srpgc 64 13 0 13 5 5 0 1 0 8 0 sosppl 128 23 0 23 6 6 0 1 0 8 0 sockpl 384 1433 0 1413 6 3 3 4 0 8 0 mcl64k 65536 262 0 0 33 2 31 33 0 8 1 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 186 0 0 23 2 21 23 0 8 0 mtagpl 80 18 0 0 1 0 1 1 0 8 0 mbufpl 256 419 0 0 22 0 22 22 0 8 0 bufpl 256 8262 0 1243 439 0 439 439 0 8 0 anonpl 16 165993 0 153237 94 26 68 68 0 124 13 amapchunkpl 152 9871 0 9762 15 7 8 10 0 158 1 amappl16 192 7874 0 7170 76 32 44 48 0 8 8 amappl15 184 257 0 257 2 2 0 1 0 8 0 amappl14 176 598 0 590 1 0 1 1 0 8 0 amappl13 168 399 0 399 2 2 0 1 0 8 0 amappl12 160 15 0 13 1 0 1 1 0 8 0 amappl11 152 78 0 63 1 0 1 1 0 8 0 amappl10 144 85 0 80 1 0 1 1 0 8 0 amappl9 136 974 0 971 1 0 1 1 0 8 0 amappl8 128 512 0 488 1 0 1 1 0 8 0 amappl7 120 72 0 65 1 0 1 1 0 8 0 amappl6 112 75 0 65 1 0 1 1 0 8 0 amappl5 104 177 0 162 1 0 1 1 0 8 0 amappl4 96 2190 0 2159 2 1 1 2 0 8 0 amappl3 88 877 0 865 1 0 1 1 0 8 0 amappl2 80 12127 0 12045 3 0 3 3 0 8 0 amappl1 72 45431 0 44987 24 14 10 19 0 8 0 amappl 80 4966 0 4927 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 52 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1672 0 1653 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1672 0 1653 1 0 1 1 0 8 0 vmmpekpl 168 15815 0 15784 2 0 2 2 0 8 0 vmmpepl 168 207939 0 206014 180 88 92 120 0 357 8 vmsppl 368 1669 0 1653 2 0 2 2 0 8 0 pdppl 4096 3351 0 3310 8 2 6 6 0 8 0 pvpl 32 462094 0 446076 225 58 167 167 0 265 35 pmappl 232 1671 0 1655 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 653 0 13 19 0 19 19 0 8 0