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(fffffd802fa5fbe0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f7ab3d8,ffff800016beac70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f7ab3d8,ffff800016beac70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f7ab3d8,ffff800016beac70) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800016beac70) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800016beac70,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800016beac70,ffff800016bd0af0,ffff800016bd0b60) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016bd0bc0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7fffff1bb4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1b80, 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(fffffd802fa5fbe0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f7ab3d8,ffff800016beac70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f7ab3d8,ffff800016beac70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f7ab3d8,ffff800016beac70) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800016beac70) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800016beac70,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800016beac70,ffff800016bd0af0,ffff800016bd0b60) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016bd0bc0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7fffff1bb4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1b80, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016bd07e0 rbx 0xffff800016bd0890 rdx 0x2 rcx 0 rax 0 r8 0xffff800016bd07a0 r9 0x1 r10 0 r11 0x5ff42522a64bec1b r12 0x3000000008 r13 0xffff800016bd07f0 r14 0x100 r15 0x1 rip 0xffffffff81bc2978 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016bd07d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=336111 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800016beb650,0xffffffff822be988 process=0xffff8000ffff77b0 user=0xffff800016bcb000, vmspace=0xfffffd803f00c550 estcpu=36, cpticks=15, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 77177 75698 0 0 3 0x14200 bored sosplice 31399 119456 24608 0 2 0x2 syz-executor.0 17798 228127 24608 0 2 0x482 syz-executor.1 24608 244392 33810 0 3 0x82 thrsleep syz-fuzzer 24608 24390 33810 0 2 0x4000482 syz-fuzzer 24608 128337 33810 0 3 0x4000082 thrsleep syz-fuzzer 24608 5987 33810 0 3 0x4000082 thrsleep syz-fuzzer 24608 412011 33810 0 3 0x4000082 kqread syz-fuzzer 24608 482887 33810 0 3 0x4000082 thrsleep syz-fuzzer 24608 48408 33810 0 3 0x4000082 thrsleep syz-fuzzer 33810 218287 31372 0 3 0x10008a pause ksh 31372 458136 40174 0 3 0x92 select sshd 27019 133182 1 0 3 0x100083 ttyin getty 40174 168802 1 0 3 0x80 select sshd 18203 440845 68695 73 2 0x100090 syslogd 68695 374189 1 0 3 0x100082 netio syslogd 40444 135804 1 77 3 0x100090 poll dhclient 873 206725 1 0 3 0x80 poll dhclient 4935 387414 0 0 2 0x14200 zerothread 87321 502998 0 0 3 0x14200 aiodoned aiodoned 57013 492120 0 0 3 0x14200 syncer update 7483 285130 0 0 3 0x14200 cleaner cleaner 13038 447515 0 0 3 0x14200 reaper reaper 97082 208083 0 0 3 0x14200 pgdaemon pagedaemon 79001 416573 0 0 3 0x14200 bored crynlk 89989 263246 0 0 3 0x14200 bored crypto 2462 351463 0 0 3 0x40014200 acpi0 acpi0 51220 122328 0 0 3 0x14200 bored softnet 85035 441512 0 0 3 0x14200 bored systqmp 15793 198258 0 0 3 0x14200 bored systq 99852 269352 0 0 3 0x40014200 bored softclock 30898 507747 0 0 3 0x40014200 idle0 91935 95202 0 0 3 0x14200 bored smr 1 432519 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 9492 6477K 6991K 78643K 12290 0 0 pcb 13 8K 8K 78643K 54 0 0 rtable 110 3K 4K 78643K 313 0 0 ifaddr 49 12K 12K 78643K 119 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 40 0 0 iov 0 0K 24K 78643K 67 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1211 76K 77K 78643K 1793 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 5 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 46 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 626 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 41 30K 54K 78643K 375 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 70 0 0 in_multi 33 2K 2K 78643K 50 0 0 ether_multi 1 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 275 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 89 20K 21K 78643K 2299 0 0 UVM aobj 22 2K 3K 78643K 26 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 20 0 0 NDP 9 0K 0K 78643K 31 0 0 temp 129 2718K 2783K 78643K 4969 0 0 kqueue 0 0K 0K 78643K 2 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 7 0 0 1 0 1 1 0 8 0 rtpcb 80 29 0 27 1 0 1 1 0 8 0 rtentry 112 46 0 1 2 0 2 2 0 8 0 unpcb 120 211 0 201 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 764 0 764 2 2 0 1 0 8 0 tcpcb 544 104 0 100 1 0 1 1 0 8 0 inpcb 280 281 0 272 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 14 0 14 2 1 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 45 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 6 1 0 1 1 0 8 0 semapl 112 42 0 32 1 0 1 1 0 8 0 shmpl 112 24 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2408 0 997 46 0 46 46 0 8 0 ffsino 240 2408 0 997 84 0 84 84 0 8 0 nchpl 144 3503 0 1874 61 0 61 61 0 8 0 uvmvnodes 72 2854 0 0 52 0 52 52 0 8 0 vnodes 200 2854 0 0 151 0 151 151 0 8 0 namei 1024 10406 0 10406 1 0 1 1 0 8 1 scsiplug 64 1 0 1 1 0 1 1 0 8 1 scxspl 192 10051 0 10051 12 11 1 7 0 8 1 plimitpl 152 62 0 55 1 0 1 1 0 8 0 sigapl 432 797 0 784 2 0 2 2 0 8 0 futexpl 56 9967 0 9967 1 0 1 1 0 8 1 knotepl 112 134 0 115 1 0 1 1 0 8 0 kqueuepl 104 110 0 108 1 0 1 1 0 8 0 pipepl 112 482 0 463 1 0 1 1 0 8 0 fdescpl 424 798 0 784 2 0 2 2 0 8 0 filepl 120 4557 0 4462 4 0 4 4 0 8 0 lockfpl 104 241 0 241 2 1 1 1 0 8 1 lockfspl 48 84 0 84 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 29 0 19 1 0 1 1 0 8 0 ucredpl 96 774 0 767 1 0 1 1 0 8 0 zombiepl 144 785 0 784 1 0 1 1 0 8 0 processpl 864 813 0 784 4 0 4 4 0 8 0 procpl 632 1606 0 1571 4 0 4 4 0 8 0 sosppl 128 14 0 14 2 2 0 1 0 8 0 sockpl 384 525 0 506 3 0 3 3 0 8 1 mcl64k 65536 7 0 7 3 2 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 4 0 4 2 1 1 1 0 8 1 mcl9k 9216 9 0 9 2 2 0 1 0 8 0 mcl8k 8192 6 0 6 2 2 0 1 0 8 0 mcl4k 4096 44 0 44 2 1 1 1 0 8 1 mcl2k2 2112 3 0 3 2 2 0 1 0 8 0 mcl2k 2048 56059 0 56014 17 10 7 14 0 8 0 mtagpl 80 20 0 2 2 1 1 1 0 8 0 mbufpl 256 91046 0 90933 11 2 9 9 0 8 0 bufpl 256 7137 0 2632 282 0 282 282 0 8 0 anonpl 16 79699 0 67800 75 10 65 65 0 62 17 amapchunkpl 152 3316 0 3207 10 5 5 8 0 158 0 amappl16 192 3812 0 3152 49 8 41 46 0 8 7 amappl15 184 281 0 279 1 0 1 1 0 8 0 amappl14 176 331 0 324 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 3 0 3 1 1 0 1 0 8 0 amappl11 152 52 0 41 1 0 1 1 0 8 0 amappl10 144 63 0 62 1 0 1 1 0 8 0 amappl9 136 554 0 551 1 0 1 1 0 8 0 amappl8 128 123 0 109 1 0 1 1 0 8 0 amappl7 120 30 0 27 1 0 1 1 0 8 0 amappl6 112 59 0 52 1 0 1 1 0 8 0 amappl5 104 145 0 134 1 0 1 1 0 8 0 amappl4 96 733 0 710 1 0 1 1 0 8 0 amappl3 88 742 0 728 1 0 1 1 0 8 0 amappl2 80 5545 0 5478 3 1 2 3 0 8 0 amappl1 72 23705 0 23288 25 17 8 19 0 8 0 amappl 80 1833 0 1795 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 25 0 4 1 0 1 1 0 8 0 uaddrrnd 24 798 0 784 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 798 0 784 1 0 1 1 0 8 0 vmmpekpl 168 9005 0 8983 2 0 2 2 0 8 0 vmmpepl 168 98478 0 96775 109 20 89 94 0 357 13 vmsppl 272 797 0 784 2 1 1 2 0 8 0 pdppl 4096 1603 0 1568 6 1 5 6 0 8 0 pvpl 32 239058 0 224177 173 14 159 159 0 265 37 pmappl 200 797 0 784 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 430 0 22 12 0 12 12 0 8 0