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 220135 8802 0 0 0 0 syz-executor.1 *251360 48335 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(ffffffff81f8c6ff,ffffffff81f82a81,434,ffffffff81f9666c) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806eb6ee00) at knote_enqueue+0x216 sys/kern/kern_event.c:1076 knote(ffffffff823352c8,1000000) at knote+0xbd sys/kern/kern_event.c:957 selwakeup(ffffffff823352c8) at selwakeup+0x3b sys/kern/sys_generic.c:795 logwakeup() at logwakeup+0x3b sys/kern/subr_log.c:310 printf(ffffffff81f81111) at printf+0x9f sys/kern/subr_prf.c:519 smr_thread(ffff800020ac1518) 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(ffffffff81f8c6ff,ffffffff81f82a81,434,ffffffff81f9666c) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806eb6ee00) at knote_enqueue+0x216 sys/kern/kern_event.c:1076 knote(ffffffff823352c8,1000000) at knote+0xbd sys/kern/kern_event.c:957 selwakeup(ffffffff823352c8) at selwakeup+0x3b sys/kern/sys_generic.c:795 logwakeup() at logwakeup+0x3b sys/kern/subr_log.c:310 printf(ffffffff81f81111) at printf+0x9f sys/kern/subr_prf.c:519 smr_thread(ffff800020ac1518) 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 0xffff800020ac9460 rbx 0xffff800020ac9510 rdx 0xffff800020ac1518 rcx 0 rax 0 r8 0xffffffff81a31603 kprintf+0x173 r9 0x1 r10 0x25 r11 0xbe58757295258e9 r12 0x3000000008 r13 0xffff800020ac9470 r14 0x100 r15 0x1 rip 0xffffffff8168bf78 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020ac9450 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (smr) pid=251360 stat=onproc flags process=14000 proc=200 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac1c20,0xffff800020ac12d0 process=0xffff800020ac2690 user=0xffff800020ac4000, vmspace=0xffffffff8233c230 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 82254 141968 84095 0 2 0x81000 syz-executor.0 82254 359334 84095 0 3 0x4081000 biowait syz-executor.0 82254 323327 84095 0 3 0x4003000 suspend syz-executor.0 8802 220135 66657 0 7 0 syz-executor.1 8802 62112 66657 0 2 0x4000000 syz-executor.1 8802 335981 66657 0 2 0x4000000 syz-executor.1 66657 468858 60575 0 3 0x82 wait syz-executor.1 45918 479846 1 0 3 0x100083 ttyin getty 84095 60035 60575 0 2 0x2 syz-executor.0 86691 476959 0 0 3 0x14200 bored sosplice 60575 186607 47423 0 3 0x82 thrsleep syz-fuzzer 60575 469234 47423 0 2 0x4000082 syz-fuzzer 60575 302436 47423 0 3 0x4000082 thrsleep syz-fuzzer 60575 146571 47423 0 3 0x4000082 thrsleep syz-fuzzer 60575 288472 47423 0 3 0x4000082 kqread syz-fuzzer 60575 443977 47423 0 3 0x4000082 thrsleep syz-fuzzer 60575 264941 47423 0 3 0x4000082 thrsleep syz-fuzzer 60575 414904 47423 0 2 0x4000082 syz-fuzzer 60575 298781 47423 0 3 0x4000082 thrsleep syz-fuzzer 60575 205215 47423 0 2 0x4000482 syz-fuzzer 47423 434983 10484 0 3 0x10008a pause ksh 10484 24599 56616 0 3 0x92 select sshd 56616 417383 1 0 3 0x80 select sshd 68342 378797 720 74 3 0x100092 bpf pflogd 720 27132 1 0 3 0x80 netio pflogd 87504 433628 13896 73 3 0x100090 kqread syslogd 13896 442409 1 0 3 0x100082 netio syslogd 71181 121745 1 77 3 0x100090 poll dhclient 37105 30380 1 0 3 0x80 poll dhclient 90284 458635 0 0 2 0x14200 zerothread 19535 343540 0 0 3 0x14200 aiodoned aiodoned 96892 256226 0 0 3 0x14200 syncer update 39852 59648 0 0 3 0x14200 cleaner cleaner 13837 166274 0 0 3 0x14200 reaper reaper 90100 460767 0 0 3 0x14200 pgdaemon pagedaemon 89197 446831 0 0 3 0x14200 bored crynlk 28111 495481 0 0 3 0x14200 bored crypto 65358 279952 0 0 3 0x40014200 acpi0 acpi0 5118 289867 0 0 3 0x40014200 idle1 71768 312164 0 0 2 0x14200 softnet 74216 361102 0 0 3 0x14200 bored systqmp 2567 265600 0 0 3 0x14200 bored systq 14740 456404 0 0 3 0x40014200 bored softclock 61941 255121 0 0 3 0x40014200 idle0 *48335 251360 0 0 7 0x14200 smr 1 471645 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 82254 (syz-executor.0) thread 0xffff800020b7c4c8 (359334) exclusive rrwlock inode r = 0 (0xfffffd80681523d8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 rw_enter+0x414 sys/kern/kern_rwlock.c:278 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:407 #3 ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x133 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+0x6a sys/kern/vfs_vops.c:449 #8 domkdirat+0x121 sys/kern/vfs_syscalls.c:2881 #9 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8065e27808) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 rw_enter+0x414 sys/kern/kern_rwlock.c:278 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:407 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xec sys/kern/vfs_lookup.c:387 #6 namei+0x45f sys/kern/vfs_lookup.c:224 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:2866 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9572 6446K 14768K 78643K 19918 0 0 pcb 25 9K 11K 78643K 1837 0 0 rtable 108 4K 4K 78643K 2259 0 0 ifaddr 75 18K 20K 78643K 600 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1659 0 0 iov 0 0K 40K 78643K 447 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1193 75K 76K 78643K 5036 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 0K 1K 78643K 541 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 25K 78643K 4093 0 0 sigio 0 0K 0K 78643K 60 0 0 proc 55 51K 71K 78643K 2094 0 0 subproc 64 65538K 69634K 78643K 1196 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 369 0 0 in_multi 33 2K 2K 78643K 491 0 0 ether_multi 1 0K 0K 78643K 25 0 0 mrt 0 0K 0K 78643K 18 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 865 0 0 pfkey data 0 0K 0K 78643K 2 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 113 22K 30K 78643K 14142 0 0 UVM aobj 130 5K 5K 78643K 137 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 215 0 0 NDP 17 0K 1K 78643K 206 0 0 temp 208 2716K 2787K 78643K 19070 0 0 kqueue 0 0K 0K 78643K 26 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 72 0 66 1 0 1 1 0 8 0 inpcbpl 280 1763 0 1755 2 1 1 2 0 8 0 plimitpl 152 223 0 215 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 409 0 365 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 570 0 565 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 105 0 99 1 0 1 1 0 8 0 ppxss 1128 64 0 64 16 16 0 1 0 8 0 pffrag 232 1 0 1 1 1 0 1 0 482 0 pffrnode 88 1 0 1 1 1 0 1 0 8 0 pffrent 40 5 0 5 3 3 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 54 0 48 1 0 1 1 0 8 0 pfstkey 112 54 0 48 1 0 1 1 0 8 0 pfstate 328 54 0 48 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 1706 0 1512 15 2 13 13 0 8 0 art_table 32 1707 0 1512 2 0 2 2 0 8 0 art_node 16 408 0 368 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 14 1 0 1 1 0 8 0 semapl 112 539 0 529 1 0 1 1 0 8 0 shmpl 112 135 0 7 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7411 0 5843 51 0 51 51 0 8 0 ffsino 272 7411 0 5843 106 1 105 105 0 8 0 nchpl 144 12874 0 11138 65 0 65 65 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 42883 0 42882 3 2 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 9 0 9 7 7 0 1 0 8 0 scxspl 192 38295 0 38292 24 23 1 6 0 8 0 sigapl 432 4197 0 4181 4 2 2 3 0 8 0 futexpl 56 45177 0 45177 2 1 1 1 0 8 1 knotepl 112 1381 0 1362 1 0 1 1 0 8 0 kqueuepl 104 876 0 874 1 0 1 1 0 8 0 pipepl 112 2402 0 2383 9 8 1 2 0 8 0 fdescpl 488 4198 0 4181 3 0 3 3 0 8 0 filepl 152 24028 0 23927 12 7 5 7 0 8 0 lockfpl 104 1245 0 1245 3 3 0 1 0 8 0 lockfspl 32 436 0 436 3 3 0 1 0 8 0 sessionpl 112 55 0 44 1 0 1 1 0 8 0 pgrppl 48 85 0 74 1 0 1 1 0 8 0 ucredpl 96 4378 0 4369 1 0 1 1 0 8 0 zombiepl 144 4181 0 4181 3 3 0 1 0 8 0 processpl 840 4214 0 4181 4 0 4 4 0 8 0 procpl 600 11896 0 11850 6 2 4 5 0 8 0 srpgc 64 199 0 199 14 14 0 1 0 8 0 sosppl 128 30 0 30 11 11 0 1 0 8 0 sockpl 384 3357 0 3337 11 9 2 4 0 8 0 mcl64k 65536 496 0 0 58 25 33 33 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 134 0 0 15 0 15 15 0 8 0 mtagpl 80 5 0 0 1 0 1 1 0 8 0 mbufpl 256 659 0 0 21 0 21 21 0 8 0 bufpl 256 13654 0 6634 439 0 439 439 0 8 0 anonpl 16 439079 0 423528 161 98 63 63 0 125 0 amapchunkpl 152 27984 0 27850 42 34 8 12 0 158 2 amappl16 192 21290 0 20429 147 103 44 44 0 8 0 amappl15 184 992 0 991 6 5 1 1 0 8 0 amappl14 176 1051 0 1050 2 1 1 1 0 8 0 amappl13 168 582 0 580 8 7 1 1 0 8 0 amappl12 160 306 0 306 4 4 0 1 0 8 0 amappl11 152 624 0 606 1 0 1 1 0 8 0 amappl10 144 489 0 482 1 0 1 1 0 8 0 amappl9 136 1223 0 1218 1 0 1 1 0 8 0 amappl8 128 701 0 671 2 0 2 2 0 8 0 amappl7 120 496 0 488 1 0 1 1 0 8 0 amappl6 112 580 0 565 1 0 1 1 0 8 0 amappl5 104 684 0 670 1 0 1 1 0 8 0 amappl4 96 4539 0 4502 2 1 1 2 0 8 0 amappl3 88 1358 0 1352 1 0 1 1 0 8 0 amappl2 80 34330 0 34263 2 0 2 2 0 8 0 amappl1 72 103701 0 103239 25 15 10 20 0 8 0 amappl 72 12730 0 12686 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 136 0 7 3 0 3 3 0 8 0 uaddrrnd 24 4198 0 4181 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4198 0 4181 1 0 1 1 0 8 0 vmmpekpl 168 37890 0 37864 2 0 2 2 0 8 0 vmmpepl 168 456257 0 454269 226 139 87 96 0 357 0 vmsppl 360 4197 0 4181 2 0 2 2 0 8 0 pdppl 4096 8404 0 8362 6 0 6 6 0 8 0 pvpl 32 1168214 0 1148974 326 170 156 160 0 265 0 pmappl 232 4197 0 4181 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 677 0 33 19 0 19 19 0 8 0