panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 206645 83578 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 vput(fffffd80641ced08) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80644bd440,ffff800020b28018) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80644bd440,ffff800020b28018) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80644bd440,ffff800020b28018) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28018) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28018,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28018,ffff800020b6fdf0,ffff800020b6fe60) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020b6fed0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020b6fed0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff1704) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff16d0, count: 4 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 vput: v_writecount != 0 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:207 vput(fffffd80641ced08) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80644bd440,ffff800020b28018) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80644bd440,ffff800020b28018) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80644bd440,ffff800020b28018) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28018) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28018,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28018,ffff800020b6fdf0,ffff800020b6fe60) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020b6fed0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020b6fed0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff1704) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff16d0, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020b6fae0 rbx 0xffff800020b6fb90 rdx 0xffff800020b28018 rcx 0 rax 0 r8 0xffffffff81c83d13 kprintf+0x173 r9 0x1 r10 0x25 r11 0x3880cdc0c63273c7 r12 0x3000000008 r13 0xffff800020b6faf0 r14 0x100 r15 0x1 rip 0xffffffff81a69fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b6fad0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=31079 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b293d8,0xffffffff82362638 process=0xffff800020b7d180 user=0xffff800020b6a000, vmspace=0xfffffd806e7e8458 estcpu=36, cpticks=15, pctcpu=0.0 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 50486 93459 0 0 3 0x14200 bored sosplice 72829 469981 78970 0 3 0x2 biowait syz-executor.1 94888 296548 78970 0 3 0x82 nanosleep syz-executor.0 78970 120712 1159 0 3 0x82 thrsleep syz-fuzzer 78970 234453 1159 0 3 0x4000082 nanosleep syz-fuzzer 78970 237648 1159 0 3 0x4000082 thrsleep syz-fuzzer 78970 473012 1159 0 3 0x4000082 thrsleep syz-fuzzer 78970 48288 1159 0 3 0x4000082 kqread syz-fuzzer 78970 521416 1159 0 3 0x4000082 thrsleep syz-fuzzer 78970 476790 1159 0 3 0x4000082 thrsleep syz-fuzzer 78970 46748 1159 0 3 0x4000082 thrsleep syz-fuzzer 78970 111599 1159 0 3 0x4000082 thrsleep syz-fuzzer 78970 488440 1159 0 3 0x4000082 thrsleep syz-fuzzer 1159 200664 7175 0 3 0x10008a pause ksh 7175 267814 18680 0 3 0x92 select sshd 8221 320729 1 0 3 0x100083 ttyopn getty 18680 206254 1 0 3 0x80 select sshd 74502 267497 80199 74 3 0x100092 bpf pflogd 80199 406665 1 0 3 0x80 netio pflogd 97253 45784 42686 73 3 0x100090 kqread syslogd 42686 249323 1 0 3 0x100082 netio syslogd 20497 243254 1 77 3 0x100090 poll dhclient 34608 160809 1 0 3 0x80 poll dhclient 51383 94040 0 0 3 0x14200 pgzero zerothread 80948 89843 0 0 3 0x14200 aiodoned aiodoned 72309 406125 0 0 3 0x14200 syncer update 37162 54516 0 0 3 0x14200 cleaner cleaner 83578 206645 0 0 7 0x14200 reaper 19941 73073 0 0 3 0x14200 pgdaemon pagedaemon 73489 460552 0 0 3 0x14200 bored crynlk 59460 104553 0 0 3 0x14200 bored crypto 41931 238109 0 0 3 0x40014200 acpi0 acpi0 62165 142693 0 0 3 0x40014200 idle1 63842 71933 0 0 3 0x14200 bored softnet 22907 218294 0 0 3 0x14200 bored systqmp 70239 62364 0 0 3 0x14200 bored systq 39257 516279 0 0 3 0x40014200 bored softclock 90109 207130 0 0 3 0x40014200 idle0 35787 206953 0 0 3 0x14200 bored smr 1 367076 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 72829 (syz-executor.1) thread 0xffff800020b28508 (469981) exclusive rrwlock inode r = 0 (0xfffffd8065fea4e8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:556 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 ufs_ihashget+0x141 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x74 sys/ufs/ffs/ffs_vfsops.c:1323 #8 ufs_lookup+0x1575 sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 #10 vfs_lookup+0x7a5 sys/kern/vfs_lookup.c:567 #11 namei+0x61c sys/kern/vfs_lookup.c:248 #12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1768 #13 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #13 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806b125f78) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:556 #5 vfs_lookup+0xec sys/kern/vfs_lookup.c:418 #6 namei+0x61c sys/kern/vfs_lookup.c:248 #7 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1768 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9562 6626K 7260K 78643K 14267 0 0 pcb 13 8K 8K 78643K 109 0 0 rtable 113 4K 4K 78643K 396 0 0 ifaddr 68 14K 15K 78643K 151 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1521 0 0 iov 0 0K 24K 78643K 133 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 76K 77K 78643K 2312 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 20 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 111 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 1134 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 54 51K 71K 78643K 503 0 0 subproc 32 2K 2K 78643K 39 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 98 0 0 in_multi 33 2K 2K 78643K 45 0 0 ether_multi 1 0K 0K 78643K 3 0 0 mrt 0 0K 0K 78643K 17 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 325 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 100 21K 30K 78643K 4544 0 0 UVM aobj 49 2K 2K 78643K 59 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 80 0 0 NDP 15 0K 0K 78643K 40 0 0 temp 193 2748K 2872K 78643K 6848 0 0 kqueue 0 0K 0K 78643K 6 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 7 0 0 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 65 0 63 1 0 1 1 0 8 0 rtentry 112 53 0 8 2 0 2 2 0 8 0 unpcb 120 346 0 334 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 8559 0 8559 2 2 0 1 0 8 0 tcpcb 544 160 0 156 1 0 1 1 0 8 0 inpcb 280 493 0 485 1 0 1 1 0 8 0 rttmr 72 11 0 11 1 0 1 1 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 1 1 1 0 8 1 swfcl 56 3 0 0 1 0 1 1 0 8 0 ppxss 1128 17 0 17 4 3 1 1 0 8 1 pffrag 232 2 0 2 1 1 0 1 0 482 0 pffrnode 88 2 0 2 1 1 0 1 0 8 0 pffrent 40 6 0 6 1 1 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 21 0 11 1 0 1 1 0 8 0 pfstkey 112 21 0 11 1 0 1 1 0 8 0 pfstate 328 21 0 11 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 52 0 11 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 4 2 2 0 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 109 0 99 1 0 1 1 0 8 0 shmpl 112 57 0 10 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3127 0 1713 47 0 47 47 0 8 0 ffsino 272 3127 0 1713 96 0 96 96 0 8 0 nchpl 144 4890 0 3253 62 0 62 62 0 8 0 uvmvnodes 72 3998 0 0 73 0 73 73 0 8 0 vnodes 200 3998 0 0 211 0 211 211 0 8 0 namei 1024 14676 0 14676 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 14834 0 14833 15 14 1 6 0 8 0 plimitpl 152 101 0 93 1 0 1 1 0 8 0 sigapl 432 1334 0 1319 3 1 2 3 0 8 0 futexpl 56 13168 0 13168 1 0 1 1 0 8 1 knotepl 112 181 0 162 1 0 1 1 0 8 0 kqueuepl 104 206 0 204 1 0 1 1 0 8 0 pipepl 112 788 0 769 3 2 1 2 0 8 0 fdescpl 488 1335 0 1319 3 0 3 3 0 8 0 filepl 152 7344 0 7244 9 4 5 7 0 8 0 lockfpl 104 385 0 385 2 1 1 1 0 8 1 lockfspl 48 144 0 144 2 1 1 1 0 8 1 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 41 0 30 1 0 1 1 0 8 0 ucredpl 96 1161 0 1152 1 0 1 1 0 8 0 zombiepl 144 1320 0 1319 2 1 1 1 0 8 0 processpl 896 1351 0 1319 4 0 4 4 0 8 0 procpl 632 3753 0 3711 9 4 5 5 0 8 1 srpgc 64 3 0 3 2 1 1 1 0 8 1 sosppl 128 9 0 9 2 1 1 1 0 8 1 sockpl 384 917 0 896 5 2 3 4 0 8 0 mcl64k 65536 12 0 0 2 0 2 2 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 10 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 194 0 0 23 1 22 23 0 8 0 mtagpl 80 29 0 0 1 0 1 1 0 8 0 mbufpl 256 234 0 0 12 0 12 12 0 8 0 bufpl 256 8208 0 1179 440 0 440 440 0 8 0 anonpl 16 122999 0 111037 87 30 57 63 0 125 8 amapchunkpl 152 7491 0 7381 25 15 10 10 0 158 5 amappl16 192 6065 0 5407 51 16 35 42 0 8 1 amappl15 184 3 0 2 1 0 1 1 0 8 0 amappl14 176 53 0 47 1 0 1 1 0 8 0 amappl13 168 577 0 576 3 2 1 1 0 8 0 amappl12 160 23 0 18 1 0 1 1 0 8 0 amappl11 152 58 0 43 1 0 1 1 0 8 0 amappl10 144 605 0 599 1 0 1 1 0 8 0 amappl9 136 601 0 598 1 0 1 1 0 8 0 amappl8 128 142 0 126 1 0 1 1 0 8 0 amappl7 120 566 0 560 1 0 1 1 0 8 0 amappl6 112 61 0 53 1 0 1 1 0 8 0 amappl5 104 143 0 128 1 0 1 1 0 8 0 amappl4 96 1601 0 1574 2 1 1 2 0 8 0 amappl3 88 201 0 190 1 0 1 1 0 8 0 amappl2 80 9813 0 9741 3 1 2 3 0 8 0 amappl1 72 38363 0 37919 25 15 10 20 0 8 0 amappl 80 4004 0 3965 1 0 1 1 0 84 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 58 0 10 1 0 1 1 0 8 0 uaddrrnd 24 1335 0 1319 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1335 0 1319 1 0 1 1 0 8 0 vmmpekpl 168 15403 0 15376 3 1 2 2 0 8 0 vmmpepl 168 167238 0 165445 131 46 85 99 0 357 2 vmsppl 368 1334 0 1319 2 0 2 2 0 8 0 pdppl 4096 2678 0 2638 8 2 6 6 0 8 0 pvpl 32 377876 0 362721 197 53 144 156 0 265 20 pmappl 232 1334 0 1319 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 610 0 7 18 0 18 18 0 8 0