panic: 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 327654 6356 0 0x14000 0x200 0K reaper *206530 27566 0 0x14000 0x200 1 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(ffffffff81f8d574,ffffffff81f8855b,434,ffffffff81f97a51) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806eb89e00) at knote_enqueue+0x216 sys/kern/kern_event.c:1076 knote(ffffffff8234bf68,1000000) at knote+0xbd sys/kern/kern_event.c:957 selwakeup(ffffffff8234bf68) at selwakeup+0x3b sys/kern/sys_generic.c:795 logwakeup() at logwakeup+0x3b sys/kern/subr_log.c:310 printf(ffffffff81f837b0) at printf+0x9f sys/kern/subr_prf.c:519 smr_thread(ffff800020ac1770) 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic kernel diagnostic assertion "_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_event.c", line 1076 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:208 __assert(ffffffff81f8d574,ffffffff81f8855b,434,ffffffff81f97a51) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806eb89e00) at knote_enqueue+0x216 sys/kern/kern_event.c:1076 knote(ffffffff8234bf68,1000000) at knote+0xbd sys/kern/kern_event.c:957 selwakeup(ffffffff8234bf68) at selwakeup+0x3b sys/kern/sys_generic.c:795 logwakeup() at logwakeup+0x3b sys/kern/subr_log.c:310 printf(ffffffff81f837b0) at printf+0x9f sys/kern/subr_prf.c:519 smr_thread(ffff800020ac1770) at smr_thread+0x335 sys/kern/kern_smr.c:114 end trace frame: 0x0, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020ac9230 rbx 0xffff800020ac92e0 rdx 0xffff800020ac1770 rcx 0 rax 0 r8 0xffffffff8100bbb3 kprintf+0x173 r9 0x1 r10 0x25 r11 0xcd873dade0eb13fc r12 0x3000000008 r13 0xffff800020ac9240 r14 0x100 r15 0x1 rip 0xffffffff8137a588 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020ac9220 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (smr) pid=206530 stat=onproc flags process=14000 proc=200 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac1c20,0xffff800020ac1078 process=0xffff800020ac33b0 user=0xffff800020ac4000, vmspace=0xffffffff82389a28 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 96134 115327 62475 0 2 0 syz-executor.1 96134 478407 62475 0 3 0x4000080 pipewr syz-executor.1 96134 168845 62475 0 3 0x4000080 fsleep syz-executor.1 96134 457840 62475 0 2 0x4000080 syz-executor.1 62475 470889 30403 0 3 0x82 wait syz-executor.1 98807 212685 30403 0 3 0x82 wait syz-executor.0 30403 482595 78828 0 2 0x482 syz-fuzzer 30403 345456 78828 0 2 0x4000082 syz-fuzzer 30403 437952 78828 0 3 0x4000082 thrsleep syz-fuzzer 30403 341004 78828 0 3 0x4000082 thrsleep syz-fuzzer 30403 234143 78828 0 3 0x4000082 thrsleep syz-fuzzer 30403 373731 78828 0 3 0x4000082 thrsleep syz-fuzzer 30403 327844 78828 0 3 0x4000082 thrsleep syz-fuzzer 30403 197336 78828 0 3 0x4000082 kqread syz-fuzzer 30403 484928 78828 0 3 0x4000082 thrsleep syz-fuzzer 30403 73975 78828 0 3 0x4000082 thrsleep syz-fuzzer 78828 419256 97228 0 3 0x10008a pause ksh 97228 148464 90212 0 3 0x92 select sshd 15464 65959 1 0 3 0x100083 ttyin getty 90212 463096 1 0 3 0x80 select sshd 72362 48780 18105 74 3 0x100092 bpf pflogd 18105 322107 1 0 3 0x80 netio pflogd 26127 303659 21341 73 3 0x100090 kqread syslogd 21341 106197 1 0 3 0x100082 netio syslogd 85338 231521 1 77 3 0x100090 poll dhclient 91790 416123 1 0 3 0x80 poll dhclient 27017 117959 0 0 2 0x14200 zerothread 56313 171853 0 0 3 0x14200 aiodoned aiodoned 70873 173709 0 0 3 0x14200 syncer update 61826 170850 0 0 3 0x14200 cleaner cleaner 6356 327654 0 0 7 0x14200 reaper 44559 64611 0 0 3 0x14200 pgdaemon pagedaemon 94290 503162 0 0 3 0x14200 bored crynlk 63973 291519 0 0 3 0x14200 bored crypto 18055 462124 0 0 3 0x40014200 acpi0 acpi0 86642 400089 0 0 3 0x40014200 idle1 39941 514093 0 0 3 0x14200 bored softnet 49443 12256 0 0 3 0x14200 bored systqmp 18499 249734 0 0 3 0x14200 bored systq 65684 162312 0 0 3 0x40014200 bored softclock 17788 95596 0 0 3 0x40014200 idle0 *27566 206530 0 0 7 0x14200 smr 1 306964 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 0: exclusive mutex &pmap->pm_mtx r = 0 (0xfffffd807f00bbd8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 pmap_do_remove+0x88 rcr3 sys/arch/amd64/compile/SYZKALLER/obj/machine/cpufunc.h:141 [inline] #3 pmap_do_remove+0x88 pmap_map_ptes sys/arch/amd64/amd64/pmap.c:418 [inline] #3 pmap_do_remove+0x88 sys/arch/amd64/amd64/pmap.c:1689 #4 uvm_map_teardown+0x195 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:206 [inline] #4 uvm_map_teardown+0x195 sys/uvm/uvm_map.c:2640 #5 uvmspace_free+0x86 sys/uvm/uvm_map.c:3509 #6 uvm_exit+0x29 sys/uvm/uvm_glue.c:297 #7 reaper+0x170 sys/kern/kern_exit.c:431 #8 proc_trampoline+0x1c ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9471 6390K 6519K 78643K 10625 0 0 pcb 25 9K 10K 78643K 81 0 0 rtable 108 4K 4K 78643K 222 0 0 ifaddr 43 11K 11K 78643K 53 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1473 0 0 iov 0 0K 12K 78643K 3 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 75K 78643K 1226 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 8 0K 0K 78643K 10 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 70 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 52 50K 71K 78643K 359 0 0 subproc 64 65538K 67586K 78643K 68 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 4 0 0 in_multi 33 2K 2K 78643K 34 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 36 159K 159K 78643K 36 0 0 exec 0 0K 1K 78643K 212 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 89 21K 21K 78643K 1064 0 0 UVM aobj 6 2K 2K 78643K 6 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 2 0 0 NDP 7 0K 0K 78643K 13 0 0 temp 96 2704K 2768K 78643K 3413 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 inpcbpl 280 55 0 48 1 0 1 1 0 8 0 plimitpl 152 17 0 9 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 16 0 12 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 1 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 11 0 2 1 0 1 1 0 8 0 pfstkey 112 11 0 2 1 0 1 1 0 8 0 pfstate 328 11 0 2 1 0 1 1 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 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 6 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1495 0 76 46 0 46 46 0 8 0 ffsino 272 1495 0 76 95 0 95 95 0 8 0 nchpl 144 1775 0 138 61 0 61 61 0 8 0 uvmvnodes 72 1552 0 0 29 0 29 29 0 8 0 vnodes 200 1552 0 0 82 0 82 82 0 8 0 namei 1024 4604 0 4604 3 3 0 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4634 0 4632 8 7 1 6 0 8 0 sigapl 432 269 0 254 3 1 2 3 0 8 0 futexpl 56 553 0 552 2 1 1 1 0 8 0 knotepl 112 56 0 37 1 0 1 1 0 8 0 kqueuepl 104 14 0 12 1 0 1 1 0 8 0 pipepl 112 178 0 151 2 1 1 1 0 8 0 fdescpl 488 270 0 254 3 0 3 3 0 8 0 filepl 152 1324 0 1217 6 1 5 5 0 8 0 lockfpl 104 27 0 27 2 1 1 1 0 8 1 lockfspl 32 11 0 11 2 1 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 93 0 84 1 0 1 1 0 8 0 zombiepl 144 254 0 253 4 3 1 1 0 8 0 processpl 840 285 0 253 4 0 4 4 0 8 0 procpl 600 375 0 331 4 0 4 4 0 8 0 sockpl 384 117 0 98 4 2 2 3 0 8 0 mcl64k 65536 256 0 0 32 0 32 32 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 117 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 329 0 0 20 0 20 20 0 8 0 bufpl 256 5840 0 1165 293 0 293 293 0 8 0 anonpl 16 39378 0 25517 61 2 59 59 0 125 0 amapchunkpl 152 1277 0 1160 7 2 5 6 0 158 0 amappl16 192 1066 0 306 41 0 41 41 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 49 0 45 2 1 1 1 0 8 0 amappl13 168 7 0 6 1 0 1 1 0 8 0 amappl12 160 18 0 15 1 0 1 1 0 8 0 amappl11 152 73 0 52 2 1 1 2 0 8 0 amappl10 144 72 0 69 1 0 1 1 0 8 0 amappl9 136 589 0 586 1 0 1 1 0 8 0 amappl8 128 129 0 117 1 0 1 1 0 8 0 amappl7 120 32 0 30 1 0 1 1 0 8 0 amappl6 112 73 0 66 1 0 1 1 0 8 0 amappl5 104 137 0 123 1 0 1 1 0 8 0 amappl4 96 501 0 468 2 1 1 2 0 8 0 amappl3 88 157 0 146 1 0 1 1 0 8 0 amappl2 80 1059 0 992 3 1 2 2 0 8 0 amappl1 72 15715 0 15251 25 15 10 20 0 8 0 amappl 72 629 0 586 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 270 0 254 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 270 0 254 1 0 1 1 0 8 0 vmmpekpl 168 6240 0 6215 2 0 2 2 0 8 0 vmmpepl 168 36796 0 34930 105 15 90 91 0 357 6 vmsppl 360 269 0 253 2 0 2 2 0 8 0 pdppl 4096 547 0 506 7 1 6 6 0 8 0 pvpl 32 134892 0 121296 153 5 148 148 0 265 34 pmappl 232 269 0 253 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 487 0 7 14 0 14 14 0 8 0