panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 52525 98993 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(fffffd806ec51548) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80777f17b8,ffff800020b66780) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80777f17b8,ffff800020b66780) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80777f17b8,ffff800020b66780) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b66780) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b66780,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b66780,ffff800020e01280,ffff800020e012f0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020e01360) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020e01360) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe8a14) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe89e0, 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(fffffd806ec51548) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80777f17b8,ffff800020b66780) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80777f17b8,ffff800020b66780) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80777f17b8,ffff800020b66780) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b66780) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b66780,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b66780,ffff800020e01280,ffff800020e012f0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020e01360) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020e01360) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe8a14) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe89e0, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020e00f70 rbx 0xffff800020e01020 rdx 0xffff800020b66780 rcx 0 rax 0 r8 0xffffffff81c83d13 kprintf+0x173 r9 0x1 r10 0x25 r11 0x3a17227f4a31754e r12 0x3000000008 r13 0xffff800020e00f80 r14 0x100 r15 0x1 rip 0xffffffff81a69fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020e00f60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=262769 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b678c8,0xffffffff82362638 process=0xffff800020b7d180 user=0xffff800020dfc000, vmspace=0xfffffd807f00ba10 estcpu=36, cpticks=19, pctcpu=0.0 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 54743 336663 68976 0 3 0x82 piperd syz-executor.1 40222 344589 68976 0 3 0x82 nanosleep syz-executor.0 50991 414820 1 0 3 0x100083 ttyin getty 53561 223173 0 0 3 0x14200 bored sosplice 68976 256571 23429 0 3 0x82 thrsleep syz-fuzzer 68976 437390 23429 0 3 0x4000082 thrsleep syz-fuzzer 68976 73903 23429 0 3 0x4000082 thrsleep syz-fuzzer 68976 437756 23429 0 3 0x4000082 kqread syz-fuzzer 68976 6646 23429 0 3 0x4000082 thrsleep syz-fuzzer 68976 333478 23429 0 3 0x4000082 thrsleep syz-fuzzer 68976 110313 23429 0 3 0x4000082 thrsleep syz-fuzzer 68976 376365 23429 0 3 0x4000082 thrsleep syz-fuzzer 68976 461280 23429 0 3 0x4000082 thrsleep syz-fuzzer 68976 51176 23429 0 3 0x4000082 thrsleep syz-fuzzer 23429 108558 59525 0 3 0x10008a pause ksh 59525 376225 66823 0 3 0x92 select sshd 66823 339005 1 0 3 0x80 select sshd 36305 415429 20592 74 3 0x100092 bpf pflogd 20592 459317 1 0 3 0x80 netio pflogd 50513 66021 9106 73 3 0x100090 kqread syslogd 9106 111466 1 0 3 0x100082 netio syslogd 70872 261890 1 77 3 0x100090 poll dhclient 92065 439030 1 0 3 0x80 poll dhclient 90814 415705 0 0 3 0x14200 pgzero zerothread 62253 292470 0 0 3 0x14200 aiodoned aiodoned 36762 22842 0 0 3 0x14200 syncer update 73422 371195 0 0 3 0x14200 cleaner cleaner 98993 52525 0 0 7 0x14200 reaper 68938 161763 0 0 3 0x14200 pgdaemon pagedaemon 73686 365899 0 0 3 0x14200 bored crynlk 85212 372448 0 0 3 0x14200 bored crypto 52753 393588 0 0 3 0x40014200 acpi0 acpi0 24337 331763 0 0 3 0x40014200 idle1 49355 503246 0 0 3 0x14200 bored softnet 57410 348169 0 0 3 0x14200 bored systqmp 57070 27273 0 0 3 0x14200 bored systq 75641 291754 0 0 3 0x40014200 bored softclock 12057 180756 0 0 3 0x40014200 idle0 12296 83596 0 0 3 0x14200 bored smr 1 379869 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 9649 6496K 14681K 78643K 29946 0 0 pcb 13 8K 8K 78643K 606 0 0 rtable 111 4K 5K 78643K 1892 0 0 ifaddr 103 21K 22K 78643K 801 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1813 0 0 iov 0 0K 28K 78643K 854 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1211 76K 77K 78643K 8101 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 114 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 839 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 7560 0 0 sigio 1 0K 0K 78643K 105 0 0 proc 54 51K 83K 78643K 1578 0 0 subproc 32 2K 2K 78643K 206 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 705 0 0 in_multi 33 2K 2K 78643K 357 0 0 ether_multi 1 0K 0K 78643K 32 0 0 mrt 0 0K 0K 78643K 33 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 946 0 0 pfkey data 0 0K 2K 78643K 4 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 109 22K 31K 78643K 25714 0 0 UVM aobj 130 4K 4K 78643K 147 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 325 0 0 NDP 26 0K 0K 78643K 229 0 0 temp 270 2750K 3389K 78643K 27558 0 0 kqueue 0 0K 0K 78643K 73 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 30 0 24 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 333 0 331 1 0 1 1 0 8 0 rtentry 112 174 0 130 3 1 2 2 0 8 0 unpcb 120 2231 0 2219 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7904 0 7904 2 2 0 2 0 8 0 tcpcb 544 1255 0 1251 1 0 1 1 0 8 0 inpcb 280 3520 0 3513 3 2 1 2 0 8 0 rttmr 72 7 0 7 4 4 0 1 0 8 0 ip6q 72 12 0 12 6 5 1 1 0 8 1 ip6af 48 26 0 26 6 5 1 1 0 8 1 nd6 48 36 0 30 2 1 1 1 0 8 0 pkpcb 40 30 0 30 12 12 0 1 0 8 0 swfcl 56 7 0 0 1 0 1 1 0 8 0 ppxss 1128 143 0 143 18 17 1 1 0 8 1 pffrag 232 8 0 8 5 5 0 1 0 482 0 pffrnode 88 8 0 8 5 5 0 1 0 8 0 pffrent 40 18 0 18 5 5 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 134 0 115 1 0 1 1 0 8 0 pfstkey 112 134 0 115 1 0 1 1 0 8 0 pfstate 328 134 0 115 3 1 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 660 0 466 21 8 13 13 0 8 0 art_table 32 661 0 466 3 1 2 2 0 8 0 art_node 16 164 0 124 1 0 1 1 0 8 0 sysvmsgpl 40 21 0 13 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 837 0 827 1 0 1 1 0 8 0 shmpl 112 145 0 17 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 13177 0 11749 47 0 47 47 0 8 0 ffsino 272 13177 0 11749 96 0 96 96 0 8 0 nchpl 144 23876 0 22247 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 76332 0 76332 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 28 0 28 16 16 0 1 0 8 0 scxspl 192 73835 0 73835 37 36 1 6 0 8 1 plimitpl 152 698 0 690 1 0 1 1 0 8 0 sigapl 432 7731 0 7716 3 1 2 3 0 8 0 futexpl 56 90532 0 90532 2 1 1 1 0 8 1 knotepl 112 1421 0 1402 1 0 1 1 0 8 0 kqueuepl 104 1625 0 1623 1 0 1 1 0 8 0 pipepl 112 4498 0 4479 8 7 1 2 0 8 0 fdescpl 488 7732 0 7716 3 0 3 3 0 8 0 filepl 152 45345 0 45245 11 6 5 7 0 8 1 lockfpl 104 2687 0 2687 4 3 1 1 0 8 1 lockfspl 48 938 0 938 4 3 1 1 0 8 1 sessionpl 112 29 0 18 1 0 1 1 0 8 0 pgrppl 48 85 0 74 1 0 1 1 0 8 0 ucredpl 96 8845 0 8836 1 0 1 1 0 8 0 zombiepl 144 7717 0 7716 4 3 1 1 0 8 0 processpl 896 7748 0 7716 4 0 4 4 0 8 0 procpl 632 24306 0 24264 14 9 5 5 0 8 1 srpgc 64 25 0 25 7 7 0 1 0 8 0 sosppl 128 91 0 91 20 20 0 1 0 8 0 sockpl 384 6162 0 6141 9 6 3 4 0 8 0 mcl64k 65536 279 0 0 34 0 34 34 0 8 0 mcl16k 16384 13 0 0 2 0 2 2 0 8 0 mcl12k 12288 20 0 0 3 1 2 2 0 8 0 mcl9k 9216 18 0 0 2 0 2 2 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 208 0 0 24 4 20 24 0 8 0 mtagpl 80 93 0 0 2 0 2 2 0 8 0 mbufpl 256 681 0 0 25 0 25 25 0 8 0 bufpl 256 24060 0 17031 440 0 440 440 0 8 0 anonpl 16 669602 0 657690 218 154 64 66 0 125 11 amapchunkpl 152 45624 0 45505 48 38 10 10 0 158 3 amappl16 192 38696 0 38035 187 145 42 46 0 8 8 amappl15 184 574 0 574 1 1 0 1 0 8 0 amappl14 176 123 0 117 1 0 1 1 0 8 0 amappl13 168 3234 0 3232 2 1 1 1 0 8 0 amappl12 160 54 0 53 2 1 1 1 0 8 0 amappl11 152 914 0 898 1 0 1 1 0 8 0 amappl10 144 96 0 91 1 0 1 1 0 8 0 amappl9 136 2979 0 2976 1 0 1 1 0 8 0 amappl8 128 2497 0 2472 1 0 1 1 0 8 0 amappl7 120 86 0 79 1 0 1 1 0 8 0 amappl6 112 882 0 874 1 0 1 1 0 8 0 amappl5 104 305 0 291 1 0 1 1 0 8 0 amappl4 96 7995 0 7961 2 1 1 2 0 8 0 amappl3 88 493 0 483 1 0 1 1 0 8 0 amappl2 80 62021 0 61950 3 1 2 3 0 8 0 amappl1 72 178424 0 177977 26 16 10 20 0 8 0 amappl 80 24741 0 24699 2 0 2 2 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 146 0 17 3 0 3 3 0 8 0 uaddrrnd 24 7732 0 7716 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 7732 0 7716 1 0 1 1 0 8 0 vmmpekpl 168 57861 0 57828 2 0 2 2 0 8 0 vmmpepl 168 942718 0 940914 268 177 91 102 0 357 6 vmsppl 368 7731 0 7716 2 0 2 2 0 8 0 pdppl 4096 15472 0 15432 6 0 6 6 0 8 0 pvpl 32 1845330 0 1830187 435 275 160 165 0 265 31 pmappl 232 7731 0 7716 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 668 0 17 19 0 19 19 0 8 0