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(fffffd802fde4908) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803ec35b58,ffff800014940ee8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803ec35b58,ffff800014940ee8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803ec35b58,ffff800014940ee8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014940ee8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014940ee8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014940ee8,ffff8000159fe550,ffff8000159fe5c0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159fe620) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffec464) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec430, 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(fffffd802fde4908) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803ec35b58,ffff800014940ee8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803ec35b58,ffff800014940ee8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803ec35b58,ffff800014940ee8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014940ee8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014940ee8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014940ee8,ffff8000159fe550,ffff8000159fe5c0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159fe620) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffec464) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec430, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159fe240 rbx 0xffff8000159fe2f0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159fe200 r9 0x1 r10 0 r11 0x5b1e54172a4cc07a r12 0x3000000008 r13 0xffff8000159fe250 r14 0x100 r15 0x1 rip 0xffffffff81bc2978 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159fe230 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=391679 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014941160,0xffff8000149413e8 process=0xffff8000ffff70f0 user=0xffff8000159f9000, vmspace=0xfffffd803f00ccc0 estcpu=36, cpticks=17, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 52788 383372 5456 0 2 0x480 syz-executor.0 52788 251833 5456 0 3 0x4000080 bell syz-executor.0 84363 105282 0 0 3 0x14200 bored sosplice 86978 456468 66328 0 2 0x482 syz-executor.1 72283 421498 1 0 3 0x100083 ttyin getty 5456 481071 66328 0 2 0x482 syz-executor.0 66328 215325 26421 0 3 0x82 thrsleep syz-fuzzer 66328 436869 26421 0 3 0x4000082 thrsleep syz-fuzzer 66328 223978 26421 0 3 0x4000082 thrsleep syz-fuzzer 66328 168142 26421 0 3 0x4000082 thrsleep syz-fuzzer 66328 174344 26421 0 3 0x4000082 kqread syz-fuzzer 66328 70621 26421 0 3 0x4000082 thrsleep syz-fuzzer 66328 86213 26421 0 3 0x4000082 thrsleep syz-fuzzer 26421 167967 38313 0 3 0x10008a pause ksh 38313 32889 81118 0 3 0x92 select sshd 81118 312235 1 0 3 0x80 select sshd 32736 61864 85521 73 2 0x100090 syslogd 85521 135297 1 0 3 0x100082 netio syslogd 65705 92392 1 77 3 0x100090 poll dhclient 29157 384437 1 0 3 0x80 poll dhclient 3206 409326 0 0 2 0x14200 zerothread 70514 469367 0 0 3 0x14200 aiodoned aiodoned 54151 162943 0 0 3 0x14200 syncer update 93897 164205 0 0 3 0x14200 cleaner cleaner 57350 298159 0 0 3 0x14200 reaper reaper 27113 236208 0 0 3 0x14200 pgdaemon pagedaemon 48549 59414 0 0 3 0x14200 bored crynlk 47806 128491 0 0 3 0x14200 bored crypto 87427 355774 0 0 3 0x40014200 acpi0 acpi0 42675 489971 0 0 3 0x14200 bored softnet 4529 305642 0 0 3 0x14200 bored systqmp 9112 279217 0 0 3 0x14200 bored systq 58474 80515 0 0 3 0x40014200 bored softclock 51990 307764 0 0 3 0x40014200 idle0 12835 225673 0 0 3 0x14200 bored smr 1 262062 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 9518 6360K 6869K 78643K 12738 0 0 pcb 13 8K 8K 78643K 111 0 0 rtable 108 3K 4K 78643K 390 0 0 ifaddr 61 13K 14K 78643K 143 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 62 0 0 iov 0 0K 24K 78643K 155 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1224 77K 77K 78643K 2038 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 12 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 80 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 923 0 0 sigio 1 0K 0K 78643K 20 0 0 proc 42 30K 46K 78643K 461 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 61 0 0 in_multi 33 2K 2K 78643K 58 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 267 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 93 21K 36K 78643K 3034 0 0 UVM aobj 34 2K 3K 78643K 37 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 22 0 0 NDP 13 0K 0K 78643K 40 0 0 temp 177 2727K 2793K 78643K 5971 0 0 kqueue 0 0K 0K 78643K 10 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 8 0 2 1 0 1 1 0 8 0 rtpcb 80 61 0 59 1 0 1 1 0 8 0 rtentry 112 56 0 12 2 0 2 2 0 8 0 unpcb 120 345 0 335 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1296 0 1296 1 1 0 1 0 8 0 tcpcb 544 148 0 144 1 0 1 1 0 8 0 inpcb 280 430 0 423 1 0 1 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 ppxss 1128 13 0 13 4 4 0 1 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 26 0 17 1 0 1 1 0 8 0 semapl 112 78 0 68 1 0 1 1 0 8 0 shmpl 112 35 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2907 0 1494 46 0 46 46 0 8 0 ffsino 240 2907 0 1494 84 0 84 84 0 8 0 nchpl 144 4401 0 2782 61 0 61 61 0 8 0 uvmvnodes 72 3475 0 0 64 0 64 64 0 8 0 vnodes 200 3475 0 0 183 0 183 183 0 8 0 namei 1024 13157 0 13157 1 0 1 1 0 8 1 scxspl 192 12791 0 12791 10 9 1 6 0 8 1 plimitpl 152 94 0 87 1 0 1 1 0 8 0 sigapl 432 1092 0 1078 2 0 2 2 0 8 0 futexpl 56 14931 0 14931 1 0 1 1 0 8 1 knotepl 112 270 0 251 1 0 1 1 0 8 0 kqueuepl 104 234 0 232 1 0 1 1 0 8 0 pipepl 112 804 0 785 3 2 1 2 0 8 0 fdescpl 424 1093 0 1078 2 0 2 2 0 8 0 filepl 120 6711 0 6615 6 2 4 5 0 8 0 lockfpl 104 349 0 348 2 1 1 1 0 8 0 lockfspl 48 123 0 122 2 1 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 33 0 23 1 0 1 1 0 8 0 ucredpl 96 1221 0 1214 1 0 1 1 0 8 0 zombiepl 144 1079 0 1078 1 0 1 1 0 8 0 processpl 864 1108 0 1078 4 0 4 4 0 8 0 procpl 632 2264 0 2227 4 0 4 4 0 8 0 sosppl 128 14 0 14 3 2 1 1 0 8 1 sockpl 384 846 0 827 4 1 3 4 0 8 1 mcl64k 65536 37 0 37 3 2 1 1 0 8 1 mcl16k 16384 6 0 6 4 3 1 1 0 8 1 mcl12k 12288 16 0 16 3 2 1 1 0 8 1 mcl9k 9216 12 0 12 5 4 1 1 0 8 1 mcl8k 8192 17 0 17 3 3 0 1 0 8 0 mcl4k 4096 50 0 50 4 3 1 1 0 8 1 mcl2k2 2112 5 0 5 3 3 0 1 0 8 0 mcl2k 2048 55988 0 55941 16 9 7 13 0 8 0 mtagpl 80 20 0 6 2 1 1 1 0 8 0 mbufpl 256 92736 0 92636 10 2 8 8 0 8 0 bufpl 256 7896 0 3347 285 0 285 285 0 8 0 anonpl 16 103840 0 91917 73 13 60 64 0 62 12 amapchunkpl 152 5006 0 4898 25 20 5 18 0 158 0 amappl16 192 5169 0 4509 49 12 37 41 0 8 4 amappl14 176 68 0 60 1 0 1 1 0 8 0 amappl13 168 137 0 136 1 0 1 1 0 8 0 amappl12 160 20 0 17 1 0 1 1 0 8 0 amappl11 152 54 0 43 1 0 1 1 0 8 0 amappl10 144 504 0 502 1 0 1 1 0 8 0 amappl9 136 883 0 878 1 0 1 1 0 8 0 amappl8 128 442 0 424 1 0 1 1 0 8 0 amappl7 120 472 0 468 1 0 1 1 0 8 0 amappl6 112 51 0 45 1 0 1 1 0 8 0 amappl5 104 147 0 137 1 0 1 1 0 8 0 amappl4 96 1445 0 1416 1 0 1 1 0 8 0 amappl3 88 197 0 186 1 0 1 1 0 8 0 amappl2 80 7862 0 7785 3 1 2 3 0 8 0 amappl1 72 28551 0 28127 26 17 9 19 0 8 0 amappl 80 2523 0 2485 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 36 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1093 0 1078 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1093 0 1078 1 0 1 1 0 8 0 vmmpekpl 168 11784 0 11762 2 0 2 2 0 8 0 vmmpepl 168 132989 0 131180 119 37 82 94 0 357 3 vmsppl 272 1092 0 1078 2 1 1 2 0 8 0 pdppl 4096 2193 0 2156 6 1 5 6 0 8 0 pvpl 32 305456 0 290450 172 19 153 157 0 265 31 pmappl 200 1092 0 1078 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 439 0 28 12 0 12 12 0 8 0