spanic: kernel diagnostic assertion "_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_event.c", line 1076 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 35556 30286 0 0 0 1 syz-executor.0 *138178 61528 0 0x14000 0x200 0 smr db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 __assert(ffffffff81f8d87b,ffffffff81f8556f,434,ffffffff81f979c3) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806ec4cc40) at knote_enqueue+0x216 sys/kern/kern_event.c:1076 knote(ffffffff82365100,1000000) at knote+0xbd sys/kern/kern_event.c:957 selwakeup(ffffffff82365100) at selwakeup+0x3b sys/kern/sys_generic.c:795 logwakeup() at logwakeup+0x3b sys/kern/subr_log.c:310 printf(ffffffff81f8117a) at printf+0x9f sys/kern/subr_prf.c:519 smr_thread(ffff800020ac19c8) at smr_thread+0x335 sys/kern/kern_smr.c:114 end trace frame: 0x0, count: 6 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 kernel diagnostic assertion "_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_event.c", line 1076 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:208 __assert(ffffffff81f8d87b,ffffffff81f8556f,434,ffffffff81f979c3) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806ec4cc40) at knote_enqueue+0x216 sys/kern/kern_event.c:1076 knote(ffffffff82365100,1000000) at knote+0xbd sys/kern/kern_event.c:957 selwakeup(ffffffff82365100) at selwakeup+0x3b sys/kern/sys_generic.c:795 logwakeup() at logwakeup+0x3b sys/kern/subr_log.c:310 printf(ffffffff81f8117a) at printf+0x9f sys/kern/subr_prf.c:519 smr_thread(ffff800020ac19c8) at smr_thread+0x335 sys/kern/kern_smr.c:114 end trace frame: 0x0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020ac8d30 rbx 0xffff800020ac8de0 rdx 0xffff800020ac19c8 rcx 0 rax 0 r8 0xffffffff81887573 kprintf+0x173 r9 0x1 r10 0x25 r11 0xc446a409be04e4ae r12 0x3000000008 r13 0xffff800020ac8d40 r14 0x100 r15 0x1 rip 0xffffffff815672f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020ac8d20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (smr) pid=138178 stat=onproc flags process=14000 proc=200 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac1c20,0xffff800020ac12d0 process=0xffff800020ac2690 user=0xffff800020ac4000, vmspace=0xffffffff823822e0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 30286 35556 83518 0 7 0 syz-executor.0 30286 496975 83518 0 2 0x4000000 syz-executor.0 30286 363240 83518 0 2 0x4000000 syz-executor.0 75829 340737 14137 0 2 0 syz-executor.1 75829 399476 14137 0 2 0x4000000 syz-executor.1 83518 289726 82223 0 3 0x82 wait syz-executor.0 14137 30134 82223 0 3 0x82 wait syz-executor.1 15444 199002 0 0 3 0x14200 bored sosplice 82223 60087 23474 0 3 0x82 thrsleep syz-fuzzer 82223 257090 23474 0 3 0x4000082 nanosleep syz-fuzzer 82223 351504 23474 0 3 0x4000082 thrsleep syz-fuzzer 82223 231626 23474 0 3 0x4000082 thrsleep syz-fuzzer 82223 281932 23474 0 3 0x4000082 thrsleep syz-fuzzer 82223 522964 23474 0 2 0x4000082 syz-fuzzer 82223 325623 23474 0 3 0x4000082 thrsleep syz-fuzzer 82223 431585 23474 0 3 0x4000082 thrsleep syz-fuzzer 82223 65358 23474 0 3 0x4000082 thrsleep syz-fuzzer 82223 156406 23474 0 3 0x4000082 thrsleep syz-fuzzer 82223 277004 23474 0 3 0x4000082 kqread syz-fuzzer 23474 469942 55631 0 3 0x10008a pause ksh 55631 396995 27352 0 3 0x92 select sshd 50154 84998 1 0 3 0x100083 ttyin getty 27352 163327 1 0 3 0x80 select sshd 69321 362006 40995 74 3 0x100092 bpf pflogd 40995 402168 1 0 3 0x80 netio pflogd 3037 412959 38856 73 3 0x100090 kqread syslogd 38856 468294 1 0 3 0x100082 netio syslogd 85536 259479 1 77 3 0x100090 poll dhclient 73928 15999 1 0 3 0x80 poll dhclient 55932 401690 0 0 2 0x14200 zerothread 94890 427094 0 0 3 0x14200 aiodoned aiodoned 28585 4891 0 0 3 0x14200 syncer update 38890 165051 0 0 3 0x14200 cleaner cleaner 35196 373618 0 0 3 0x14200 reaper reaper 31934 345198 0 0 3 0x14200 pgdaemon pagedaemon 83678 14201 0 0 3 0x14200 bored crynlk 31250 349419 0 0 3 0x14200 bored crypto 57272 195438 0 0 3 0x40014200 acpi0 acpi0 35991 178799 0 0 3 0x40014200 idle1 17867 315410 0 0 2 0x14200 softnet 65209 450287 0 0 3 0x14200 bored systqmp 14650 333877 0 0 3 0x14200 bored systq 92365 34187 0 0 3 0x40014200 bored softclock 3962 283621 0 0 3 0x40014200 idle0 *61528 138178 0 0 7 0x14200 smr 1 118646 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 30286 (syz-executor.0) thread 0xffff800020b6fc38 (35556) exclusive rwlock vmmaplk r = 0 (0xfffffd807effe5b8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 rw_enter+0x414 sys/kern/kern_rwlock.c:278 #2 vm_map_lock_ln+0x10d sys/uvm/uvm_map.c:5260 #3 uvm_mapanon+0x1e6 sys/uvm/uvm_map.c:991 #4 sys_mmap+0xa9a uvm_mmapanon sys/uvm/uvm_mmap.c:921 [inline] #4 sys_mmap+0xa9a sys/uvm/uvm_mmap.c:421 #5 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #5 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82377bc0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 syscall+0x43a mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x43a sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9580 6442K 14625K 78643K 14794 0 0 pcb 25 9K 11K 78643K 761 0 0 rtable 100 3K 4K 78643K 986 0 0 ifaddr 80 17K 17K 78643K 322 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1519 0 0 iov 0 0K 24K 78643K 1208 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 76K 78643K 3341 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 36 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 284 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 2513 0 0 sigio 0 0K 0K 78643K 18 0 0 proc 54 51K 71K 78643K 808 0 0 subproc 64 65538K 67586K 78643K 648 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 114 0 0 in_multi 33 2K 2K 78643K 250 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 8 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 379 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 90 21K 30K 78643K 8414 0 0 UVM aobj 98 5K 5K 78643K 102 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 75 0 0 NDP 19 0K 0K 78643K 110 0 0 temp 221 2716K 2786K 78643K 10860 0 0 kqueue 0 0K 0K 78643K 18 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 21 0 17 1 0 1 1 0 8 0 inpcbpl 280 954 0 947 2 1 1 2 0 8 0 plimitpl 152 102 0 94 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 194 0 154 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 12 0 12 1 1 0 1 0 8 0 tcpcb 544 197 0 193 1 0 1 1 0 8 0 nd6 48 38 0 34 1 0 1 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 28 0 28 6 6 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 45 0 38 1 0 1 1 0 8 0 pfstkey 112 45 0 38 1 0 1 1 0 8 0 pfstate 328 45 0 38 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 917 0 726 12 0 12 12 0 8 0 art_table 32 918 0 726 2 0 2 2 0 8 0 art_node 16 193 0 159 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 277 0 267 1 0 1 1 0 8 0 shmpl 112 100 0 4 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6152 0 4684 49 1 48 48 0 8 0 ffsino 272 6152 0 4684 102 3 99 99 0 8 0 nchpl 144 9774 0 8106 62 0 62 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 28205 0 28205 2 2 0 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 26117 0 26117 18 15 3 6 0 8 3 sigapl 432 2661 0 2645 2 0 2 2 0 8 0 futexpl 56 25052 0 25052 1 1 0 1 0 8 0 knotepl 112 634 0 615 2 1 1 2 0 8 0 kqueuepl 104 303 0 301 1 0 1 1 0 8 0 pipepl 112 1192 0 1173 3 2 1 2 0 8 0 fdescpl 488 2662 0 2645 4 1 3 3 0 8 0 filepl 152 13147 0 13047 8 4 4 7 0 8 0 lockfpl 104 501 0 501 4 4 0 1 0 8 0 lockfspl 32 182 0 182 4 4 0 1 0 8 0 sessionpl 112 35 0 24 1 0 1 1 0 8 0 pgrppl 48 53 0 42 1 0 1 1 0 8 0 ucredpl 96 1651 0 1642 1 0 1 1 0 8 0 zombiepl 144 2645 0 2645 3 3 0 1 0 8 0 processpl 840 2678 0 2645 4 0 4 4 0 8 0 procpl 600 7359 0 7313 4 0 4 4 0 8 0 srpgc 64 102 0 102 8 8 0 1 0 8 0 sosppl 128 11 0 11 5 5 0 1 0 8 0 sockpl 384 1574 0 1555 5 3 2 4 0 8 0 mcl64k 65536 350 0 0 37 3 34 34 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 10 0 0 1 0 1 1 0 8 0 mcl8k 8192 13 0 0 2 0 2 2 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 129 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 467 0 0 21 0 21 21 0 8 0 bufpl 256 10001 0 2981 439 0 439 439 0 8 0 anonpl 16 257991 0 242735 102 40 62 62 0 125 0 amapchunkpl 152 15115 0 14994 34 28 6 10 0 158 0 amappl16 192 12358 0 11437 80 33 47 47 0 8 0 amappl15 184 868 0 867 3 2 1 1 0 8 0 amappl14 176 79 0 77 2 1 1 1 0 8 0 amappl13 168 283 0 283 5 5 0 1 0 8 0 amappl12 160 1071 0 1068 2 1 1 1 0 8 0 amappl11 152 347 0 328 1 0 1 1 0 8 0 amappl10 144 73 0 69 1 0 1 1 0 8 0 amappl9 136 832 0 828 1 0 1 1 0 8 0 amappl8 128 400 0 383 1 0 1 1 0 8 0 amappl7 120 70 0 63 1 0 1 1 0 8 0 amappl6 112 378 0 372 1 0 1 1 0 8 0 amappl5 104 1226 0 1210 1 0 1 1 0 8 0 amappl4 96 2084 0 2052 2 1 1 2 0 8 0 amappl3 88 1100 0 1094 1 0 1 1 0 8 0 amappl2 80 22521 0 22455 2 0 2 2 0 8 0 amappl1 72 63947 0 63487 26 16 10 20 0 8 0 amappl 72 7751 0 7713 1 0 1 1 0 75 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 101 0 4 2 0 2 2 0 8 0 uaddrrnd 24 2662 0 2645 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2662 0 2645 1 0 1 1 0 8 0 vmmpekpl 168 22338 0 22312 2 0 2 2 0 8 0 vmmpepl 168 286952 0 284936 162 69 93 99 0 357 5 vmsppl 360 2661 0 2645 2 0 2 2 0 8 0 pdppl 4096 5332 0 5290 7 1 6 6 0 8 0 pvpl 32 757476 0 738418 227 73 154 155 0 265 0 pmappl 232 2661 0 2645 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 648 0 12 19 0 19 19 0 8 0