panic: mutex 0xfffffd806e9aaa20 not held in knote_dequeue Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 236890 22415 32767 0x10 0 0 syz-executor.0 *225853 14143 32767 0x10 0x4000000 1K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic(ffffffff8246025e) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e8a7460) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000212870e0,fffffd806e8a7460) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff800021280000,ffff800021287378,ffff8000212873c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff800021287440) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021287440) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bd0032b840, count: 7 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 *cpu1: mutex 0xfffffd806e9aaa20 not held in knote_dequeue ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic(ffffffff8246025e) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e8a7460) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000212870e0,fffffd806e8a7460) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff800021280000,ffff800021287378,ffff8000212873c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff800021287440) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021287440) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bd0032b840, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800021286eb0 rbx 0xffff800020d59bf7 rdx 0x8b rcx 0x2 rax 0x3a r8 0xffffffff81bb3f14 kprintf+0x144 r9 0x1 r10 0x5971f2e53be7adc1 r11 0x116c43fbc98150c3 r12 0xffff800020d599f8 r13 0 r14 0 r15 0x1 rip 0xffffffff81b43698 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021286ea0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=225853 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021280fc0,0xffff8000212817b0 process=0xffff8000256b6618 user=0xffff800021282000, vmspace=0xfffffd807f009450 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 22415 236890 79777 32767 7 0x10 syz-executor.0 14143 312604 11132 32767 2 0x10 syz-executor.1 14143 417478 11132 32767 3 0x4000090 fsleep syz-executor.1 *14143 225853 11132 32767 7 0x4000010 syz-executor.1 79777 113696 1 32767 3 0x90 nanoslp syz-executor.0 11132 521768 1 32767 3 0x90 nanoslp syz-executor.1 69935 133155 82493 0 3 0x82 thrsleep syz-fuzzer 69935 461932 82493 0 3 0x4000082 nanoslp syz-fuzzer 69935 260720 82493 0 3 0x4000082 thrsleep syz-fuzzer 69935 357348 82493 0 3 0x4000082 nanoslp syz-fuzzer 69935 518069 82493 0 3 0x4000082 kqread syz-fuzzer 69935 199481 82493 0 3 0x4000082 thrsleep syz-fuzzer 69935 392115 82493 0 3 0x4000082 thrsleep syz-fuzzer 69935 171277 82493 0 3 0x4000082 thrsleep syz-fuzzer 82493 221347 81481 0 3 0x10008a sigsusp ksh 81481 201402 20977 0 3 0x92 select sshd 40435 464418 1 0 3 0x100083 ttyin getty 20977 38673 1 0 3 0x80 select sshd 61966 26041 53367 73 3 0x100090 kqread syslogd 53367 472675 1 0 3 0x100082 netio syslogd 77701 338250 1 77 3 0x100090 poll dhclient 76700 29897 1 0 3 0x80 poll dhclient 1488 184578 0 0 3 0x14200 bored smr 86460 304605 0 0 3 0x14200 pgzero zerothread 50567 446963 0 0 3 0x14200 aiodoned aiodoned 79756 309243 0 0 3 0x14200 syncer update 18982 275762 0 0 3 0x14200 cleaner cleaner 24603 66791 0 0 3 0x14200 reaper reaper 57029 523517 0 0 3 0x14200 pgdaemon pagedaemon 38848 163199 0 0 3 0x14200 bored crynlk 36397 479089 0 0 3 0x14200 bored crypto 72454 302959 0 0 3 0x14200 bored viomb 9508 494414 0 0 3 0x40014200 acpi0 acpi0 95552 281895 0 0 3 0x40014200 idle1 23583 296705 0 0 3 0x14200 bored softnet 78659 435772 0 0 3 0x14200 bored systqmp 25938 26491 0 0 3 0x14200 bored systq 69947 66641 0 0 3 0x40014200 bored softclock 4437 348739 0 0 3 0x40014200 idle0 1 244255 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 14143 (syz-executor.1) thread 0xffff800021280000 (225853) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff8294f968) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 syscall+0x439 mi_syscall sys/sys/syscall_mi.h:93 [inline] #1 syscall+0x439 sys/arch/amd64/amd64/trap.c:587 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10116 6414K 6414K 78643K 11206 0 pcb 13 8K 8K 78643K 13 0 rtable 107 3K 3K 78643K 195 0 ifaddr 39 10K 10K 78643K 39 0 counters 44 34K 34K 78643K 44 0 ioctlops 0 0K 2K 78643K 58 0 iov 0 0K 8K 78643K 64 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 1 0 vnodes 1216 76K 76K 78643K 1224 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 9 0 VM map 2 1K 1K 78643K 2 0 sem 11 1K 1K 78643K 19 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 6 17K 33K 78643K 16290 0 sigio 0 0K 0K 78643K 20 0 proc 48 50K 83K 78643K 357 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 4 0 in_multi 33 2K 2K 78643K 33 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 43 201K 201K 78643K 43 0 exec 0 0K 2K 78643K 322 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 1030 101K 101K 78643K 194530 0 UVM aobj 22 6K 6K 78643K 24 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 2 0 NDP 5 0K 0K 78643K 9 0 temp 101 3985K 4049K 78643K 34396 0 kqueue 6 7K 8K 78643K 22 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 26 0 24 1 0 1 1 0 8 0 rtentry 112 48 0 3 2 0 2 2 0 8 0 unpcb 120 2111 0 2103 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 486 0 486 1 1 0 1 0 8 0 tcpcb 736 22 0 18 1 0 1 1 0 8 0 arp 120 6 0 0 1 0 1 1 0 8 0 inpcb 304 83 0 77 1 0 1 1 0 8 0 nd6 48 9 0 2 1 0 1 1 0 8 0 kcovpl 48 2 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 218 0 28 13 1 12 13 0 8 0 art_table 32 219 0 28 2 0 2 2 0 8 0 art_node 16 47 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 7 1 0 1 1 0 8 0 semupl 112 6 0 6 1 1 0 1 0 8 0 semapl 112 11 0 2 1 0 1 1 0 8 0 shmpl 112 21 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 19606 0 18208 88 0 88 88 0 8 0 ffsino 272 19606 0 18208 94 0 94 94 0 8 0 nchpl 144 38726 0 37118 60 0 60 60 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 81110 0 81110 4 3 1 1 0 8 1 percpumem 16 34 0 0 1 0 1 1 0 8 0 scxspl 216 111543 0 111543 10 9 1 8 0 8 1 plimitpl 152 20 0 11 1 0 1 1 0 8 0 sigapl 424 16477 0 16446 4 0 4 4 0 8 0 futexpl 56 103024 0 103023 2 1 1 1 0 8 0 knotepl 112 34 0 0 1 0 1 1 0 8 0 kqueuepl 216 20756 0 20750 1 0 1 1 0 8 0 pipepl 336 9750 0 9739 4 2 2 2 0 8 1 fdescpl 496 16461 0 16446 3 1 2 3 0 8 0 filepl 152 67507 0 67407 11 6 5 5 0 8 1 lockfpl 104 237 0 236 1 0 1 1 0 8 0 lockfspl 48 98 0 97 1 0 1 1 0 8 0 sessionpl 144 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 396 0 387 1 0 1 1 0 8 0 zombiepl 144 16446 0 16444 3 2 1 1 0 8 0 processpl 1080 16477 0 16444 5 2 3 3 0 8 0 procpl 672 34382 0 34340 4 0 4 4 0 8 0 sockpl 480 2272 0 2256 5 2 3 4 0 8 0 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 10 0 0 2 0 2 2 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 14 0 0 2 0 2 2 0 8 0 mcl4k 4096 25 0 0 4 1 3 3 0 8 0 mcl2k2 2112 20 0 0 2 0 2 2 0 8 0 mcl2k 2048 331 0 0 28 3 25 28 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 754 0 0 36 0 36 36 0 8 0 bufpl 280 20721 0 14404 452 0 452 452 0 8 0 anonpl 24 4268776 0 4092594 1069 5 1064 1064 0 186 0 amapchunkpl 152 464485 0 457077 292 5 287 287 0 158 2 amappl16 200 26532 0 22831 197 2 195 195 0 8 0 amappl15 192 53 0 46 1 0 1 1 0 8 0 amappl14 184 7 0 3 1 0 1 1 0 8 0 amappl13 176 16290 0 16283 1 0 1 1 0 8 0 amappl12 168 12 0 11 2 1 1 1 0 8 0 amappl11 160 38 0 26 1 0 1 1 0 8 0 amappl10 152 40 0 32 1 0 1 1 0 8 0 amappl9 144 238 0 235 3 2 1 1 0 8 0 amappl8 136 323 0 271 2 0 2 2 0 8 0 amappl7 128 59 0 52 1 0 1 1 0 8 0 amappl6 120 99 0 84 1 0 1 1 0 8 0 amappl5 112 16380 0 16368 1 0 1 1 0 8 0 amappl4 104 492 0 462 1 0 1 1 0 8 0 amappl3 96 755 0 746 1 0 1 1 0 8 0 amappl2 88 32889 0 32844 3 1 2 2 0 8 0 amappl1 80 256025 0 255634 14 5 9 12 0 8 0 amappl 88 193262 0 192295 22 0 22 22 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 64 23 0 2 1 0 1 1 0 8 0 uaddrrnd 24 16461 0 16446 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 16461 0 16446 1 0 1 1 0 8 0 vmmpekpl 168 101641 0 101615 2 0 2 2 0 8 0 vmmpepl 168 1875860 0 1870050 383 128 255 376 0 357 2 vmsppl 368 16460 0 16446 2 0 2 2 0 8 0 rwobjpl 56 305481 0 300275 77 3 74 74 0 8 0 pdppl 4096 32929 0 32892 63 26 37 45 0 8 0 pvpl 32 8864251 0 8684403 1474 20 1454 1455 0 265 3 pmappl 232 16460 0 16446 2 1 1 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 349 0 38 9 0 9 9 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff82709ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:353 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff8294f760) at __mp_lock+0x120 __mp_lock_spin sys/kern/kern_lock.c:117 [inline] __mp_lock(ffffffff8294f760) at __mp_lock+0x120 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x1f __mp_lock(ffffffff8294f760) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff8294f760) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff800022cacb20) at syscall+0x439 mi_syscall sys/sys/syscall_mi.h:93 [inline] syscall(ffff800022cacb20) at syscall+0x439 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1940, count: 6 ddb{0}> trace x86_ipi_db(ffffffff82709ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:353 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff8294f760) at __mp_lock+0x120 __mp_lock_spin sys/kern/kern_lock.c:117 [inline] __mp_lock(ffffffff8294f760) at __mp_lock+0x120 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x1f __mp_lock(ffffffff8294f760) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff8294f760) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff800022cacb20) at syscall+0x439 mi_syscall sys/sys/syscall_mi.h:93 [inline] syscall(ffff800022cacb20) at syscall+0x439 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1940, count: -9 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic(ffffffff8246025e) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e8a7460) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000212870e0,fffffd806e8a7460) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff800021280000,ffff800021287378,ffff8000212873c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff800021287440) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021287440) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bd0032b840, count: 7 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic(ffffffff8246025e) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e8a7460) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000212870e0,fffffd806e8a7460) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9aaa20,ffff8000212870e0,ffff800021280000) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff800021280000,ffff800021287378,ffff8000212873c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff800021287440) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021287440) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bd0032b840, count: -8