panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 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(fffffd802b32f160) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802fb553d8,ffff8000ffff29f8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802fb553d8,ffff8000ffff29f8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802fb553d8,ffff8000ffff29f8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff29f8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff29f8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff29f8,ffff8000149ddf10,ffff8000149ddf80) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149ddfe0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdfa74) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdfa40, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic vput: v_writecount != 0 ddb> 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(fffffd802b32f160) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802fb553d8,ffff8000ffff29f8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802fb553d8,ffff8000ffff29f8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802fb553d8,ffff8000ffff29f8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff29f8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff29f8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff29f8,ffff8000149ddf10,ffff8000149ddf80) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149ddfe0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdfa74) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdfa40, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149ddc00 rbx 0xffff8000149ddcb0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149ddbc0 r9 0x1 r10 0 r11 0x401deb0f0c9e1c19 r12 0x3000000008 r13 0xffff8000149ddc10 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ddbf0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=281296 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3160,0xffff8000ffff2ef8 process=0xffff8000ffff6010 user=0xffff8000149d9000, vmspace=0xfffffd803f013220 estcpu=36, cpticks=14, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 60590 345435 5784 0 2 0 syz-executor.1 60590 306162 5784 0 3 0x4000080 ttyout syz-executor.1 60590 268882 5784 0 3 0x4000080 fsleep syz-executor.1 87744 30445 0 0 3 0x14200 bored sosplice 95040 210175 1 0 3 0x100083 ttyin getty 5784 388878 47195 0 2 0x482 syz-executor.1 37298 308857 47195 0 2 0x482 syz-executor.0 47195 63038 97298 0 3 0x82 thrsleep syz-fuzzer 47195 234182 97298 0 3 0x4000082 thrsleep syz-fuzzer 47195 24230 97298 0 3 0x4000082 thrsleep syz-fuzzer 47195 179865 97298 0 3 0x4000082 thrsleep syz-fuzzer 47195 52723 97298 0 3 0x4000082 thrsleep syz-fuzzer 47195 295021 97298 0 3 0x4000082 kqread syz-fuzzer 47195 364973 97298 0 3 0x4000082 thrsleep syz-fuzzer 97298 432802 61852 0 3 0x10008a pause ksh 61852 83700 88949 0 3 0x92 select sshd 88949 282302 1 0 3 0x80 select sshd 32565 287115 90737 73 2 0x100090 syslogd 90737 390536 1 0 3 0x100082 netio syslogd 27799 432125 1 77 3 0x100090 poll dhclient 86786 236426 1 0 3 0x80 poll dhclient 49234 123733 0 0 2 0x14200 zerothread 29377 179913 0 0 3 0x14200 aiodoned aiodoned 72061 58617 0 0 3 0x14200 syncer update 83968 275308 0 0 3 0x14200 cleaner cleaner 55019 479288 0 0 3 0x14200 reaper reaper 57930 72803 0 0 3 0x14200 pgdaemon pagedaemon 71291 466498 0 0 3 0x14200 bored crynlk 55950 360368 0 0 3 0x14200 bored crypto 22408 193885 0 0 3 0x40014200 acpi0 acpi0 64849 514958 0 0 3 0x14200 bored softnet 30024 130593 0 0 3 0x14200 bored systqmp 76419 11803 0 0 3 0x14200 bored systq 66696 324113 0 0 3 0x40014200 bored softclock 54899 350883 0 0 3 0x40014200 idle0 89300 15615 0 0 3 0x14200 bored smr 1 67410 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9527 6371K 7014K 78643K 13872 0 0 pcb 13 8K 8K 78643K 97 0 0 rtable 108 3K 4K 78643K 382 0 0 ifaddr 64 14K 14K 78643K 152 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 75 0 0 iov 0 0K 16K 78643K 152 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1217 76K 77K 78643K 2303 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 16 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 143 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1151 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 41 30K 54K 78643K 424 0 0 subproc 32 2K 2K 78643K 34 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 119 0 0 in_multi 33 2K 2K 78643K 68 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 297 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 90 20K 30K 78643K 3500 0 0 UVM aobj 39 2K 2K 78643K 48 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 52 0 0 NDP 14 0K 0K 78643K 41 0 0 temp 185 2727K 2794K 78643K 6665 0 0 kqueue 0 0K 0K 78643K 11 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 0 1 0 1 1 0 8 0 rtpcb 80 65 0 63 1 0 1 1 0 8 0 rtentry 112 47 0 3 2 0 2 2 0 8 0 unpcb 120 383 0 373 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1420 0 1420 1 1 0 1 0 8 0 tcpcb 544 198 0 194 1 0 1 1 0 8 0 inpcb 280 540 0 533 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 14 0 14 5 4 1 1 0 8 1 ppxss 1128 16 0 16 6 5 1 1 0 8 1 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 sysvmsgpl 40 10 0 5 1 0 1 1 0 8 0 semapl 112 141 0 131 1 0 1 1 0 8 0 shmpl 112 46 0 9 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3229 0 1818 46 0 46 46 0 8 0 ffsino 240 3229 0 1818 84 0 84 84 0 8 0 nchpl 144 5027 0 3385 61 0 61 61 0 8 0 uvmvnodes 72 4026 0 0 74 0 74 74 0 8 0 vnodes 200 4026 0 0 212 0 212 212 0 8 0 namei 1024 15166 0 15166 1 0 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 14493 0 14493 8 6 2 6 0 8 2 plimitpl 152 98 0 91 1 0 1 1 0 8 0 sigapl 432 1323 0 1309 2 0 2 2 0 8 0 futexpl 56 19007 0 19006 1 0 1 1 0 8 0 knotepl 112 272 0 253 2 1 1 2 0 8 0 kqueuepl 104 259 0 257 1 0 1 1 0 8 0 pipepl 112 800 0 781 3 2 1 2 0 8 0 fdescpl 424 1324 0 1309 2 0 2 2 0 8 0 filepl 120 7885 0 7783 4 0 4 4 0 8 0 lockfpl 104 506 0 506 2 1 1 1 0 8 1 lockfspl 48 169 0 169 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 30 0 20 1 0 1 1 0 8 0 ucredpl 96 1538 0 1531 1 0 1 1 0 8 0 zombiepl 144 1310 0 1309 2 1 1 1 0 8 0 processpl 864 1339 0 1309 4 0 4 4 0 8 0 procpl 632 2791 0 2753 4 0 4 4 0 8 0 sosppl 128 7 0 7 3 3 0 1 0 8 0 sockpl 384 1016 0 997 3 0 3 3 0 8 1 mcl64k 65536 302 0 302 34 33 1 33 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 17 0 17 4 3 1 1 0 8 1 mcl9k 9216 26 0 26 2 1 1 1 0 8 1 mcl8k 8192 17 0 17 5 4 1 1 0 8 1 mcl4k 4096 75 0 75 2 1 1 1 0 8 1 mcl2k2 2112 5 0 5 4 3 1 1 0 8 1 mcl2k 2048 55126 0 55076 17 10 7 13 0 8 0 mtagpl 80 37 0 10 2 1 1 1 0 8 0 mbufpl 256 93095 0 92949 32 22 10 23 0 8 0 bufpl 256 9099 0 3631 342 0 342 342 0 8 0 anonpl 16 114730 0 102951 72 23 49 63 0 62 1 amapchunkpl 152 5300 0 5184 16 11 5 12 0 158 0 amappl16 192 6476 0 5831 59 25 34 44 0 8 1 amappl15 184 8 0 7 1 0 1 1 0 8 0 amappl14 176 53 0 48 1 0 1 1 0 8 0 amappl13 168 9 0 8 1 0 1 1 0 8 0 amappl12 160 10 0 7 1 0 1 1 0 8 0 amappl11 152 615 0 601 1 0 1 1 0 8 0 amappl10 144 625 0 623 2 1 1 1 0 8 0 amappl9 136 558 0 555 1 0 1 1 0 8 0 amappl8 128 139 0 121 1 0 1 1 0 8 0 amappl7 120 593 0 588 1 0 1 1 0 8 0 amappl6 112 605 0 597 1 0 1 1 0 8 0 amappl5 104 144 0 133 1 0 1 1 0 8 0 amappl4 96 1548 0 1519 1 0 1 1 0 8 0 amappl3 88 211 0 200 1 0 1 1 0 8 0 amappl2 80 9813 0 9738 3 1 2 3 0 8 0 amappl1 72 32022 0 31584 25 16 9 19 0 8 0 amappl 80 3025 0 2983 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 47 0 9 1 0 1 1 0 8 0 uaddrrnd 24 1324 0 1309 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1324 0 1309 1 0 1 1 0 8 0 vmmpekpl 168 12337 0 12312 2 0 2 2 0 8 0 vmmpepl 168 158246 0 156428 134 54 80 114 0 357 0 vmsppl 272 1323 0 1309 2 1 1 2 0 8 0 pdppl 4096 2654 0 2618 6 1 5 6 0 8 0 pvpl 32 335614 0 320564 176 35 141 159 0 265 19 pmappl 200 1323 0 1309 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 545 0 75 15 0 15 15 0 8 0