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(fffffd80044e64b8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803e5fd630,ffff8000149418c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803e5fd630,ffff8000149418c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803e5fd630,ffff8000149418c8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000149418c8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000149418c8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000149418c8,ffff800016be6480,ffff800016be64f0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016be6550) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdab74) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdab40, 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(fffffd80044e64b8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803e5fd630,ffff8000149418c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803e5fd630,ffff8000149418c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803e5fd630,ffff8000149418c8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000149418c8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000149418c8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000149418c8,ffff800016be6480,ffff800016be64f0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016be6550) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdab74) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdab40, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016be6170 rbx 0xffff800016be6220 rdx 0x2 rcx 0 rax 0 r8 0xffff800016be6130 r9 0x1 r10 0 r11 0x5b2352cf34e14efe r12 0x3000000008 r13 0xffff800016be6180 r14 0x100 r15 0x1 rip 0xffffffff818b9068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016be6160 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=138163 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014940c70,0xffffffff822d6d20 process=0xffff8000ffff7b10 user=0xffff800016be1000, vmspace=0xfffffd803f00c440 estcpu=36, cpticks=20, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 22956 345183 0 0 3 0x14200 bored sosplice 32057 59339 67169 0 2 0x2 syz-executor.0 8639 316905 67169 0 2 0x482 syz-executor.1 67169 294969 98787 0 3 0x82 kqread syz-fuzzer 67169 480505 98787 0 2 0x4000482 syz-fuzzer 67169 492422 98787 0 3 0x4000082 thrsleep syz-fuzzer 67169 158253 98787 0 3 0x4000082 thrsleep syz-fuzzer 67169 421772 98787 0 3 0x4000082 thrsleep syz-fuzzer 67169 399760 98787 0 3 0x4000082 thrsleep syz-fuzzer 67169 385957 98787 0 3 0x4000082 thrsleep syz-fuzzer 98787 65616 26095 0 3 0x10008a pause ksh 26095 486186 75967 0 3 0x92 select sshd 93938 215895 1 0 3 0x100083 ttyin getty 75967 501269 1 0 3 0x80 select sshd 76538 200398 74558 73 2 0x100090 syslogd 74558 521166 1 0 3 0x100082 netio syslogd 99260 5766 1 77 3 0x100090 poll dhclient 32957 166290 1 0 3 0x80 poll dhclient 26935 273468 0 0 2 0x14200 zerothread 59201 495747 0 0 3 0x14200 aiodoned aiodoned 42347 340943 0 0 3 0x14200 syncer update 45555 274767 0 0 3 0x14200 cleaner cleaner 78843 62780 0 0 3 0x14200 reaper reaper 36554 289679 0 0 3 0x14200 pgdaemon pagedaemon 56550 22379 0 0 3 0x14200 bored crynlk 33112 109885 0 0 3 0x14200 bored crypto 60793 9286 0 0 3 0x40014200 acpi0 acpi0 53420 349378 0 0 3 0x14200 bored softnet 49823 501320 0 0 3 0x14200 bored systqmp 27412 144931 0 0 3 0x14200 bored systq 2169 254316 0 0 3 0x40014200 bored softclock 32817 332863 0 0 3 0x40014200 idle0 69575 217716 0 0 3 0x14200 bored smr 1 264379 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 9461 6334K 6848K 78643K 11008 0 0 pcb 13 8K 8K 78643K 31 0 0 rtable 108 3K 4K 78643K 239 0 0 ifaddr 42 11K 11K 78643K 60 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 27 0 0 iov 0 0K 16K 78643K 32 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1218 76K 77K 78643K 1362 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 4 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 28 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 210 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 41 30K 54K 78643K 361 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 26 0 0 in_multi 33 2K 2K 78643K 38 0 0 ether_multi 1 0K 0K 78643K 1 0 0 mrt 0 0K 0K 78643K 1 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 196 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 88 20K 25K 78643K 1356 0 0 UVM aobj 5 2K 2K 78643K 5 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 10 0 0 NDP 7 0K 0K 78643K 16 0 0 temp 97 2713K 2779K 78643K 3559 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 29 0 27 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 69 0 59 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1433 0 1433 1 1 0 1 0 8 0 tcpcb 544 48 0 44 1 0 1 1 0 8 0 inpcb 280 118 0 111 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 4 0 4 1 0 1 1 0 8 1 ppxss 1128 3 0 3 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 semupl 112 3 0 3 1 0 1 1 0 8 1 semapl 112 26 0 16 1 0 1 1 0 8 0 shmpl 112 3 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1722 0 305 46 0 46 46 0 8 0 ffsino 240 1722 0 305 84 0 84 84 0 8 0 nchpl 144 2206 0 562 61 0 61 61 0 8 0 uvmvnodes 72 1858 0 0 34 0 34 34 0 8 0 vnodes 200 1858 0 0 98 0 98 98 0 8 0 namei 1024 5663 0 5663 2 1 1 1 0 8 1 scxspl 192 5746 0 5746 7 6 1 6 0 8 1 plimitpl 152 30 0 23 1 0 1 1 0 8 0 sigapl 432 381 0 368 2 0 2 2 0 8 0 futexpl 56 3029 0 3029 1 0 1 1 0 8 1 knotepl 112 65 0 46 1 0 1 1 0 8 0 kqueuepl 104 34 0 32 1 0 1 1 0 8 0 pipepl 112 270 0 251 2 1 1 1 0 8 0 fdescpl 424 382 0 368 2 0 2 2 0 8 0 filepl 120 1982 0 1886 4 0 4 4 0 8 0 lockfpl 104 79 0 79 2 1 1 1 0 8 1 lockfspl 48 29 0 29 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 194 0 187 1 0 1 1 0 8 0 zombiepl 144 369 0 368 2 1 1 1 0 8 0 processpl 864 397 0 368 4 0 4 4 0 8 0 procpl 632 645 0 610 4 0 4 4 0 8 0 sosppl 128 2 0 2 1 0 1 1 0 8 1 sockpl 384 224 0 205 3 0 3 3 0 8 0 mcl64k 65536 9 0 9 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 3 0 3 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 1 0 1 1 0 8 1 mcl4k 4096 16 0 16 2 1 1 1 0 8 1 mcl2k 2048 54577 0 54527 16 8 8 15 0 8 1 mtagpl 80 6 0 2 2 1 1 1 0 8 0 mbufpl 256 87214 0 87122 13 5 8 10 0 8 0 bufpl 256 7152 0 1504 354 0 354 354 0 8 0 anonpl 16 65279 0 54169 66 2 64 64 0 62 17 amapchunkpl 152 2441 0 2331 16 2 14 14 0 158 9 amappl16 192 2176 0 1563 45 6 39 43 0 8 8 amappl14 176 47 0 43 1 0 1 1 0 8 0 amappl13 168 100 0 99 1 0 1 1 0 8 0 amappl12 160 9 0 7 1 0 1 1 0 8 0 amappl11 152 51 0 40 1 0 1 1 0 8 0 amappl10 144 61 0 61 2 2 0 1 0 8 0 amappl9 136 564 0 559 1 0 1 1 0 8 0 amappl8 128 122 0 108 1 0 1 1 0 8 0 amappl7 120 30 0 26 1 0 1 1 0 8 0 amappl6 112 58 0 51 1 0 1 1 0 8 0 amappl5 104 142 0 132 1 0 1 1 0 8 0 amappl4 96 689 0 665 1 0 1 1 0 8 0 amappl3 88 172 0 162 1 0 1 1 0 8 0 amappl2 80 2273 0 2206 4 2 2 3 0 8 0 amappl1 72 16367 0 15954 27 19 8 19 0 8 0 amappl 80 907 0 869 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 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 382 0 368 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 382 0 368 1 0 1 1 0 8 0 vmmpekpl 168 6725 0 6702 2 0 2 2 0 8 0 vmmpepl 168 51836 0 50192 99 14 85 87 0 357 12 vmsppl 272 381 0 368 2 1 1 2 0 8 0 pdppl 4096 771 0 736 6 1 5 6 0 8 0 pvpl 32 201375 0 187249 226 4 222 222 0 265 106 pmappl 200 381 0 368 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 501 0 19 14 0 14 14 0 8 0