panic: mutex 0xfffffd806e9b20d8 not held in knote_dequeue Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 212707 72098 32767 0x10 0 0 syz-executor.1 *200639 72098 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(fffffd806a5f5238) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff80002348a460,fffffd806a5f5238) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff8000ffff4540,ffff80002348a678,ffff80002348a6c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff80002348a740) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002348a740) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x58ac24f8a60, 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 0xfffffd806e9b20d8 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(fffffd806a5f5238) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff80002348a460,fffffd806a5f5238) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff8000ffff4540,ffff80002348a678,ffff80002348a6c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff80002348a740) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002348a740) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x58ac24f8a60, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002348a1b0 rbx 0xffff800020d59bf7 rdx 0x8b rcx 0x2 rax 0x3a r8 0xffffffff81bb3f14 kprintf+0x144 r9 0x1 r10 0xa26c20be27aeae96 r11 0xda4cca9efa036371 r12 0xffff800020d599f8 r13 0 r14 0 r15 0x1 rip 0xffffffff81b43698 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002348a1a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=200639 stat=onproc flags process=10 proc=4000000 pri=69, usrpri=69, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5500,0xffffffff828f5570 process=0xffff8000ffff1da0 user=0xffff800023485000, vmspace=0xfffffd807f009a10 estcpu=19, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 72098 212707 52568 32767 7 0x10 syz-executor.1 72098 396069 52568 32767 3 0x4000090 kqread syz-executor.1 *72098 200639 52568 32767 7 0x4000010 syz-executor.1 52568 219536 1492 32767 3 0x90 nanoslp syz-executor.1 1492 97019 86825 0 3 0x82 wait syz-executor.1 32859 156260 0 0 3 0x14200 bored sosplice 27344 264770 41338 32767 3 0x90 nanoslp syz-executor.0 41338 255461 86825 0 3 0x82 wait syz-executor.0 86825 200858 41261 0 3 0x82 thrsleep syz-fuzzer 86825 107496 41261 0 3 0x4000082 nanoslp syz-fuzzer 86825 363826 41261 0 3 0x4000082 thrsleep syz-fuzzer 86825 207783 41261 0 3 0x4000082 thrsleep syz-fuzzer 86825 423701 41261 0 3 0x4000082 thrsleep syz-fuzzer 86825 243431 41261 0 3 0x4000082 thrsleep syz-fuzzer 86825 368258 41261 0 3 0x4000082 thrsleep syz-fuzzer 86825 188666 41261 0 3 0x4000082 kqread syz-fuzzer 41261 302389 94505 0 3 0x10008a sigsusp ksh 94505 513351 83113 0 3 0x92 select sshd 70320 399734 1 0 3 0x100083 ttyin getty 83113 516012 1 0 3 0x80 select sshd 24229 121643 46556 73 3 0x100090 kqread syslogd 46556 441572 1 0 3 0x100082 netio syslogd 13005 2288 1 77 3 0x100090 poll dhclient 36685 355853 1 0 3 0x80 poll dhclient 96836 19089 0 0 3 0x14200 bored smr 19597 499375 0 0 2 0x14200 zerothread 77967 297477 0 0 3 0x14200 aiodoned aiodoned 64313 22667 0 0 3 0x14200 syncer update 98607 168307 0 0 3 0x14200 cleaner cleaner 81932 181352 0 0 3 0x14200 reaper reaper 17980 444386 0 0 3 0x14200 pgdaemon pagedaemon 57891 180216 0 0 3 0x14200 bored crynlk 89602 410333 0 0 3 0x14200 bored crypto 19930 238449 0 0 3 0x14200 bored viomb 32820 312045 0 0 3 0x40014200 acpi0 acpi0 29028 242014 0 0 3 0x40014200 idle1 59992 242105 0 0 3 0x14200 bored softnet 67960 340983 0 0 3 0x14200 bored systqmp 27852 101590 0 0 3 0x14200 bored systq 8622 199519 0 0 3 0x40014200 bored softclock 35817 156085 0 0 3 0x40014200 idle0 1 241235 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 72098 (syz-executor.1) thread 0xffff8000ffff4540 (200639) 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 10117 6414K 6414K 78643K 11225 0 pcb 13 8K 8K 78643K 13 0 rtable 109 3K 3K 78643K 610 0 ifaddr 39 10K 10K 78643K 84 0 sysctl 1 1K 1K 78643K 1 0 counters 44 34K 34K 78643K 56 0 ioctlops 0 0K 2K 78643K 41 0 iov 0 0K 12K 78643K 63 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 1 0 vnodes 1216 76K 77K 78643K 1424 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 34 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 1984 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 7 21K 33K 78643K 4300 0 sigio 0 0K 0K 78643K 58 0 proc 48 50K 83K 78643K 1038 0 subproc 34 2K 2K 78643K 136 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 325 0 in_multi 33 2K 2K 78643K 241 0 ether_multi 1 0K 0K 78643K 24 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 588 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 270 35K 35K 78643K 53231 0 UVM aobj 86 3K 3K 78643K 105 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 112 0 NDP 5 0K 0K 78643K 27 0 temp 101 3985K 4049K 78643K 11236 0 kqueue 5 5K 22K 78643K 454 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 308 0 306 1 0 1 1 0 8 0 rtentry 112 116 0 70 2 0 2 2 0 8 0 unpcb 120 1048 0 1036 1 0 1 1 0 8 0 syncache 296 81 0 81 6 6 0 1 0 8 0 tcpqe 32 129 0 129 5 5 0 1 0 8 0 tcpcb 736 984 0 976 21 18 3 8 0 8 1 arp 120 18 0 12 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 1868 0 1858 5 3 2 3 0 8 1 ip6q 72 3 0 3 1 1 0 1 0 8 0 ip6af 40 5 0 5 1 1 0 1 0 8 0 nd6 48 29 0 21 1 0 1 1 0 8 0 kcovpl 48 8 0 6 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 486 0 292 14 1 13 13 0 8 0 art_table 32 487 0 292 2 0 2 2 0 8 0 art_node 16 115 0 73 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 5 1 0 1 1 0 8 0 semapl 112 1982 0 1972 1 0 1 1 0 8 0 shmpl 112 102 0 19 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 6278 0 4876 88 0 88 88 0 8 0 ffsino 272 6278 0 4876 94 0 94 94 0 8 0 nchpl 144 11945 0 10348 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 28477 0 28477 3 2 1 1 0 8 1 percpumem 16 40 0 6 1 0 1 1 0 8 0 scxspl 216 33087 0 33087 11 10 1 8 0 8 1 plimitpl 152 160 0 151 1 0 1 1 0 8 0 sigapl 424 4470 0 4437 4 0 4 4 0 8 0 futexpl 56 48479 0 48479 3 2 1 1 0 8 1 knotepl 112 87 0 0 2 0 2 2 0 8 0 kqueuepl 216 4640 0 4636 1 0 1 1 0 8 0 pipepl 336 365 0 354 5 3 2 2 0 8 0 fdescpl 496 4453 0 4437 3 0 3 3 0 8 0 filepl 152 17555 0 17455 10 5 5 5 0 8 1 lockfpl 104 484 0 481 1 0 1 1 0 8 0 lockfspl 48 188 0 185 1 0 1 1 0 8 0 sessionpl 144 23 0 13 1 0 1 1 0 8 0 pgrppl 48 40 0 30 1 0 1 1 0 8 0 ucredpl 96 2016 0 2007 1 0 1 1 0 8 0 zombiepl 144 4437 0 4436 1 0 1 1 0 8 0 processpl 1080 4470 0 4436 4 1 3 3 0 8 0 procpl 672 9838 0 9795 7 2 5 5 0 8 1 sosppl 168 121 0 118 5 4 1 1 0 8 0 sockpl 480 3332 0 3308 10 6 4 7 0 8 0 mcl64k 65536 11 0 0 2 0 2 2 0 8 0 mcl16k 16384 17 0 0 3 0 3 3 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 11 0 0 1 0 1 1 0 8 0 mcl8k 8192 14 0 0 2 0 2 2 0 8 0 mcl4k 4096 21 0 0 3 0 3 3 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 260 0 0 17 0 17 17 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 798 0 0 44 0 44 44 0 8 0 bufpl 280 8462 0 2145 452 0 452 452 0 8 0 anonpl 24 1187891 0 1173659 151 62 89 91 0 186 1 amapchunkpl 152 124805 0 124287 29 7 22 22 0 158 1 amappl16 200 11427 0 10907 66 38 28 34 0 8 0 amappl15 192 668 0 660 1 0 1 1 0 8 0 amappl14 184 14 0 10 1 0 1 1 0 8 0 amappl13 176 457 0 456 1 0 1 1 0 8 0 amappl12 168 12 0 6 1 0 1 1 0 8 0 amappl11 160 43 0 35 1 0 1 1 0 8 0 amappl10 152 405 0 397 1 0 1 1 0 8 0 amappl9 144 2874 0 2872 2 1 1 1 0 8 0 amappl8 136 610 0 498 4 0 4 4 0 8 0 amappl7 128 91 0 83 1 0 1 1 0 8 0 amappl6 120 3030 0 3006 1 0 1 1 0 8 0 amappl5 112 5148 0 5138 1 0 1 1 0 8 0 amappl4 104 708 0 675 1 0 1 1 0 8 0 amappl3 96 355 0 346 1 0 1 1 0 8 0 amappl2 88 5061 0 5013 3 1 2 2 0 8 0 amappl1 80 73720 0 73319 12 3 9 12 0 8 0 amappl 88 51960 0 51814 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 104 0 19 2 0 2 2 0 8 0 uaddrrnd 24 4453 0 4437 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4453 0 4437 1 0 1 1 0 8 0 vmmpekpl 168 28066 0 28044 2 0 2 2 0 8 0 vmmpepl 168 511542 0 509616 129 39 90 90 0 357 1 vmsppl 368 4452 0 4437 2 0 2 2 0 8 0 rwobjpl 56 91734 0 90494 26 8 18 19 0 8 0 pdppl 4096 8913 0 8874 65 24 41 45 0 8 2 pvpl 32 2635926 0 2618301 260 109 151 161 0 265 6 pmappl 232 4452 0 4437 3 2 1 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 370 0 50 10 0 10 10 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+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff8294f760) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x1f Xsyscall() at Xsyscall+0x111 end of kernel end trace frame: 0x7f7fffff97a0, count: 8 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+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff8294f760) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x1f Xsyscall() at Xsyscall+0x111 end of kernel end trace frame: 0x7f7fffff97a0, count: -7 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(fffffd806a5f5238) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff80002348a460,fffffd806a5f5238) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff8000ffff4540,ffff80002348a678,ffff80002348a6c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff80002348a740) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002348a740) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x58ac24f8a60, 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(fffffd806a5f5238) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff80002348a460,fffffd806a5f5238) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e9b20d8,ffff80002348a460,ffff8000ffff4540) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff8000ffff4540,ffff80002348a678,ffff80002348a6c0) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff80002348a740) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002348a740) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x58ac24f8a60, count: -8