panic: mutex 0xfffffd806e9a5360 not held in knote_dequeue Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 457305 28269 32767 0x10 0 1 syz-executor.0 *236315 28269 32767 0x10 0x4000000 0 syz-executor.0 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(fffffd806e8a3930) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000256bec80,fffffd806e8a3930) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9a5360,ffff8000256bec80,ffff8000212827e0) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9a5360,ffff8000256bec80,ffff8000212827e0) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff8000212827e0,ffff8000256bef38,ffff8000256bef80) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff8000256bf000) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000256bf000) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4d4b9616c30, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: mutex 0xfffffd806e9a5360 not held in knote_dequeue ddb{0}> 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(fffffd806e8a3930) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000256bec80,fffffd806e8a3930) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9a5360,ffff8000256bec80,ffff8000212827e0) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9a5360,ffff8000256bec80,ffff8000212827e0) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff8000212827e0,ffff8000256bef38,ffff8000256bef80) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff8000256bf000) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000256bf000) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4d4b9616c30, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000256bea70 rbx 0xffffffff8270abf7 cpu_info_full_primary+0x2bf7 rdx 0x8b rcx 0x2 rax 0x3a r8 0xffffffff81bb3f14 kprintf+0x144 r9 0x1 r10 0x314bf406e43ea53b r11 0x4f4147f4948c8d6c r12 0xffffffff8270a9f8 cpu_info_full_primary+0x29f8 r13 0 r14 0 r15 0x1 rip 0xffffffff81b43698 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000256bea60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=236315 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021282fc0,0xffff800021283270 process=0xffff800021286e80 user=0xffff8000256ba000, vmspace=0xfffffd807f0092e0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 31140 92843 15732 32767 2 0x10 syz-executor.1 31140 966 15732 32767 3 0x4000090 kqread syz-executor.1 28269 457305 13601 32767 7 0x10 syz-executor.0 28269 358819 13601 32767 2 0x4000010 syz-executor.0 *28269 236315 13601 32767 7 0x4000010 syz-executor.0 28269 147506 13601 32767 3 0x4000090 fsleep syz-executor.0 28269 133998 13601 32767 3 0x4000090 fsleep syz-executor.0 73833 151380 0 0 3 0x14200 bored sosplice 15732 353961 23583 32767 3 0x90 nanoslp syz-executor.1 23583 451012 59765 0 3 0x82 wait syz-executor.1 13601 331044 42558 32767 3 0x90 nanoslp syz-executor.0 42558 398924 59765 0 3 0x82 wait syz-executor.0 59765 54015 82452 0 3 0x82 thrsleep syz-fuzzer 59765 340041 82452 0 3 0x4000082 nanoslp syz-fuzzer 59765 107310 82452 0 3 0x4000082 thrsleep syz-fuzzer 59765 517008 82452 0 3 0x4000082 thrsleep syz-fuzzer 59765 30991 82452 0 3 0x4000082 kqread syz-fuzzer 59765 398163 82452 0 3 0x4000082 thrsleep syz-fuzzer 59765 49202 82452 0 3 0x4000082 thrsleep syz-fuzzer 59765 240535 82452 0 3 0x4000082 thrsleep syz-fuzzer 82452 244484 47957 0 3 0x10008a sigsusp ksh 47957 418378 73725 0 3 0x92 select sshd 47471 179819 1 0 3 0x100083 ttyin getty 73725 492523 1 0 3 0x80 select sshd 80457 217988 34582 73 3 0x100090 kqread syslogd 34582 327265 1 0 3 0x100082 netio syslogd 78836 465192 1 77 3 0x100090 poll dhclient 43684 384477 1 0 3 0x80 poll dhclient 58229 32032 0 0 3 0x14200 bored smr 98692 331791 0 0 2 0x14200 zerothread 16328 383197 0 0 3 0x14200 aiodoned aiodoned 51743 397899 0 0 3 0x14200 syncer update 58811 447837 0 0 3 0x14200 cleaner cleaner 87900 211731 0 0 3 0x14200 reaper reaper 27728 161928 0 0 3 0x14200 pgdaemon pagedaemon 97771 519806 0 0 3 0x14200 bored crynlk 59667 142675 0 0 3 0x14200 bored crypto 50540 198806 0 0 3 0x14200 bored viomb 34241 97398 0 0 3 0x40014200 acpi0 acpi0 58625 201410 0 0 3 0x40014200 idle1 56659 89663 0 0 3 0x14200 bored softnet 79519 446907 0 0 3 0x14200 bored systqmp 98965 196063 0 0 3 0x14200 bored systq 17460 311796 0 0 3 0x40014200 bored softclock 97659 259253 0 0 3 0x40014200 idle0 1 343975 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 28269 (syz-executor.0) thread 0xffff8000212827e0 (236315) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10117 6414K 6414K 78643K 11213 0 pcb 13 8K 8K 78643K 13 0 rtable 105 3K 3K 78643K 342 0 ifaddr 39 10K 10K 78643K 53 0 counters 44 34K 34K 78643K 48 0 ioctlops 0 0K 2K 78643K 34 0 iov 0 0K 12K 78643K 58 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 1 0 vnodes 1216 76K 77K 78643K 1298 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 28 0 VM map 2 1K 1K 78643K 2 0 sem 10 1K 1K 78643K 17 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 8 25K 33K 78643K 1053 0 sigio 0 0K 0K 78643K 14 0 proc 48 50K 83K 78643K 467 0 subproc 34 2K 2K 78643K 68 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 75 0 in_multi 33 2K 2K 78643K 79 0 ether_multi 1 0K 0K 78643K 5 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 419 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 217 31K 43K 78643K 13816 0 UVM aobj 30 2K 2K 78643K 30 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 39 0 NDP 5 0K 0K 78643K 15 0 temp 102 3989K 4053K 78643K 4145 0 kqueue 11 8K 8K 78643K 29 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> 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 88 0 86 1 0 1 1 0 8 0 rtentry 112 67 0 23 2 0 2 2 0 8 0 unpcb 120 365 0 357 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 631 0 631 3 3 0 2 0 8 0 tcpcb 736 131 0 116 5 3 2 2 0 8 0 arp 120 10 0 4 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 5 0 5 1 1 0 1 0 8 0 inpcb 304 440 0 434 2 1 1 2 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 kcovpl 48 4 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 277 0 88 12 0 12 12 0 8 0 art_table 32 278 0 88 2 0 2 2 0 8 0 art_node 16 66 0 26 1 0 1 1 0 8 0 sysvmsgpl 40 31 0 31 1 1 0 1 0 8 0 semupl 112 7 0 7 1 1 0 1 0 8 0 semapl 112 8 0 0 1 0 1 1 0 8 0 shmpl 112 27 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2667 0 1265 88 0 88 88 0 8 0 ffsino 272 2667 0 1265 94 0 94 94 0 8 0 nchpl 144 4321 0 2725 60 0 60 60 0 8 0 uvmvnodes 72 2744 0 0 50 0 50 50 0 8 0 vnodes 224 2744 0 0 162 0 162 162 0 8 0 namei 1024 10260 0 10260 1 0 1 1 0 8 1 percpumem 16 36 0 2 1 0 1 1 0 8 0 scxspl 216 13251 0 13251 12 11 1 8 0 8 1 plimitpl 152 35 0 26 1 0 1 1 0 8 0 sigapl 424 1235 0 1201 4 0 4 4 0 8 0 futexpl 56 11382 0 11380 1 0 1 1 0 8 0 knotepl 112 36 0 0 2 0 2 2 0 8 0 kqueuepl 216 865 0 853 2 1 1 2 0 8 0 pipepl 336 114 0 103 3 2 1 2 0 8 0 fdescpl 496 1218 0 1201 3 0 3 3 0 8 0 filepl 152 4944 0 4836 6 1 5 5 0 8 0 lockfpl 104 260 0 259 1 0 1 1 0 8 0 lockfspl 48 116 0 115 1 0 1 1 0 8 0 sessionpl 144 19 0 9 1 0 1 1 0 8 0 pgrppl 48 35 0 25 1 0 1 1 0 8 0 ucredpl 96 516 0 507 1 0 1 1 0 8 0 zombiepl 144 1201 0 1201 1 0 1 1 0 8 1 processpl 1080 1235 0 1201 4 1 3 3 0 8 0 procpl 672 2499 0 2453 4 0 4 4 0 8 0 sosppl 168 10 0 10 1 1 0 1 0 8 0 sockpl 480 893 0 877 6 2 4 4 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 11 0 0 2 0 2 2 0 8 0 mcl2k 2048 333 0 0 40 0 40 40 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 839 0 0 52 0 52 52 0 8 0 bufpl 280 5934 0 145 414 0 414 414 0 8 0 anonpl 24 322739 0 311254 95 18 77 81 0 186 5 amapchunkpl 152 36717 0 36142 37 12 25 34 0 158 2 amappl16 200 3368 0 3070 27 11 16 24 0 8 0 amappl15 192 62 0 54 1 0 1 1 0 8 0 amappl14 184 5 0 3 1 0 1 1 0 8 0 amappl13 176 44 0 42 1 0 1 1 0 8 0 amappl12 168 493 0 488 1 0 1 1 0 8 0 amappl11 160 214 0 206 1 0 1 1 0 8 0 amappl10 152 46 0 39 1 0 1 1 0 8 0 amappl9 144 337 0 335 3 2 1 1 0 8 0 amappl8 136 364 0 311 2 0 2 2 0 8 0 amappl7 128 72 0 64 1 0 1 1 0 8 0 amappl6 120 438 0 422 1 0 1 1 0 8 0 amappl5 112 923 0 914 1 0 1 1 0 8 0 amappl4 104 923 0 893 1 0 1 1 0 8 0 amappl3 96 612 0 600 1 0 1 1 0 8 0 amappl2 88 1855 0 1805 2 0 2 2 0 8 0 amappl1 80 22451 0 22032 12 3 9 12 0 8 0 amappl 88 13344 0 13191 4 0 4 4 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 29 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1218 0 1201 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1218 0 1201 1 0 1 1 0 8 0 vmmpekpl 168 11118 0 11097 2 0 2 2 0 8 0 vmmpepl 168 138769 0 137024 85 8 77 82 0 357 1 vmsppl 368 1217 0 1201 2 0 2 2 0 8 0 rwobjpl 56 27251 0 26273 19 5 14 16 0 8 0 pdppl 4096 2443 0 2402 55 14 41 45 0 8 0 pvpl 32 745928 0 730953 160 26 134 139 0 265 9 pmappl 232 1217 0 1201 2 1 1 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 365 0 21 10 0 10 10 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> 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(fffffd806e8a3930) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000256bec80,fffffd806e8a3930) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9a5360,ffff8000256bec80,ffff8000212827e0) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9a5360,ffff8000256bec80,ffff8000212827e0) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff8000212827e0,ffff8000256bef38,ffff8000256bef80) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff8000256bf000) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000256bf000) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4d4b9616c30, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d58ff0) 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 end of kernel end trace frame: 0x7f7ffffe7730, count: 12 ddb{1}> trace x86_ipi_db(ffff800020d58ff0) 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 end of kernel end trace frame: 0x7f7ffffe7730, count: -3