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(fffffd8028f9bca0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f3a9810,ffff8000149418c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f3a9810,ffff8000149418c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f3a9810,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,ffff80001494b040,ffff80001494b0b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff80001494b110) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffc8974) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc8940, 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(fffffd8028f9bca0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f3a9810,ffff8000149418c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f3a9810,ffff8000149418c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f3a9810,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,ffff80001494b040,ffff80001494b0b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff80001494b110) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffc8974) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc8940, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001494ad30 rbx 0xffff80001494ade0 rdx 0x2 rcx 0 rax 0 r8 0xffff80001494acf0 r9 0x1 r10 0 r11 0xdda0c19ada64de88 r12 0x3000000008 r13 0xffff80001494ad40 r14 0x100 r15 0x1 rip 0xffffffff818b9068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001494ad20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=188267 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000149409f8,0xffffffff822d6d20 process=0xffff8000ffff6d90 user=0xffff800014946000, vmspace=0xfffffd803f00ccc0 estcpu=36, cpticks=8, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 17332 473610 1 0 3 0x100083 ttyin getty 25438 210456 97806 0 2 0x482 syz-executor.0 88870 279752 0 0 3 0x14200 bored sosplice 55328 509616 97806 0 2 0x482 syz-executor.1 97806 8090 53789 0 3 0x82 thrsleep syz-fuzzer 97806 358200 53789 0 3 0x4000082 thrsleep syz-fuzzer 97806 476681 53789 0 3 0x4000082 thrsleep syz-fuzzer 97806 81943 53789 0 3 0x4000082 thrsleep syz-fuzzer 97806 135976 53789 0 3 0x4000082 kqread syz-fuzzer 97806 2958 53789 0 3 0x4000082 thrsleep syz-fuzzer 97806 487317 53789 0 3 0x4000082 thrsleep syz-fuzzer 97806 89995 53789 0 3 0x4000082 thrsleep syz-fuzzer 53789 439587 26310 0 3 0x10008a pause ksh 26310 233644 43804 0 3 0x92 select sshd 43804 400463 1 0 3 0x80 select sshd 12580 141361 14724 73 2 0x100090 syslogd 14724 485746 1 0 3 0x100082 netio syslogd 42935 176006 1 77 3 0x100090 poll dhclient 8644 190826 1 0 3 0x80 poll dhclient 19727 477858 0 0 2 0x14200 zerothread 20082 276817 0 0 3 0x14200 aiodoned aiodoned 92508 520352 0 0 3 0x14200 syncer update 80565 91534 0 0 3 0x14200 cleaner cleaner 8682 98370 0 0 3 0x14200 reaper reaper 16282 225905 0 0 3 0x14200 pgdaemon pagedaemon 45883 62768 0 0 3 0x14200 bored crynlk 78435 497359 0 0 3 0x14200 bored crypto 68874 203576 0 0 3 0x40014200 acpi0 acpi0 60136 214519 0 0 3 0x14200 bored softnet 99644 211150 0 0 3 0x14200 bored systqmp 28340 83635 0 0 3 0x14200 bored systq 85076 416615 0 0 3 0x40014200 bored softclock 72528 218536 0 0 3 0x40014200 idle0 48425 142473 0 0 3 0x14200 bored smr 1 351325 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 9586 6384K 7790K 78643K 53723 0 0 pcb 13 8K 8K 78643K 1034 0 0 rtable 124 12K 13K 78643K 2860 0 0 ifaddr 79 22K 26K 78643K 1428 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 804 0 0 iov 0 0K 32K 78643K 2216 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 77K 78643K 16055 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 211 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 1507 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 15546 0 0 sigio 3 0K 0K 78643K 266 0 0 proc 43 30K 54K 78643K 1929 0 0 subproc 32 2K 2K 78643K 61 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 1436 0 0 in_multi 33 2K 2K 78643K 536 0 0 ether_multi 1 0K 0K 78643K 62 0 0 mrt 0 0K 0K 78643K 47 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 120 530K 530K 78643K 120 0 0 exec 0 0K 1K 78643K 1687 0 0 pfkey data 0 0K 0K 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 96 21K 37K 78643K 37342 0 0 UVM aobj 130 4K 4K 78643K 152 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 641 0 0 NDP 19 0K 0K 78643K 391 0 0 temp 219 2728K 3368K 78643K 51538 0 0 kqueue 0 0K 0K 78643K 85 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 13 0 7 1 0 1 1 0 8 0 rtpcb 80 672 0 670 1 0 1 1 0 8 0 rtentry 112 87 0 42 2 0 2 2 0 8 0 unpcb 120 4999 0 4989 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 837 0 837 1 1 0 1 0 8 0 tcpcb 544 2410 0 2406 1 0 1 1 0 8 0 ipq 40 4 0 4 2 2 0 1 0 8 0 ipqe 40 8 0 8 2 2 0 1 0 8 0 inpcb 280 6508 0 6497 17 15 2 2 0 8 1 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 76 0 76 28 28 0 1 0 8 0 swfcl 56 3 0 0 1 0 1 1 0 8 0 ppxss 1128 276 0 276 46 45 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 241 0 47 14 1 13 13 0 8 0 art_table 32 242 0 47 2 0 2 2 0 8 0 art_node 16 61 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 34 0 24 3 2 1 1 0 8 0 semapl 112 1505 0 1495 1 0 1 1 0 8 0 shmpl 112 150 0 22 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 26726 0 25321 46 0 46 46 0 8 0 ffsino 240 26726 0 25321 84 0 84 84 0 8 0 nchpl 144 48502 0 46874 62 0 62 62 0 8 0 uvmvnodes 72 7766 0 0 142 0 142 142 0 8 0 vnodes 200 7766 0 0 409 0 409 409 0 8 0 namei 1024 157816 0 157816 6 5 1 1 0 8 1 scsiplug 64 47 0 47 29 29 0 1 0 8 0 scxspl 192 160564 0 160564 96 93 3 6 0 8 3 plimitpl 152 1259 0 1252 1 0 1 1 0 8 0 sigapl 432 15727 0 15714 2 0 2 2 0 8 0 futexpl 56 261735 0 261735 7 6 1 1 0 8 1 knotepl 112 2939 0 2920 2 1 1 2 0 8 0 kqueuepl 104 3931 0 3929 1 0 1 1 0 8 0 pipepl 112 8426 0 8407 8 7 1 2 0 8 0 fdescpl 424 15728 0 15714 2 0 2 2 0 8 0 filepl 120 95662 0 95567 4 0 4 4 0 8 0 lockfpl 104 5647 0 5647 12 11 1 1 0 8 1 lockfspl 48 1948 0 1948 12 11 1 1 0 8 1 sessionpl 112 31 0 21 1 0 1 1 0 8 0 pgrppl 48 188 0 178 1 0 1 1 0 8 0 ucredpl 96 20831 0 20824 1 0 1 1 0 8 0 zombiepl 144 15715 0 15713 2 1 1 1 0 8 0 processpl 864 15743 0 15713 4 0 4 4 0 8 0 procpl 632 35873 0 35836 5 0 5 5 0 8 1 sosppl 128 198 0 198 45 44 1 1 0 8 1 sockpl 384 12384 0 12365 18 15 3 4 0 8 1 mcl64k 65536 3549 0 3549 372 372 0 65 0 8 0 mcl16k 16384 50 0 50 33 33 0 1 0 8 0 mcl12k 12288 337 0 337 35 34 1 1 0 8 1 mcl9k 9216 218 0 218 47 47 0 1 0 8 0 mcl8k 8192 206 0 206 51 51 0 1 0 8 0 mcl4k 4096 782 0 782 19 18 1 1 0 8 1 mcl2k2 2112 84 0 84 44 44 0 1 0 8 0 mcl2k 2048 80095 0 80050 26 19 7 11 0 8 0 mtagpl 80 522 0 342 6 1 5 5 0 8 0 mbufpl 256 204963 0 204521 194 163 31 64 0 8 0 bufpl 256 56324 0 48560 488 2 486 486 0 8 0 anonpl 16 1429952 0 1418141 456 403 53 82 0 62 0 amapchunkpl 152 64843 0 64740 150 145 5 18 0 158 0 amappl16 192 82033 0 81374 561 526 35 58 0 8 1 amappl15 184 7757 0 7755 1 0 1 1 0 8 0 amappl14 176 7804 0 7797 1 0 1 1 0 8 0 amappl13 168 7746 0 7745 2 1 1 1 0 8 0 amappl12 160 6 0 4 1 0 1 1 0 8 0 amappl11 152 58 0 46 1 0 1 1 0 8 0 amappl10 144 76 0 76 14 14 0 1 0 8 0 amappl9 136 563 0 559 1 0 1 1 0 8 0 amappl8 128 161 0 138 1 0 1 1 0 8 0 amappl7 120 39 0 34 1 0 1 1 0 8 0 amappl6 112 57 0 46 1 0 1 1 0 8 0 amappl5 104 295 0 285 1 0 1 1 0 8 0 amappl4 96 18521 0 18496 1 0 1 1 0 8 0 amappl3 88 763 0 753 1 0 1 1 0 8 0 amappl2 80 132980 0 132909 3 1 2 3 0 8 0 amappl1 72 279821 0 279423 24 15 9 19 0 8 0 amappl 80 36284 0 36249 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 151 0 22 3 0 3 3 0 8 0 uaddrrnd 24 15728 0 15714 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 15728 0 15714 1 0 1 1 0 8 0 vmmpekpl 168 87466 0 87443 2 0 2 2 0 8 0 vmmpepl 168 1814890 0 1813198 453 372 81 101 0 357 2 vmsppl 272 15727 0 15714 2 1 1 2 0 8 0 pdppl 4096 31463 0 31428 6 1 5 6 0 8 0 pvpl 32 3949846 0 3934931 815 682 133 227 0 265 6 pmappl 200 15727 0 15714 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1302 0 668 24 3 21 21 0 8 0