panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 17988 84133 0 0x14000 0x200 0 reaper 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(fffffd806e6a7cd0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8064338448,ffff800020b28290) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8064338448,ffff800020b28290) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8064338448,ffff800020b28290) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28290) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28290,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28290,ffff800021c16f60,ffff800021c16fd0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800021c17040) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021c17040) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff6634) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff6600, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic vput: v_writecount != 0 ddb{1}> 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(fffffd806e6a7cd0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8064338448,ffff800020b28290) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8064338448,ffff800020b28290) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8064338448,ffff800020b28290) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28290) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28290,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28290,ffff800021c16f60,ffff800021c16fd0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800021c17040) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021c17040) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff6634) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff6600, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800021c16c50 rbx 0xffff800021c16d00 rdx 0xffff800020b28290 rcx 0 rax 0 r8 0xffffffff81b74c73 kprintf+0x173 r9 0x1 r10 0x25 r11 0xd0b40db2ef593d7b r12 0x3000000008 r13 0xffff800021c16c60 r14 0x100 r15 0x1 rip 0xffffffff819bf398 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021c16c40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=281300 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b29650,0xffffffff8239ad38 process=0xffff800020b7d500 user=0xffff800021c12000, vmspace=0xfffffd807f00bcf0 estcpu=36, cpticks=9, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 36245 344540 59580 0 3 0x80 nanosleep syz-executor.1 36245 202459 59580 0 3 0x4000080 pppxread syz-executor.1 36245 450658 59580 0 3 0x4000080 fsleep syz-executor.1 79309 98855 64049 0 3 0x82 nanosleep syz-executor.0 30961 113493 1 0 3 0x100083 ttyopn getty 59580 461148 64049 0 3 0x82 nanosleep syz-executor.1 84578 507194 0 0 3 0x14200 bored sosplice 64049 475725 82256 0 3 0x82 thrsleep syz-fuzzer 64049 348496 82256 0 3 0x4000082 thrsleep syz-fuzzer 64049 8248 82256 0 3 0x4000082 thrsleep syz-fuzzer 64049 338618 82256 0 3 0x4000082 thrsleep syz-fuzzer 64049 178638 82256 0 3 0x4000082 kqread syz-fuzzer 64049 445475 82256 0 3 0x4000082 thrsleep syz-fuzzer 64049 305246 82256 0 3 0x4000082 thrsleep syz-fuzzer 64049 431764 82256 0 3 0x4000082 thrsleep syz-fuzzer 64049 92837 82256 0 3 0x4000082 thrsleep syz-fuzzer 64049 183028 82256 0 3 0x4000082 thrsleep syz-fuzzer 82256 162575 33390 0 3 0x10008a pause ksh 33390 92387 59226 0 3 0x92 select sshd 59226 312542 1 0 3 0x80 select sshd 13286 318037 85858 74 3 0x100092 bpf pflogd 85858 454824 1 0 3 0x80 netio pflogd 88866 218261 22892 73 3 0x100090 kqread syslogd 22892 142701 1 0 3 0x100082 netio syslogd 86828 119092 1 77 3 0x100090 poll dhclient 84401 510443 1 0 3 0x80 poll dhclient 97783 242880 0 0 3 0x14200 pgzero zerothread 61470 349771 0 0 3 0x14200 aiodoned aiodoned 34708 202874 0 0 3 0x14200 syncer update 81043 264003 0 0 3 0x14200 cleaner cleaner 84133 17988 0 0 7 0x14200 reaper 75285 78076 0 0 3 0x14200 pgdaemon pagedaemon 5749 56236 0 0 3 0x14200 bored crynlk 15959 85793 0 0 3 0x14200 bored crypto 31421 314456 0 0 3 0x40014200 acpi0 acpi0 29916 422889 0 0 3 0x40014200 idle1 91890 123484 0 0 3 0x14200 bored softnet 94194 62412 0 0 3 0x14200 bored systqmp 40573 224270 0 0 3 0x14200 bored systq 44506 33157 0 0 3 0x40014200 bored softclock 95447 299226 0 0 3 0x40014200 idle0 56703 480227 0 0 3 0x14200 bored smr 1 213998 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9620 6486K 14791K 78643K 33166 0 0 pcb 13 8K 8K 78643K 613 0 0 rtable 93 12K 13K 78643K 2167 0 0 ifaddr 86 19K 20K 78643K 855 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1855 0 0 iov 0 0K 44K 78643K 993 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 9272 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 140 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 1010 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 8730 0 0 sigio 0 0K 0K 78643K 122 0 0 proc 55 51K 83K 78643K 1935 0 0 subproc 32 2K 2K 78643K 291 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 898 0 0 in_multi 22 1K 2K 78643K 505 0 0 ether_multi 1 0K 0K 78643K 50 0 0 mrt 0 0K 0K 78643K 70 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 1103 0 0 pfkey data 0 0K 4K 78643K 8 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 107 21K 31K 78643K 30001 0 0 UVM aobj 130 5K 5K 78643K 144 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 483 0 0 NDP 22 0K 0K 78643K 245 0 0 temp 243 2751K 3388K 78643K 31441 0 0 kqueue 0 0K 0K 78643K 69 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 36 0 32 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 336 0 334 1 0 1 1 0 8 0 rtentry 112 230 0 197 2 0 2 2 0 8 0 unpcb 120 2636 0 2624 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7565 0 7565 2 2 0 2 0 8 0 tcpcb 544 1377 0 1373 1 0 1 1 0 8 0 inpcb 280 3871 0 3864 2 1 1 2 0 8 0 rttmr 72 26 0 26 10 10 0 1 0 8 0 nd6 48 48 0 45 1 0 1 1 0 8 0 pkpcb 40 58 0 58 18 18 0 1 0 8 0 swfcl 56 7 0 0 1 0 1 1 0 8 0 ppxss 1128 157 0 157 24 23 1 1 0 8 1 pffrag 232 9 0 9 6 6 0 1 0 482 0 pffrnode 88 9 0 9 6 6 0 1 0 8 0 pffrent 40 22 0 22 6 6 0 1 0 8 0 pfosfp 40 846 0 846 5 5 0 5 0 8 0 pfosfpen 112 1428 0 1428 21 21 0 21 0 8 0 pfstitem 24 180 0 161 1 0 1 1 0 8 0 pfstkey 112 181 0 162 1 0 1 1 0 8 0 pfstate 328 181 0 162 4 2 2 3 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 874 0 727 17 4 13 13 0 8 3 art_table 32 875 0 727 2 0 2 2 0 8 0 art_node 16 224 0 194 1 0 1 1 0 8 0 sysvmsgpl 40 43 0 32 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 1008 0 998 1 0 1 1 0 8 0 shmpl 112 142 0 14 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 15160 0 13730 47 0 47 47 0 8 0 ffsino 272 15160 0 13730 96 0 96 96 0 8 0 nchpl 144 27320 0 25676 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 88143 0 88143 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 19 0 19 9 8 1 1 0 8 1 scxspl 192 85013 0 85013 37 34 3 6 0 8 3 plimitpl 152 784 0 776 1 0 1 1 0 8 0 sigapl 432 8893 0 8877 3 1 2 3 0 8 0 futexpl 56 104662 0 104661 1 0 1 1 0 8 0 knotepl 112 1729 0 1709 1 0 1 1 0 8 0 kqueuepl 104 1964 0 1961 1 0 1 1 0 8 0 pipepl 112 5066 0 5047 12 11 1 2 0 8 0 fdescpl 488 8894 0 8877 3 0 3 3 0 8 0 filepl 152 52488 0 52386 16 11 5 7 0 8 0 lockfpl 104 3069 0 3069 5 4 1 1 0 8 1 lockfspl 48 1101 0 1101 5 4 1 1 0 8 1 sessionpl 112 37 0 26 1 0 1 1 0 8 0 pgrppl 48 122 0 111 1 0 1 1 0 8 0 ucredpl 96 10383 0 10374 1 0 1 1 0 8 0 zombiepl 144 8878 0 8877 3 2 1 1 0 8 0 processpl 896 8910 0 8877 4 0 4 4 0 8 0 procpl 632 28349 0 28303 20 15 5 5 0 8 1 srpgc 64 52 0 52 14 13 1 1 0 8 1 sosppl 128 114 0 114 28 28 0 1 0 8 0 sockpl 384 6987 0 6966 8 5 3 4 0 8 0 mcl64k 65536 468 0 0 54 24 30 33 0 8 1 mcl16k 16384 15 0 0 2 0 2 2 0 8 0 mcl12k 12288 49 0 0 2 0 2 2 0 8 0 mcl9k 9216 33 0 0 3 1 2 2 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 25 0 0 4 1 3 3 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 245 0 0 26 10 16 26 0 8 0 mtagpl 80 117 0 0 2 0 2 2 0 8 0 mbufpl 256 902 0 0 39 0 39 39 0 8 0 bufpl 256 33043 0 26014 440 0 440 440 0 8 0 anonpl 16 814179 0 803813 234 179 55 66 0 125 0 amapchunkpl 152 54481 0 54364 90 84 6 19 0 158 0 amappl16 192 47451 0 46781 265 223 42 46 0 8 8 amappl15 184 36 0 34 3 2 1 1 0 8 0 amappl14 176 2250 0 2244 1 0 1 1 0 8 0 amappl13 168 1661 0 1658 1 0 1 1 0 8 0 amappl12 160 19 0 16 2 1 1 1 0 8 0 amappl11 152 102 0 87 1 0 1 1 0 8 0 amappl10 144 4324 0 4318 1 0 1 1 0 8 0 amappl9 136 786 0 782 1 0 1 1 0 8 0 amappl8 128 305 0 280 1 0 1 1 0 8 0 amappl7 120 4319 0 4311 1 0 1 1 0 8 0 amappl6 112 108 0 99 1 0 1 1 0 8 0 amappl5 104 289 0 275 1 0 1 1 0 8 0 amappl4 96 9232 0 9198 2 1 1 2 0 8 0 amappl3 88 2739 0 2729 1 0 1 1 0 8 0 amappl2 80 71087 0 71003 4 2 2 3 0 8 0 amappl1 72 200566 0 200097 27 17 10 20 0 8 0 amappl 80 28873 0 28831 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 143 0 14 3 0 3 3 0 8 0 uaddrrnd 24 8894 0 8877 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 8894 0 8877 1 0 1 1 0 8 0 vmmpekpl 168 66850 0 66813 2 0 2 2 0 8 0 vmmpepl 168 1092560 0 1090623 342 239 103 103 0 357 18 vmsppl 368 8893 0 8877 2 0 2 2 0 8 0 pdppl 4096 17795 0 17754 7 1 6 6 0 8 0 pvpl 32 2194439 0 2180743 454 309 145 170 0 265 11 pmappl 232 8893 0 8877 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 702 0 45 19 0 19 19 0 8 0