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 237206 41923 0 0x14000 0x200 0 zerothread *398932 23941 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(fffffd806ec9ccb0) 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(fffffd806ec9ccb0) 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 0xffff800020ac8e70 rbx 0xffff800020ac8f20 rdx 0xffff800020ac1770 rcx 0 rax 0 r8 0xffffffff8100bbb3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x9d6ed690a103c599 r12 0x3000000008 r13 0xffff800020ac8e80 r14 0x100 r15 0x1 rip 0xffffffff8137a588 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020ac8e60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (smr) pid=398932 stat=onproc flags process=14000 proc=200 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac1c20,0xffff800020ac1528 process=0xffff800020ac33b0 user=0xffff800020ac4000, vmspace=0xffffffff82389a28 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 84811 97481 25830 0 2 0x81000 syz-executor.0 84811 153845 25830 0 3 0x4003000 suspend syz-executor.0 25830 417783 67190 0 3 0x82 wait syz-executor.0 32718 151454 67190 0 2 0x2 syz-executor.1 67190 273960 31471 0 3 0x82 thrsleep syz-fuzzer 67190 82281 31471 0 3 0x4000082 nanosleep syz-fuzzer 67190 289154 31471 0 3 0x4000082 thrsleep syz-fuzzer 67190 514644 31471 0 3 0x4000082 kqread syz-fuzzer 67190 505605 31471 0 3 0x4000082 thrsleep syz-fuzzer 67190 399821 31471 0 2 0x4000482 syz-fuzzer 67190 77206 31471 0 3 0x4000082 thrsleep syz-fuzzer 67190 454451 31471 0 3 0x4000082 thrsleep syz-fuzzer 67190 257549 31471 0 3 0x4000082 thrsleep syz-fuzzer 67190 258553 31471 0 3 0x4000082 thrsleep syz-fuzzer 31471 328048 34191 0 3 0x10008a pause ksh 34191 101266 96650 0 3 0x92 select sshd 14937 422549 1 0 3 0x100083 ttyin getty 96650 321211 1 0 3 0x80 select sshd 99204 74098 67387 74 3 0x100092 bpf pflogd 67387 305800 1 0 3 0x80 netio pflogd 33838 6702 43160 73 3 0x100090 kqread syslogd 43160 136517 1 0 3 0x100082 netio syslogd 1807 145066 1 77 3 0x100090 poll dhclient 318 192645 1 0 3 0x80 poll dhclient 41923 237206 0 0 7 0x14200 zerothread 38555 367350 0 0 3 0x14200 aiodoned aiodoned 69013 375491 0 0 3 0x14200 syncer update 43528 162755 0 0 3 0x14200 cleaner cleaner 62477 489812 0 0 3 0x14200 reaper reaper 39303 284572 0 0 3 0x14200 pgdaemon pagedaemon 81017 21392 0 0 3 0x14200 bored crynlk 57599 195647 0 0 3 0x14200 bored crypto 31219 16667 0 0 3 0x40014200 acpi0 acpi0 57069 42789 0 0 3 0x40014200 idle1 21846 41868 0 0 3 0x14200 bored softnet 75938 376167 0 0 3 0x14200 bored systqmp 67925 344230 0 0 3 0x14200 bored systq 84320 500227 0 0 3 0x40014200 bored softclock 86488 385017 0 0 3 0x40014200 idle0 *23941 398932 0 0 7 0x14200 smr 1 171339 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9531 6418K 14851K 78643K 12113 0 0 pcb 25 9K 11K 78643K 300 0 0 rtable 108 4K 4K 78643K 495 0 0 ifaddr 65 14K 14K 78643K 144 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1488 0 0 iov 0 0K 16K 78643K 60 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 75K 78643K 1770 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 11 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 84 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 608 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 53 50K 83K 78643K 568 0 0 subproc 64 65538K 69634K 78643K 204 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 61 0 0 in_multi 33 2K 2K 78643K 92 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 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 296 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 25K 78643K 2863 0 0 UVM aobj 22 2K 2K 78643K 22 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 19 0 0 NDP 14 0K 0K 78643K 44 0 0 temp 172 2712K 2777K 78643K 5627 0 0 kqueue 0 0K 0K 78643K 10 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 14 0 8 1 0 1 1 0 8 0 inpcbpl 280 271 0 264 1 0 1 1 0 8 0 plimitpl 152 47 0 39 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 89 0 45 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 26 0 26 1 1 0 1 0 8 0 tcpcb 544 101 0 97 1 0 1 1 0 8 0 nd6 48 18 0 12 1 0 1 1 0 8 0 ppxss 1128 10 0 10 2 2 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 14 0 6 1 0 1 1 0 8 0 pfstkey 112 14 0 6 1 0 1 1 0 8 0 pfstate 328 14 0 6 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 368 0 176 12 0 12 12 0 8 0 art_table 32 369 0 176 2 0 2 2 0 8 0 art_node 16 88 0 48 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 80 0 70 1 0 1 1 0 8 0 shmpl 112 20 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2311 0 877 47 0 47 47 0 8 0 ffsino 272 2311 0 877 96 0 96 96 0 8 0 nchpl 144 3336 0 1683 62 0 62 62 0 8 0 uvmvnodes 72 2779 0 0 51 0 51 51 0 8 0 vnodes 200 2779 0 0 147 0 147 147 0 8 0 namei 1024 9862 0 9862 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 8979 0 8979 8 8 0 6 0 8 0 sigapl 432 795 0 780 3 1 2 3 0 8 0 futexpl 56 6492 0 6492 1 0 1 1 0 8 1 knotepl 112 244 0 225 1 0 1 1 0 8 0 kqueuepl 104 140 0 138 1 0 1 1 0 8 0 pipepl 112 512 0 493 3 2 1 2 0 8 0 fdescpl 488 796 0 780 4 1 3 3 0 8 0 filepl 152 4435 0 4335 6 2 4 6 0 8 0 lockfpl 104 194 0 193 2 1 1 1 0 8 0 lockfspl 32 69 0 68 2 1 1 1 0 8 0 sessionpl 112 22 0 11 1 0 1 1 0 8 0 pgrppl 48 41 0 30 1 0 1 1 0 8 0 ucredpl 96 583 0 574 1 0 1 1 0 8 0 zombiepl 144 781 0 780 3 2 1 1 0 8 0 processpl 840 811 0 780 4 0 4 4 0 8 0 procpl 600 1988 0 1947 4 0 4 4 0 8 0 srpgc 64 24 0 24 2 2 0 1 0 8 0 sockpl 384 537 0 518 4 2 2 4 0 8 0 mcl64k 65536 257 0 0 33 0 33 33 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 129 0 0 16 0 16 16 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 354 0 0 20 0 20 20 0 8 0 bufpl 256 6666 0 1165 344 0 344 344 0 8 0 anonpl 16 86523 0 72205 77 19 58 58 0 125 0 amapchunkpl 152 4693 0 4560 10 4 6 8 0 158 0 amappl16 192 3558 0 2723 51 9 42 42 0 8 0 amappl15 184 8 0 8 1 1 0 1 0 8 0 amappl14 176 160 0 156 2 1 1 1 0 8 0 amappl13 168 11 0 10 1 0 1 1 0 8 0 amappl12 160 64 0 62 1 0 1 1 0 8 0 amappl11 152 107 0 89 1 0 1 1 0 8 0 amappl10 144 399 0 394 1 0 1 1 0 8 0 amappl9 136 641 0 638 1 0 1 1 0 8 0 amappl8 128 187 0 171 1 0 1 1 0 8 0 amappl7 120 369 0 364 1 0 1 1 0 8 0 amappl6 112 104 0 97 1 0 1 1 0 8 0 amappl5 104 218 0 204 1 0 1 1 0 8 0 amappl4 96 963 0 931 2 0 2 2 0 8 0 amappl3 88 255 0 244 1 0 1 1 0 8 0 amappl2 80 5426 0 5370 2 0 2 2 0 8 0 amappl1 72 27575 0 27130 25 15 10 20 0 8 0 amappl 72 2314 0 2273 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 21 0 0 1 0 1 1 0 8 0 uaddrrnd 24 796 0 780 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 796 0 780 1 0 1 1 0 8 0 vmmpekpl 168 10375 0 10349 2 0 2 2 0 8 0 vmmpepl 168 92103 0 90264 131 40 91 95 0 357 11 vmsppl 360 795 0 780 2 0 2 2 0 8 0 pdppl 4096 1599 0 1560 6 1 5 6 0 8 0 pvpl 32 262339 0 244869 178 37 141 145 0 265 0 pmappl 232 795 0 780 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 541 0 5 16 0 16 16 0 8 0