panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 440522 10180 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(fffffd807e349340) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd806438b260,ffff800020b5f168) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd806438b260,ffff800020b5f168) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd806438b260,ffff800020b5f168) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b5f168) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b5f168,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b5f168,ffff800020be1590,ffff800020be1600) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020be1670) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020be1670) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff0bf4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff0bc0, 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(fffffd807e349340) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd806438b260,ffff800020b5f168) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd806438b260,ffff800020b5f168) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd806438b260,ffff800020b5f168) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b5f168) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b5f168,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b5f168,ffff800020be1590,ffff800020be1600) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020be1670) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020be1670) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff0bf4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff0bc0, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020be1280 rbx 0xffff800020be1330 rdx 0xffff800020b5f168 rcx 0 rax 0 r8 0xffffffff81c83d13 kprintf+0x173 r9 0x1 r10 0x25 r11 0xd2584eaeabe22673 r12 0x3000000008 r13 0xffff800020be1290 r14 0x100 r15 0x1 rip 0xffffffff81a69fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020be1270 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=229656 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b289f8,0xffffffff82362638 process=0xffff800020b7d500 user=0xffff800020bdc000, vmspace=0xfffffd807f00ba10 estcpu=36, cpticks=9, pctcpu=0.0 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 2739 38102 70766 0 3 0x2 biowait syz-executor.0 69671 291081 0 0 3 0x14200 bored sosplice 74906 29777 70766 0 3 0x82 nanosleep syz-executor.1 70766 403912 40893 0 3 0x82 thrsleep syz-fuzzer 70766 280396 40893 0 3 0x4000082 nanosleep syz-fuzzer 70766 211133 40893 0 3 0x4000082 thrsleep syz-fuzzer 70766 58140 40893 0 3 0x4000082 thrsleep syz-fuzzer 70766 207994 40893 0 3 0x4000082 thrsleep syz-fuzzer 70766 363023 40893 0 3 0x4000082 nanosleep syz-fuzzer 70766 323722 40893 0 3 0x4000082 kqread syz-fuzzer 70766 141436 40893 0 3 0x4000082 thrsleep syz-fuzzer 70766 313440 40893 0 3 0x4000082 thrsleep syz-fuzzer 70766 45258 40893 0 3 0x4000082 thrsleep syz-fuzzer 40893 328144 79479 0 3 0x10008a pause ksh 79479 396457 7088 0 3 0x92 select sshd 38304 256150 1 0 3 0x100083 ttyin getty 7088 46665 1 0 3 0x80 select sshd 74470 290695 44008 74 3 0x100092 bpf pflogd 44008 472609 1 0 3 0x80 netio pflogd 8431 458742 36296 73 3 0x100090 kqread syslogd 36296 228414 1 0 3 0x100082 netio syslogd 69670 36730 1 77 3 0x100090 poll dhclient 21527 217100 1 0 3 0x80 poll dhclient 21874 238363 0 0 3 0x14200 pgzero zerothread 9976 79945 0 0 3 0x14200 aiodoned aiodoned 39558 23894 0 0 3 0x14200 syncer update 6297 178287 0 0 3 0x14200 cleaner cleaner 10180 440522 0 0 7 0x14200 reaper 62849 351244 0 0 3 0x14200 pgdaemon pagedaemon 49606 252100 0 0 3 0x14200 bored crynlk 84302 490673 0 0 3 0x14200 bored crypto 91022 240656 0 0 3 0x40014200 acpi0 acpi0 55028 121885 0 0 3 0x40014200 idle1 37029 212175 0 0 3 0x14200 bored softnet 64185 380514 0 0 3 0x14200 bored systqmp 13191 352425 0 0 3 0x14200 bored systq 15359 395580 0 0 3 0x40014200 bored softclock 16532 444387 0 0 3 0x40014200 idle0 66374 192348 0 0 3 0x14200 bored smr 1 393001 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 2739 (syz-executor.0) thread 0xffff800020b289f8 (38102) exclusive rrwlock inode r = 0 (0xfffffd8065dc24e8) #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 (0xfffffd8065dc2708) #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 9569 6565K 7015K 78643K 12512 0 0 pcb 13 8K 8K 78643K 77 0 0 rtable 112 12K 12K 78643K 380 0 0 ifaddr 74 15K 15K 78643K 135 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1495 0 0 iov 0 0K 18K 78643K 110 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 77K 78643K 1953 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 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 77 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 842 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 54 51K 71K 78643K 568 0 0 subproc 32 2K 2K 78643K 51 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 65 0 0 in_multi 33 2K 2K 78643K 60 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 303 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 99 21K 31K 78643K 3640 0 0 UVM aobj 45 3K 3K 78643K 49 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 51 0 0 NDP 17 0K 0K 78643K 38 0 0 temp 207 2748K 2876K 78643K 5900 0 0 kqueue 0 0K 0K 78643K 8 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 8 0 2 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 45 0 43 1 0 1 1 0 8 0 rtentry 112 58 0 14 2 0 2 2 0 8 0 unpcb 120 290 0 278 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 7909 0 7909 2 2 0 2 0 8 0 tcpcb 544 122 0 118 1 0 1 1 0 8 0 inpcb 280 392 0 385 1 0 1 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 9 0 9 3 2 1 1 0 8 1 pffrent 40 2 0 2 1 0 1 1 0 8 1 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 26 0 12 1 0 1 1 0 8 0 pfstkey 112 26 0 12 1 0 1 1 0 8 0 pfstate 328 26 0 11 2 0 2 2 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 235 0 44 14 2 12 12 0 8 0 art_table 32 236 0 44 2 0 2 2 0 8 0 art_node 16 55 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 23 0 16 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 74 0 64 1 0 1 1 0 8 0 shmpl 112 47 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2748 0 1327 47 0 47 47 0 8 0 ffsino 272 2748 0 1327 96 0 96 96 0 8 0 nchpl 144 4138 0 2503 62 0 62 62 0 8 0 uvmvnodes 72 3278 0 0 60 0 60 60 0 8 0 vnodes 200 3278 0 0 173 0 173 173 0 8 0 namei 1024 12247 0 12247 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 11574 0 11573 13 9 4 6 0 8 3 plimitpl 152 94 0 86 1 0 1 1 0 8 0 sigapl 432 1039 0 1024 3 1 2 3 0 8 0 futexpl 56 10235 0 10235 1 0 1 1 0 8 1 knotepl 112 182 0 163 1 0 1 1 0 8 0 kqueuepl 104 163 0 161 1 0 1 1 0 8 0 pipepl 112 604 0 585 2 1 1 2 0 8 0 fdescpl 488 1040 0 1024 3 0 3 3 0 8 0 filepl 152 5873 0 5773 6 1 5 5 0 8 0 lockfpl 104 269 0 269 2 1 1 1 0 8 1 lockfspl 48 103 0 103 2 1 1 1 0 8 1 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 27 0 16 1 0 1 1 0 8 0 ucredpl 96 1097 0 1088 1 0 1 1 0 8 0 zombiepl 144 1025 0 1024 2 1 1 1 0 8 0 processpl 896 1056 0 1024 4 0 4 4 0 8 0 procpl 632 2809 0 2767 5 0 5 5 0 8 0 srpgc 64 2 0 2 1 1 0 1 0 8 0 sosppl 128 5 0 5 2 1 1 1 0 8 1 sockpl 384 736 0 715 5 2 3 4 0 8 0 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 8 0 0 1 0 1 1 0 8 0 mcl9k 9216 5 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 212 0 0 26 0 26 26 0 8 0 mtagpl 80 17 0 0 1 0 1 1 0 8 0 mbufpl 256 240 0 0 15 0 15 15 0 8 0 bufpl 256 7506 0 1168 397 0 397 397 0 8 0 anonpl 16 100204 0 88597 78 30 48 64 0 125 0 amapchunkpl 152 5990 0 5880 16 7 9 12 0 158 3 amappl16 192 4613 0 3979 50 17 33 44 0 8 1 amappl15 184 257 0 257 1 1 0 1 0 8 0 amappl14 176 311 0 307 1 0 1 1 0 8 0 amappl13 168 406 0 404 2 1 1 1 0 8 0 amappl12 160 19 0 16 1 0 1 1 0 8 0 amappl11 152 61 0 46 1 0 1 1 0 8 0 amappl10 144 219 0 212 1 0 1 1 0 8 0 amappl9 136 613 0 610 1 0 1 1 0 8 0 amappl8 128 169 0 146 1 0 1 1 0 8 0 amappl7 120 177 0 173 1 0 1 1 0 8 0 amappl6 112 59 0 51 1 0 1 1 0 8 0 amappl5 104 148 0 131 1 0 1 1 0 8 0 amappl4 96 1047 0 1019 2 1 1 2 0 8 0 amappl3 88 725 0 715 1 0 1 1 0 8 0 amappl2 80 7308 0 7236 3 1 2 3 0 8 0 amappl1 72 32403 0 31950 27 17 10 20 0 8 0 amappl 80 3077 0 3038 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 48 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1040 0 1024 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1040 0 1024 1 0 1 1 0 8 0 vmmpekpl 168 11765 0 11736 2 0 2 2 0 8 0 vmmpepl 168 130678 0 128903 143 54 89 100 0 357 9 vmsppl 368 1039 0 1024 2 0 2 2 0 8 0 pdppl 4096 2088 0 2048 6 0 6 6 0 8 0 pvpl 32 310051 0 295257 185 49 136 158 0 265 15 pmappl 232 1039 0 1024 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 573 0 6 17 0 17 17 0 8 0