panic: mutex 0xfffffd806e8a4798 not held in knote_dequeue Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 365225 69174 0 0 0 0 syz-executor.0 *220861 69174 0 0 0x4000000 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic(ffffffff82460c20) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e7a4690) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000222cf050,fffffd806e7a4690) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff80002129afc8,ffff8000222cf308,ffff8000222cf350) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff8000222cf3d0) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222cf3d0) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa2ad50c01a0, 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 0xfffffd806e8a4798 not held in knote_dequeue ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic(ffffffff82460c20) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e7a4690) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000222cf050,fffffd806e7a4690) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff80002129afc8,ffff8000222cf308,ffff8000222cf350) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff8000222cf3d0) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222cf3d0) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa2ad50c01a0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000222cee40 rbx 0xffff800020d59bf7 rdx 0x8b rcx 0x2 rax 0x3a r8 0xffffffff816e1c04 kprintf+0x144 r9 0x1 r10 0xb3c74d313b282bec r11 0x62c8603f9af29e60 r12 0xffff800020d599f8 r13 0 r14 0 r15 0x1 rip 0xffffffff81910f78 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000222cee30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=220861 stat=onproc flags process=0 proc=4000000 pri=82, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff80002129aa88,0xffffffff827da780 process=0xffff800021224880 user=0xffff8000222ca000, vmspace=0xfffffd807f009730 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69174 365225 36578 0 7 0 syz-executor.0 69174 250876 36578 0 3 0x4000080 fsleep syz-executor.0 *69174 220861 36578 0 7 0x4000000 syz-executor.0 53529 239476 48334 0 3 0x2 biowait syz-executor.1 36578 162133 48334 0 3 0x82 nanoslp syz-executor.0 48334 408441 88548 0 3 0x82 nanoslp syz-fuzzer 48334 351817 88548 0 3 0x4000082 nanoslp syz-fuzzer 48334 260074 88548 0 3 0x4000082 kqread syz-fuzzer 48334 164082 88548 0 3 0x4000082 thrsleep syz-fuzzer 48334 179510 88548 0 3 0x4000082 thrsleep syz-fuzzer 48334 57752 88548 0 3 0x4000082 thrsleep syz-fuzzer 48334 57817 88548 0 3 0x4000082 thrsleep syz-fuzzer 48334 65025 88548 0 3 0x4000082 thrsleep syz-fuzzer 88548 294017 34874 0 3 0x10008a sigsusp ksh 34874 220853 76065 0 3 0x92 select sshd 74299 59249 1 0 3 0x100083 ttyin getty 76065 123998 1 0 3 0x80 select sshd 56695 131963 6911 74 3 0x100092 bpf pflogd 6911 253080 1 0 3 0x80 netio pflogd 29975 418106 19779 73 3 0x100090 kqread syslogd 19779 372341 1 0 3 0x100082 netio syslogd 39301 163478 1 77 3 0x100090 poll dhclient 26283 500649 1 0 3 0x80 poll dhclient 4644 4784 0 0 3 0x14200 bored smr 81626 407949 0 0 2 0x14200 zerothread 39117 238826 0 0 3 0x14200 aiodoned aiodoned 58288 424791 0 0 3 0x14200 syncer update 93678 143677 0 0 3 0x14200 cleaner cleaner 67077 391858 0 0 3 0x14200 reaper reaper 23197 42003 0 0 3 0x14200 pgdaemon pagedaemon 67891 475176 0 0 3 0x14200 bored crynlk 80642 306450 0 0 3 0x14200 bored crypto 3422 315996 0 0 3 0x14200 bored viomb 97147 93776 0 0 3 0x40014200 acpi0 acpi0 43712 19388 0 0 3 0x40014200 idle1 81290 236218 0 0 3 0x14200 bored softnet 75852 255248 0 0 3 0x14200 bored systqmp 76323 24052 0 0 3 0x14200 bored systq 74240 267285 0 0 3 0x40014200 bored softclock 40907 26637 0 0 3 0x40014200 idle0 1 139395 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 69174 (syz-executor.0) thread 0xffff80002129afc8 (220861) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff827d4278) #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 Process 53529 (syz-executor.1) thread 0xffff80002129b508 (239476) exclusive rrwlock inode r = 0 (0xfffffd806d6d5708) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 rw_enter+0x3ee sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x8b sys/kern/kern_rwlock.c:461 #3 ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x147 sys/ufs/ffs/ffs_vfsops.c:1350 #5 ffs_inode_alloc+0x1c9 sys/ufs/ffs/ffs_alloc.c:394 #6 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1162 #7 VOP_MKDIR+0xc6 sys/kern/vfs_vops.c:457 #8 domkdirat+0x121 sys/kern/vfs_syscalls.c:3075 #9 syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] #9 syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806ab273c8) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 rw_enter+0x3ee sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x8b sys/kern/kern_rwlock.c:461 #3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:614 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:579 #5 vfs_lookup+0xec sys/kern/vfs_lookup.c:413 #6 namei+0x58a sys/kern/vfs_lookup.c:245 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:3060 #8 syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] #8 syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10121 6481K 6496K 78643K 11266 0 pcb 13 8K 8K 78643K 17 0 rtable 105 3K 3K 78643K 195 0 ifaddr 44 10K 10K 78643K 45 0 counters 44 34K 34K 78643K 44 0 ioctlops 0 0K 4K 78643K 1469 0 iov 0 0K 0K 78643K 7 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 1 0 vnodes 1220 77K 77K 78643K 1229 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 1K 1K 78643K 2 0 sem 7 0K 0K 78643K 10 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 4546 0 sigio 0 0K 0K 78643K 46 0 proc 59 63K 95K 78643K 439 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 2 0 in_multi 33 2K 2K 78643K 43 0 ether_multi 1 0K 0K 78643K 3 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 37 175K 175K 78643K 37 0 exec 0 0K 2K 78643K 354 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 282 33K 34K 78643K 54668 0 UVM aobj 5 2K 2K 78643K 5 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 6 0K 0K 78643K 10 0 temp 66 3975K 4039K 78643K 11099 0 kqueue 5 5K 5K 78643K 7 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 19 0 17 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 57 0 47 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1732 0 1732 2 2 0 2 0 8 0 tcpcb 736 3359 0 3355 16 13 3 7 0 8 2 arp 120 6 0 0 1 0 1 1 0 8 0 inpcb 304 3391 0 3385 2 1 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 kcovpl 48 2 0 0 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 11 0 9 1 0 1 1 0 8 0 pfstkey 112 11 0 9 1 0 1 1 0 8 0 pfstate 320 11 0 9 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 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 semapl 112 8 0 3 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 5944 0 4536 89 0 89 89 0 8 0 ffsino 272 5944 0 4536 94 0 94 94 0 8 0 nchpl 144 10705 0 9090 62 2 60 61 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 25779 0 25778 2 1 1 1 0 8 0 percpumem 16 34 0 0 1 0 1 1 0 8 0 scxspl 216 32032 0 32031 9 8 1 8 0 8 0 plimitpl 152 15 0 7 1 0 1 1 0 8 0 sigapl 424 4761 0 4729 4 0 4 4 0 8 0 futexpl 56 24147 0 24146 1 0 1 1 0 8 0 knotepl 112 32 0 0 1 0 1 1 0 8 0 kqueuepl 216 4441 0 4437 1 0 1 1 0 8 0 pipepl 336 157 0 146 5 3 2 2 0 8 1 fdescpl 496 4745 0 4729 3 0 3 3 0 8 0 filepl 152 16680 0 16577 7 2 5 5 0 8 1 lockfpl 104 967 0 966 1 0 1 1 0 8 0 lockfspl 48 476 0 475 1 0 1 1 0 8 0 sessionpl 144 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 1080 0 1071 1 0 1 1 0 8 0 zombiepl 144 4729 0 4729 2 1 1 1 0 8 1 processpl 1080 4761 0 4729 3 0 3 3 0 8 0 procpl 672 9499 0 9458 5 1 4 4 0 8 0 sockpl 480 3467 0 3449 5 2 3 4 0 8 0 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 325 0 0 40 0 40 40 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 351 0 0 22 0 22 22 0 8 0 bufpl 280 7956 0 1637 452 0 452 452 0 8 0 anonpl 24 1165218 0 1139075 165 3 162 163 0 186 0 amapchunkpl 152 128946 0 127974 42 3 39 39 0 158 0 amappl16 200 6713 0 5904 44 1 43 43 0 8 0 amappl15 192 61 0 54 1 0 1 1 0 8 0 amappl14 184 3 0 1 1 0 1 1 0 8 0 amappl13 176 32 0 28 1 0 1 1 0 8 0 amappl12 168 5 0 2 1 0 1 1 0 8 0 amappl11 160 41 0 28 1 0 1 1 0 8 0 amappl10 152 2279 0 2267 1 0 1 1 0 8 0 amappl9 144 50 0 50 2 2 0 1 0 8 0 amappl8 136 2622 0 2570 2 0 2 2 0 8 0 amappl7 128 2350 0 2340 1 0 1 1 0 8 0 amappl6 120 112 0 97 1 0 1 1 0 8 0 amappl5 112 7252 0 7238 1 0 1 1 0 8 0 amappl4 104 528 0 498 2 1 1 2 0 8 0 amappl3 96 107 0 97 1 0 1 1 0 8 0 amappl2 88 4866 0 4822 3 1 2 2 0 8 0 amappl1 80 76432 0 76011 14 4 10 12 0 8 0 amappl 88 54262 0 54049 6 0 6 6 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 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 4745 0 4729 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4745 0 4729 1 0 1 1 0 8 0 vmmpekpl 168 18729 0 18702 2 0 2 2 0 8 0 vmmpepl 168 522120 0 519964 125 26 99 124 0 357 1 vmsppl 368 4744 0 4729 2 0 2 2 0 8 0 rwobjpl 56 88989 0 87394 23 0 23 23 0 8 0 pdppl 4096 9497 0 9458 61 20 41 45 0 8 2 pvpl 32 2645618 0 2616273 255 10 245 248 0 265 1 pmappl 232 4744 0 4729 2 1 1 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 356 0 40 10 0 10 10 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff8275cff0) 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: 0x7f7ffffcdb30, count: 12 ddb{0}> trace x86_ipi_db(ffffffff8275cff0) 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: 0x7f7ffffcdb30, count: -3 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(ffffffff82460c20) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e7a4690) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000222cf050,fffffd806e7a4690) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff80002129afc8,ffff8000222cf308,ffff8000222cf350) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff8000222cf3d0) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222cf3d0) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa2ad50c01a0, count: 7 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic(ffffffff82460c20) at panic+0x177 sys/kern/subr_prf.c:202 knote_dequeue(fffffd806e7a4690) at knote_dequeue+0x12b sys/kern/kern_event.c:1860 filt_timermodify(ffff8000222cf050,fffffd806e7a4690) at filt_timermodify+0x6f sys/kern/kern_event.c:479 kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 filter_modify sys/kern/kern_event.c:662 [inline] kqueue_register(fffffd806e8a4798,ffff8000222cf050,ffff80002129afc8) at kqueue_register+0xa89 sys/kern/kern_event.c:1125 sys_kevent(ffff80002129afc8,ffff8000222cf308,ffff8000222cf350) at sys_kevent+0x214 sys/kern/kern_event.c:887 syscall(ffff8000222cf3d0) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222cf3d0) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa2ad50c01a0, count: -8