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 187350 34469 0 0x14000 0x200 1 softnet *322245 3231 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(ffffffff81f8d574,ffffffff81f8855b,434,ffffffff81f97a51) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806ebbfbd0) 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(ffff800020ac0960) 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(ffffffff81f8d574,ffffffff81f8855b,434,ffffffff81f97a51) at __assert+0x2e sys/kern/subr_prf.c:155 knote_enqueue(fffffd806ebbfbd0) 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(ffff800020ac0960) 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 0xffff800020ac9630 rbx 0xffff800020ac96e0 rdx 0xffff800020ac0960 rcx 0 rax 0 r8 0xffffffff8100bbb3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x35a81ce1b6b8abec r12 0x3000000008 r13 0xffff800020ac9640 r14 0x100 r15 0x1 rip 0xffffffff8137a588 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020ac9620 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (smr) pid=322245 stat=onproc flags process=14000 proc=200 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac1518,0xffff800020ac0718 process=0xffff800020ac36f8 user=0xffff800020ac4000, vmspace=0xffffffff82389a28 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 14189 356177 8622 0 2 0x81000 syz-executor.0 14189 980 8622 0 2 0x4081080 syz-executor.0 14189 392101 8622 0 3 0x4003000 suspend syz-executor.0 47107 433386 61987 0 3 0x2 getblk syz-executor.1 11106 186943 0 0 3 0x14200 bored sosplice 8622 476270 61987 0 3 0x82 wait syz-executor.0 61987 321532 11397 0 3 0x82 thrsleep syz-fuzzer 61987 400497 11397 0 3 0x4000082 nanosleep syz-fuzzer 61987 78365 11397 0 3 0x4000082 thrsleep syz-fuzzer 61987 186118 11397 0 3 0x4000082 thrsleep syz-fuzzer 61987 453330 11397 0 3 0x4000082 thrsleep syz-fuzzer 61987 219637 11397 0 2 0x4000482 syz-fuzzer 61987 194424 11397 0 3 0x4000082 kqread syz-fuzzer 61987 467915 11397 0 3 0x4000082 thrsleep syz-fuzzer 61987 289972 11397 0 3 0x4000082 thrsleep syz-fuzzer 61987 111296 11397 0 3 0x4000082 thrsleep syz-fuzzer 11397 343469 97521 0 3 0x10008a pause ksh 97521 151470 26905 0 3 0x92 select sshd 50486 396476 1 0 3 0x100083 ttyin getty 26905 490452 1 0 3 0x80 select sshd 57342 288084 31100 74 3 0x100092 bpf pflogd 31100 250683 1 0 3 0x80 netio pflogd 57404 443149 36713 73 3 0x100090 kqread syslogd 36713 394987 1 0 3 0x100082 netio syslogd 35368 33506 1 77 3 0x100090 poll dhclient 40630 69701 1 0 3 0x80 poll dhclient 89968 5999 0 0 2 0x14200 zerothread 93382 349166 0 0 3 0x14200 aiodoned aiodoned 228 318563 0 0 3 0x14200 syncer update 23146 266180 0 0 3 0x14200 cleaner cleaner 61551 9265 0 0 3 0x14200 reaper reaper 22116 253756 0 0 3 0x14200 pgdaemon pagedaemon 48224 248186 0 0 3 0x14200 bored crynlk 45518 146470 0 0 3 0x14200 bored crypto 96531 430200 0 0 3 0x40014200 acpi0 acpi0 78623 77122 0 0 3 0x40014200 idle1 34469 187350 0 0 7 0x14200 softnet 97922 138760 0 0 3 0x14200 bored systqmp 86461 169487 0 0 3 0x14200 bored systq 57973 143161 0 0 2 0x40014200 softclock 54270 269610 0 0 3 0x40014200 idle0 * 3231 322245 0 0 7 0x14200 smr 1 345110 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 47107 (syz-executor.1) thread 0xffff800020b6f530 (433386) exclusive rrwlock inode r = 0 (0xfffffd80703c0c58) #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 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 ufs_ihashget+0x141 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x74 sys/ufs/ffs/ffs_vfsops.c:1323 #8 ufs_lookup+0x1575 sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 #10 vfs_lookup+0x575 sys/kern/vfs_lookup.c:523 #11 namei+0x45f sys/kern/vfs_lookup.c:224 #12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1673 #13 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #13 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806ff3e700) #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 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1673 #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 Process 34469 (softnet) thread 0xffff800020ac0bb8 (187350) shared rwlock netlock r = 0 (0xffffffff82230d68) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 if_input_process+0x84 sys/net/if.c:943 #2 ifiq_process+0x80 sys/net/ifq.c:606 #3 taskq_thread+0x9c sys/kern/kern_task.c:345 #4 proc_trampoline+0x1c shared rwlock softnet r = 0 (0xffff8000000230d8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 taskq_thread+0x8f sys/kern/kern_task.c:344 #2 proc_trampoline+0x1c Process 57973 (softclock) thread 0xffff800020ac0258 (143161) shared rwlock timeout r = 0 (0xffffffff821a58e0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 timeout_run+0xb9 sys/kern/kern_timeout.c:467 #2 softclock_thread+0x151 sys/kern/kern_timeout.c:540 #3 proc_trampoline+0x1c ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9536 6415K 6920K 78643K 14567 0 0 pcb 25 9K 11K 78643K 1106 0 0 rtable 108 4K 4K 78643K 758 0 0 ifaddr 65 15K 15K 78643K 326 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1496 0 0 iov 0 0K 24K 78643K 269 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 76K 78643K 3033 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 28 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 549 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 2900 0 0 sigio 0 0K 0K 78643K 52 0 0 proc 53 50K 83K 78643K 886 0 0 subproc 64 65538K 67586K 78643K 264 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 309 0 0 in_multi 33 2K 2K 78643K 302 0 0 ether_multi 1 0K 0K 78643K 43 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 406 0 0 pfkey data 0 0K 0K 78643K 48 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 106 22K 31K 78643K 8329 0 0 UVM aobj 78 3K 3K 78643K 83 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 89 0 0 NDP 14 0K 0K 78643K 91 0 0 temp 185 2716K 2787K 78643K 11499 0 0 kqueue 0 0K 0K 78643K 13 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 12 0 6 1 0 1 1 0 8 0 inpcbpl 280 1199 0 1192 1 0 1 1 0 8 0 plimitpl 152 58 0 50 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 78 0 34 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 400 0 396 1 0 1 1 0 8 0 nd6 48 15 0 9 1 0 1 1 0 8 0 ppxss 1128 46 0 46 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 44 0 27 1 0 1 1 0 8 0 pfstkey 112 44 0 27 1 0 1 1 0 8 0 pfstate 328 44 0 27 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 329 0 138 12 0 12 12 0 8 0 art_table 32 330 0 138 2 0 2 2 0 8 0 art_node 16 77 0 37 1 0 1 1 0 8 0 semupl 112 9 0 9 1 1 0 1 0 8 0 semapl 112 527 0 517 1 0 1 1 0 8 0 shmpl 112 81 0 5 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6252 0 4774 48 0 48 48 0 8 0 ffsino 272 6252 0 4774 99 0 99 99 0 8 0 nchpl 144 10142 0 8498 63 1 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 25790 0 25790 3 3 0 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 12 0 12 3 3 0 1 0 8 0 scxspl 192 42095 0 42092 15 14 1 6 0 8 0 sigapl 432 3088 0 3073 3 1 2 3 0 8 0 futexpl 56 24622 0 24622 2 1 1 1 0 8 1 knotepl 112 512 0 493 1 0 1 1 0 8 0 kqueuepl 104 348 0 346 1 0 1 1 0 8 0 pipepl 112 1036 0 1017 4 3 1 2 0 8 0 fdescpl 488 3089 0 3073 3 0 3 3 0 8 0 filepl 152 11955 0 11855 8 4 4 5 0 8 0 lockfpl 104 687 0 687 6 6 0 1 0 8 0 lockfspl 32 290 0 290 6 6 0 1 0 8 0 sessionpl 112 22 0 11 1 0 1 1 0 8 0 pgrppl 48 30 0 19 1 0 1 1 0 8 0 ucredpl 96 1930 0 1921 1 0 1 1 0 8 0 zombiepl 144 3073 0 3073 4 4 0 1 0 8 0 processpl 840 3105 0 3073 4 0 4 4 0 8 0 procpl 600 7194 0 7151 6 2 4 5 0 8 0 srpgc 64 18 0 18 1 1 0 1 0 8 0 sosppl 128 60 0 60 7 7 0 1 0 8 0 sockpl 384 2162 0 2143 6 4 2 4 0 8 0 mcl64k 65536 265 0 0 34 0 34 34 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 18 0 0 3 0 3 3 0 8 0 mcl2k2 2112 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 205 0 0 11 1 10 11 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 518 0 0 20 0 20 20 0 8 0 bufpl 256 18251 0 11231 439 0 439 439 0 8 0 anonpl 16 338692 0 330501 85 52 33 34 0 125 0 amapchunkpl 152 19134 0 19008 33 28 5 14 0 158 0 amappl16 192 13459 0 13066 30 10 20 20 0 8 0 amappl15 184 2887 0 2883 1 0 1 1 0 8 0 amappl14 176 484 0 480 2 1 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 29 0 26 1 0 1 1 0 8 0 amappl11 152 56 0 37 1 0 1 1 0 8 0 amappl10 144 1027 0 1024 1 0 1 1 0 8 0 amappl9 136 530 0 526 1 0 1 1 0 8 0 amappl8 128 222 0 188 2 0 2 2 0 8 0 amappl7 120 1002 0 996 1 0 1 1 0 8 0 amappl6 112 58 0 52 1 0 1 1 0 8 0 amappl5 104 373 0 359 1 0 1 1 0 8 0 amappl4 96 3362 0 3322 4 3 1 2 0 8 0 amappl3 88 594 0 587 1 0 1 1 0 8 0 amappl2 80 27558 0 27502 2 0 2 2 0 8 0 amappl1 72 65226 0 64776 25 15 10 20 0 8 0 amappl 72 7558 0 7519 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 82 0 5 3 1 2 2 0 8 0 uaddrrnd 24 3089 0 3073 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3089 0 3073 1 0 1 1 0 8 0 vmmpekpl 168 22028 0 22002 2 0 2 2 0 8 0 vmmpepl 168 309443 0 308014 116 50 66 75 0 357 3 vmsppl 360 3088 0 3073 2 0 2 2 0 8 0 pdppl 4096 6185 0 6146 6 1 5 6 0 8 0 pvpl 32 884074 0 872715 245 149 96 103 0 265 4 pmappl 232 3088 0 3073 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 637 0 8 19 0 19 19 0 8 0