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 * 95792 96605 0 0 0x4000000 0 syz-executor.1 103033 25095 0 0 0 1 syz-executor.0 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(ffffffff8261f770,9,0) at witness_checkorder+0x10cc sys/kern/subr_witness.c:820 __mp_lock(ffffffff8261f568) at __mp_lock+0xa1 pageflttrap() at pageflttrap+0x6f sys/arch/amd64/amd64/trap.c:162 kerntrap(ffff800023da6a40) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd8007dd4854,fffffd8068333ef8) at alltraps_kern_meltdown+0x7b frag6_input(ffff800023da6da8,ffff800023da6db4,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800023da6da8,ffff800023da6db4,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800023da6da8,ffff800023da6db4,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800023da6da8,ffff800023da6db4,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806881ba00) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806881ba00,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd806881c600,ffff800000a41f80,fffffd806fcc2a50,0,0,fffffd806fcc29e0) at ip6_output+0xd59 rip6_output(fffffd806881c600,fffffd80706921b0,ffff800023da7118,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 end trace frame: 0xffff800023da71b0, 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(ffffffff8261f770,9,0) at witness_checkorder+0x10cc sys/kern/subr_witness.c:820 __mp_lock(ffffffff8261f568) at __mp_lock+0xa1 pageflttrap() at pageflttrap+0x6f sys/arch/amd64/amd64/trap.c:162 kerntrap(ffff800023da6a40) at kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 alltraps_kern_meltdown(6,0,600,0,fffffd8007dd4854,fffffd8068333ef8) at alltraps_kern_meltdown+0x7b frag6_input(ffff800023da6da8,ffff800023da6db4,2c,18) at frag6_input+0x7d2 sys/netinet6/frag6.c:321 ip_deliver(ffff800023da6da8,ffff800023da6db4,2c,18) at ip_deliver+0x353 sys/netinet/ip_input.c:665 ip6_input_if(ffff800023da6da8,ffff800023da6db4,29,0,ffff80000066d000) at ip6_input_if+0x17d4 ip6_ours sys/netinet6/ip6_input.c:518 [inline] ip6_input_if(ffff800023da6da8,ffff800023da6db4,29,0,ffff80000066d000) at ip6_input_if+0x17d4 sys/netinet6/ip6_input.c:340 ipv6_input(ffff80000066d000,fffffd806881ba00) at ipv6_input+0x48 sys/netinet6/ip6_input.c:171 if_input_local(ffff80000066d000,fffffd806881ba00,18) at if_input_local+0x121 sys/net/if.c:783 ip6_output(fffffd806881c600,ffff800000a41f80,fffffd806fcc2a50,0,0,fffffd806fcc29e0) at ip6_output+0xd59 rip6_output(fffffd806881c600,fffffd80706921b0,ffff800023da7118,0) at rip6_output+0x4c0 sys/netinet6/raw_ip6.c:481 rip6_usrreq(fffffd80706921b0,9,fffffd806881c600,0,0,ffff800020ab0018) at rip6_usrreq+0x5cd sys/netinet6/raw_ip6.c:670 sosend(fffffd80706921b0,0,ffff800023da7348,0,0,0) at sosend+0x668 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ab0018,3,ffff800023da7348,0,ffff800023da7450) at dofilewritev+0x1ac sys/kern/sys_generic.c:364 sys_write(ffff800020ab0018,ffff800023da73e8,ffff800023da7450) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800023da74c0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023da74c0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,c,0,3,d33851fd010) at Xsyscall+0x128 end of kernel end trace frame: 0xd361119e610, count: -20 ddb{0}> show registers rdi 0xffffffff819f49b7 db_enter+0x17 rsi 0x2f76 __ALIGN_SIZE+0x1f76 rbp 0xffff800023da67a0 rbx 0xffff800023da6850 rdx 0x2f77 __ALIGN_SIZE+0x1f77 rcx 0xffff800021b64000 rax 0xffff800021b64000 r8 0xffffffff81788e23 kprintf+0x173 r9 0x1 r10 0x25 r11 0xf4810cd825b5ca55 r12 0x3000000008 r13 0xffff800023da67b0 r14 0x100 r15 0x1 rip 0xffffffff819f49b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023da6790 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=95792 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab0508,0xffff800020ab02a0 process=0xffff800020add500 user=0xffff800023da2000, 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 96605 214029 38077 0 2 0 syz-executor.1 *96605 95792 38077 0 7 0x4000000 syz-executor.1 25095 103033 16970 0 7 0 syz-executor.0 25095 296840 16970 0 3 0x4000080 netio syz-executor.0 25095 228050 16970 0 2 0x4000000 syz-executor.0 16970 325085 34344 0 3 0x82 nanosleep syz-executor.0 38077 8116 34344 0 3 0x82 nanosleep syz-executor.1 35384 271285 0 0 3 0x14200 bored sosplice 34344 164260 44572 0 3 0x82 kqread syz-fuzzer 34344 303490 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 217194 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 274944 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 208994 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 423052 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 428109 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 134617 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 5216 44572 0 3 0x4000082 thrsleep syz-fuzzer 34344 49439 44572 0 3 0x4000082 thrsleep syz-fuzzer 44572 119755 36203 0 3 0x10008a pause ksh 36203 66635 13038 0 3 0x92 select sshd 9441 321205 1 0 3 0x100083 ttyin getty 13038 384547 1 0 3 0x80 select sshd 39130 298683 99574 74 3 0x100092 bpf pflogd 99574 184268 1 0 3 0x80 netio pflogd 76656 445844 9448 73 3 0x100090 kqread syslogd 9448 431308 1 0 3 0x100082 netio syslogd 97006 395680 1 77 3 0x100090 poll dhclient 18468 87485 1 0 3 0x80 poll dhclient 75452 230138 0 0 2 0x14200 zerothread 25516 407894 0 0 3 0x14200 aiodoned aiodoned 13343 74812 0 0 3 0x14200 syncer update 51784 416289 0 0 3 0x14200 cleaner cleaner 19785 45878 0 0 3 0x14200 reaper reaper 31341 402399 0 0 3 0x14200 pgdaemon pagedaemon 16803 356286 0 0 3 0x14200 bored crynlk 54413 492750 0 0 3 0x14200 bored crypto 48338 310763 0 0 3 0x40014200 acpi0 acpi0 11139 240368 0 0 3 0x40014200 idle1 8536 198892 0 0 3 0x14200 bored softnet 58757 268415 0 0 3 0x14200 bored systqmp 26083 131493 0 0 3 0x14200 bored systq 8578 204151 0 0 3 0x40014200 bored softclock 78834 385084 0 0 3 0x40014200 idle0 60264 23620 0 0 3 0x14200 bored smr 1 8090 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 (0xffffffff824d5590) #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 96605 (syz-executor.1) thread 0xffff800020ab0018 (95792) exclusive rwlock netlock r = 0 (0xffffffff824d5128) #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 (0xffffffff824d5590) #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 9538 6422K 7193K 78643K 15709 0 0 pcb 14 8K 8K 78643K 292 0 0 rtable 108 4K 4K 78643K 1025 0 0 ifaddr 69 16K 16K 78643K 388 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1510 0 0 iov 0 0K 24K 78643K 323 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1208 76K 77K 78643K 3224 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 45 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 260 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 3602 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 54 51K 83K 78643K 987 0 0 subproc 32 2K 2K 78643K 119 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 203 0 0 in_multi 33 2K 2K 78643K 194 0 0 ether_multi 1 0K 0K 78643K 16 0 0 mrt 0 0K 0K 78643K 16 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 576 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 114 22K 30K 78643K 9585 0 0 UVM aobj 111 3K 3K 78643K 111 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 375 0 0 NDP 15 0K 0K 78643K 125 0 0 temp 194 3552K 3620K 78643K 16641 0 0 kqueue 0 0K 0K 78643K 4 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 15 0 9 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 99 0 97 1 0 1 1 0 8 0 rtentry 112 94 0 50 2 0 2 2 0 8 0 unpcb 120 581 0 569 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 145 0 145 12 12 0 1 0 8 0 tcpcb 544 710 0 705 1 0 1 1 0 8 0 inpcb 280 1689 0 1671 2 0 2 2 0 8 0 rttmr 72 4 0 4 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 18 0 12 1 0 1 1 0 8 0 pkpcb 40 5 0 5 1 1 0 1 0 8 0 swfcl 56 12 0 0 1 0 1 1 0 8 0 ppxss 1128 96 0 94 1 0 1 1 0 8 0 pffrag 232 10 0 10 2 1 1 1 0 482 1 pffrnode 88 10 0 10 2 1 1 1 0 8 1 pffrent 40 20 0 20 2 1 1 1 0 8 1 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 63 0 41 1 0 1 1 0 8 0 pfstkey 112 63 0 41 1 0 1 1 0 8 0 pfstate 328 63 0 40 3 1 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 465 0 271 14 1 13 14 0 8 0 art_table 32 466 0 271 2 0 2 2 0 8 0 art_node 16 93 0 53 1 0 1 1 0 8 0 sysvmsgpl 40 88 0 48 1 0 1 1 0 8 0 semapl 112 258 0 248 1 0 1 1 0 8 0 shmpl 112 109 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7191 0 5742 47 0 47 47 0 8 0 ffsino 272 7191 0 5742 97 0 97 97 0 8 0 nchpl 144 11734 0 10101 62 1 61 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 31657 0 31657 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 9 0 9 2 2 0 1 0 8 0 scxspl 192 38523 0 38523 19 16 3 7 0 8 3 plimitpl 152 189 0 181 1 0 1 1 0 8 0 sigapl 432 3788 0 3772 3 1 2 3 0 8 0 futexpl 56 27576 0 27576 1 0 1 1 0 8 1 knotepl 112 626 0 607 1 0 1 1 0 8 0 kqueuepl 104 428 0 426 1 0 1 1 0 8 0 pipepl 112 644 0 625 1 0 1 1 0 8 0 fdescpl 488 3789 0 3772 3 0 3 3 0 8 0 filepl 152 14313 0 14211 8 3 5 5 0 8 1 lockfpl 104 546 0 546 8 7 1 1 0 8 1 lockfspl 48 215 0 215 8 7 1 1 0 8 1 sessionpl 112 23 0 12 1 0 1 1 0 8 0 pgrppl 48 23 0 12 1 0 1 1 0 8 0 ucredpl 96 3409 0 3400 1 0 1 1 0 8 0 zombiepl 144 3772 0 3772 1 0 1 1 0 8 1 processpl 896 3805 0 3772 4 0 4 4 0 8 0 procpl 632 8475 0 8430 10 5 5 5 0 8 1 srpgc 64 12 0 12 3 3 0 1 0 8 0 sosppl 128 64 0 64 3 3 0 1 0 8 0 sockpl 384 2379 0 2357 7 4 3 3 0 8 0 mcl64k 65536 12 0 0 2 0 2 2 0 8 0 mcl12k 12288 22 0 0 2 0 2 2 0 8 0 mcl9k 9216 5 0 0 1 0 1 1 0 8 0 mcl8k 8192 22 0 0 3 1 2 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 147 0 0 14 1 13 14 0 8 0 mtagpl 80 64 0 0 2 0 2 2 0 8 0 mbufpl 256 699 0 0 36 0 36 36 0 8 0 bufpl 256 15456 0 8437 439 0 439 439 0 8 0 anonpl 16 313461 0 309256 60 11 49 49 0 124 24 amapchunkpl 152 16193 0 16100 24 19 5 18 0 158 0 amappl16 192 18120 0 17952 39 22 17 33 0 8 8 amappl15 184 929 0 927 1 0 1 1 0 8 0 amappl14 176 1213 0 1200 1 0 1 1 0 8 0 amappl13 168 1325 0 1324 1 0 1 1 0 8 0 amappl12 160 15 0 13 1 0 1 1 0 8 0 amappl11 152 922 0 907 1 0 1 1 0 8 0 amappl10 144 185 0 177 1 0 1 1 0 8 0 amappl9 136 701 0 698 1 0 1 1 0 8 0 amappl8 128 361 0 323 3 1 2 2 0 8 0 amappl7 120 151 0 143 1 0 1 1 0 8 0 amappl6 112 925 0 917 1 0 1 1 0 8 0 amappl5 104 321 0 308 1 0 1 1 0 8 0 amappl4 96 4443 0 4409 2 1 1 2 0 8 0 amappl3 88 2315 0 2298 1 0 1 1 0 8 0 amappl2 80 29270 0 29187 3 1 2 3 0 8 0 amappl1 72 74573 0 74113 26 16 10 20 0 8 0 amappl 80 8830 0 8793 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 110 0 0 2 0 2 2 0 8 0 uaddrrnd 24 3789 0 3772 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3789 0 3772 1 0 1 1 0 8 0 vmmpekpl 168 19362 0 19326 2 0 2 2 0 8 0 vmmpepl 168 438057 0 436622 117 34 83 83 0 357 20 vmsppl 368 3788 0 3772 2 0 2 2 0 8 0 pdppl 4096 7585 0 7544 6 0 6 6 0 8 0 pvpl 32 1128130 0 1120656 215 87 128 128 0 265 56 pmappl 232 3788 0 3772 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 626 0 6 18 0 18 18 0 8 0