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(fffffd80046de0b8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802fabb9f0,ffff800014941b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802fabb9f0,ffff800014941b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802fabb9f0,ffff800014941b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941b40,ffff800016bf1f60,ffff800016bf1fd0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016bf2030) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffe58e4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe58b0, 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(fffffd80046de0b8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802fabb9f0,ffff800014941b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802fabb9f0,ffff800014941b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802fabb9f0,ffff800014941b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941b40,ffff800016bf1f60,ffff800016bf1fd0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016bf2030) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffe58e4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe58b0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016bf1c50 rbx 0xffff800016bf1d00 rdx 0x2 rcx 0 rax 0 r8 0xffff800016bf1c10 r9 0x1 r10 0 r11 0x909d391da0735130 r12 0x3000000008 r13 0xffff800016bf1c60 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016bf1c40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=369499 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014941160,0xffffffff822db690 process=0xffff8000ffff6d90 user=0xffff800016bed000, vmspace=0xfffffd803f00c990 estcpu=36, cpticks=10, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 15044 92868 82712 0 2 0x480 syz-executor.0 15044 196691 82712 0 3 0x4000080 netio syz-executor.0 15044 146244 82712 0 3 0x4000080 fsleep syz-executor.0 38237 281582 1 0 3 0x100083 ttyin getty 95725 462577 0 0 3 0x14200 bored sosplice 82712 443845 74288 0 2 0x482 syz-executor.0 55205 458668 74288 0 2 0x482 syz-executor.1 74288 127878 23212 0 3 0x82 thrsleep syz-fuzzer 74288 334706 23212 0 3 0x4000082 thrsleep syz-fuzzer 74288 238729 23212 0 3 0x4000082 kqread syz-fuzzer 74288 142499 23212 0 3 0x4000082 thrsleep syz-fuzzer 74288 490817 23212 0 3 0x4000082 thrsleep syz-fuzzer 74288 329358 23212 0 3 0x4000082 thrsleep syz-fuzzer 74288 69224 23212 0 3 0x4000082 thrsleep syz-fuzzer 23212 296527 54312 0 3 0x10008a pause ksh 54312 275357 75795 0 3 0x92 select sshd 75795 42598 1 0 3 0x80 select sshd 6293 109500 117 73 2 0x100090 syslogd 117 304117 1 0 3 0x100082 netio syslogd 48273 518736 1 77 3 0x100090 poll dhclient 64194 26066 1 0 3 0x80 poll dhclient 49693 478449 0 0 2 0x14200 zerothread 85557 208458 0 0 3 0x14200 aiodoned aiodoned 26983 437973 0 0 3 0x14200 syncer update 22727 46803 0 0 3 0x14200 cleaner cleaner 93783 120752 0 0 3 0x14200 reaper reaper 24821 91786 0 0 3 0x14200 pgdaemon pagedaemon 38246 78269 0 0 3 0x14200 bored crynlk 73006 147937 0 0 3 0x14200 bored crypto 13033 54318 0 0 3 0x40014200 acpi0 acpi0 83980 103741 0 0 3 0x14200 bored softnet 1474 460220 0 0 3 0x14200 bored systqmp 58901 49999 0 0 3 0x14200 bored systq 13951 65129 0 0 3 0x40014200 bored softclock 455 225645 0 0 3 0x40014200 idle0 46318 277775 0 0 3 0x14200 bored smr 1 17279 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 9539 6367K 6946K 78643K 16698 0 0 pcb 14 8K 8K 78643K 180 0 0 rtable 111 4K 4K 78643K 629 0 0 ifaddr 68 15K 17K 78643K 283 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 157 0 0 iov 0 0K 24K 78643K 316 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 77K 78643K 3284 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 18 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 236 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 2277 0 0 sigio 0 0K 0K 78643K 45 0 0 proc 43 30K 54K 78643K 618 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 196 0 0 in_multi 33 2K 2K 78643K 104 0 0 ether_multi 1 0K 0K 78643K 11 0 0 mrt 0 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 424 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 85 20K 29K 78643K 6234 0 0 UVM aobj 54 3K 3K 78643K 70 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 91 0 0 NDP 15 0K 0K 78643K 77 0 0 temp 192 2728K 3367K 78643K 10168 0 0 kqueue 0 0K 0K 78643K 21 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 132 0 130 1 0 1 1 0 8 0 rtentry 112 47 0 3 2 0 2 2 0 8 0 unpcb 120 907 0 897 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 3888 0 3888 1 1 0 1 0 8 0 tcpcb 544 370 0 366 1 0 1 1 0 8 0 inpcb 280 989 0 981 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 10 0 10 4 4 0 1 0 8 0 ppxss 1128 46 0 46 7 6 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 16 0 7 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 234 0 224 1 0 1 1 0 8 0 shmpl 112 68 0 16 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5137 0 3725 46 0 46 46 0 8 0 ffsino 240 5137 0 3725 84 0 84 84 0 8 0 nchpl 144 8595 0 6951 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 26378 0 26378 2 1 1 1 0 8 1 scsiplug 64 8 0 8 4 4 0 1 0 8 0 scxspl 192 26993 0 26993 15 14 1 6 0 8 1 plimitpl 152 225 0 218 1 0 1 1 0 8 0 sigapl 432 2450 0 2436 2 0 2 2 0 8 0 futexpl 56 39501 0 39500 1 0 1 1 0 8 0 knotepl 112 477 0 458 1 0 1 1 0 8 0 kqueuepl 104 581 0 579 1 0 1 1 0 8 0 pipepl 112 1496 0 1477 4 3 1 2 0 8 0 fdescpl 424 2451 0 2436 2 0 2 2 0 8 0 filepl 120 15059 0 14962 5 1 4 5 0 8 0 lockfpl 104 797 0 797 2 1 1 1 0 8 1 lockfspl 48 272 0 272 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 41 0 31 1 0 1 1 0 8 0 ucredpl 96 2909 0 2902 1 0 1 1 0 8 0 zombiepl 144 2437 0 2436 2 1 1 1 0 8 0 processpl 864 2466 0 2436 4 0 4 4 0 8 0 procpl 632 5461 0 5423 4 0 4 4 0 8 0 sosppl 128 27 0 27 8 7 1 1 0 8 1 sockpl 384 2059 0 2039 4 1 3 4 0 8 1 mcl64k 65536 2124 0 2124 164 163 1 65 0 8 1 mcl16k 16384 17 0 17 8 7 1 1 0 8 1 mcl12k 12288 46 0 46 7 6 1 1 0 8 1 mcl9k 9216 31 0 31 5 4 1 1 0 8 1 mcl8k 8192 34 0 34 6 5 1 1 0 8 1 mcl4k 4096 129 0 129 2 1 1 1 0 8 1 mcl2k2 2112 13 0 13 6 6 0 1 0 8 0 mcl2k 2048 54572 0 54527 15 8 7 13 0 8 0 mtagpl 80 78 0 24 3 1 2 2 0 8 0 mbufpl 256 101137 0 100959 115 102 13 43 0 8 0 bufpl 256 12871 0 7156 358 0 358 358 0 8 0 anonpl 16 230126 0 218495 116 64 52 73 0 62 2 amapchunkpl 152 11087 0 10977 47 38 9 15 0 158 3 amappl16 192 12853 0 12211 92 57 35 47 0 8 2 amappl15 184 2 0 2 2 2 0 1 0 8 0 amappl14 176 53 0 47 1 0 1 1 0 8 0 amappl13 168 2250 0 2246 2 1 1 1 0 8 0 amappl12 160 10 0 9 1 0 1 1 0 8 0 amappl11 152 49 0 38 1 0 1 1 0 8 0 amappl10 144 65 0 65 4 4 0 1 0 8 0 amappl9 136 566 0 562 1 0 1 1 0 8 0 amappl8 128 121 0 108 1 0 1 1 0 8 0 amappl7 120 33 0 29 1 0 1 1 0 8 0 amappl6 112 50 0 44 1 0 1 1 0 8 0 amappl5 104 162 0 151 1 0 1 1 0 8 0 amappl4 96 3820 0 3792 1 0 1 1 0 8 0 amappl3 88 256 0 246 1 0 1 1 0 8 0 amappl2 80 18970 0 18894 3 1 2 3 0 8 0 amappl1 72 52192 0 51751 25 15 10 19 0 8 0 amappl 80 5711 0 5672 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 69 0 16 1 0 1 1 0 8 0 uaddrrnd 24 2451 0 2436 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2451 0 2436 1 0 1 1 0 8 0 vmmpekpl 168 16616 0 16593 2 0 2 2 0 8 0 vmmpepl 168 288467 0 286674 132 51 81 92 0 357 0 vmsppl 272 2450 0 2436 2 1 1 2 0 8 0 pdppl 4096 4909 0 4872 6 1 5 6 0 8 0 pvpl 32 663950 0 649193 292 128 164 236 0 265 41 pmappl 200 2450 0 2436 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 781 0 291 19 3 16 17 0 8 0