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(fffffd802aa423d8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803616ba58,ffff800014941650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803616ba58,ffff800014941650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803616ba58,ffff800014941650) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941650) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941650,ffff8000159de7d0,ffff8000159de840) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159de8a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffc0824) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc07f0, 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(fffffd802aa423d8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803616ba58,ffff800014941650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803616ba58,ffff800014941650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803616ba58,ffff800014941650) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941650) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941650,ffff8000159de7d0,ffff8000159de840) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159de8a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffc0824) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc07f0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159de4c0 rbx 0xffff8000159de570 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159de480 r9 0x1 r10 0 r11 0xd0e5580a850cee8b r12 0x3000000008 r13 0xffff8000159de4d0 r14 0x100 r15 0x1 rip 0xffffffff81877898 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159de4b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=29053 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014940508,0xffff800014940a08 process=0xffff8000ffff70f0 user=0xffff8000159d9000, vmspace=0xfffffd803f00baa0 estcpu=36, cpticks=11, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 4838 452634 98015 0 2 0x480 syz-executor.0 4838 253059 98015 0 3 0x4000080 fifor syz-executor.0 4838 192468 98015 0 3 0x4000080 fsleep syz-executor.0 72596 377372 1 0 3 0x100083 ttyin getty 46478 112765 0 0 3 0x14200 bored sosplice 98015 213840 34007 0 2 0x482 syz-executor.0 94343 50786 34007 0 2 0x482 syz-executor.1 34007 255841 20487 0 3 0x82 kqread syz-fuzzer 34007 512019 20487 0 3 0x4000082 thrsleep syz-fuzzer 34007 412560 20487 0 3 0x4000082 thrsleep syz-fuzzer 34007 254922 20487 0 3 0x4000082 thrsleep syz-fuzzer 34007 350003 20487 0 3 0x4000082 thrsleep syz-fuzzer 34007 25371 20487 0 3 0x4000082 thrsleep syz-fuzzer 34007 168053 20487 0 3 0x4000082 thrsleep syz-fuzzer 20487 66257 56911 0 3 0x10008a pause ksh 56911 82940 88394 0 3 0x92 select sshd 88394 427574 1 0 3 0x80 select sshd 76280 462834 72594 73 2 0x100090 syslogd 72594 149601 1 0 3 0x100082 netio syslogd 17525 249535 1 77 3 0x100090 poll dhclient 78927 408474 1 0 3 0x80 poll dhclient 3162 157377 0 0 2 0x14200 zerothread 52658 415238 0 0 3 0x14200 aiodoned aiodoned 75492 429285 0 0 3 0x14200 syncer update 18899 370790 0 0 3 0x14200 cleaner cleaner 25541 341244 0 0 3 0x14200 reaper reaper 52212 134670 0 0 3 0x14200 pgdaemon pagedaemon 32272 132601 0 0 3 0x14200 bored crynlk 26467 111520 0 0 3 0x14200 bored crypto 45587 516233 0 0 3 0x40014200 acpi0 acpi0 13631 220265 0 0 3 0x14200 bored softnet 3756 7907 0 0 3 0x14200 bored systqmp 27070 100036 0 0 3 0x14200 bored systq 49461 236890 0 0 3 0x40014200 bored softclock 24887 10169 0 0 3 0x40014200 idle0 83386 412104 0 0 3 0x14200 bored smr 1 164964 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 9522 6361K 14746K 78643K 17582 0 0 pcb 13 8K 8K 78643K 195 0 0 rtable 115 4K 4K 78643K 579 0 0 ifaddr 61 14K 16K 78643K 256 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 137 0 0 iov 0 0K 24K 78643K 287 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 77K 78643K 3608 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 32 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 236 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 2564 0 0 sigio 0 0K 0K 78643K 37 0 0 proc 45 38K 54K 78643K 634 0 0 subproc 32 2K 2K 78643K 44 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 249 0 0 in_multi 33 2K 2K 78643K 93 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 6 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 378 0 0 pfkey data 0 0K 4K 78643K 2 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 93 21K 30K 78643K 6903 0 0 UVM aobj 93 3K 3K 78643K 102 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 118 0 0 NDP 13 0K 0K 78643K 68 0 0 temp 178 2727K 2855K 78643K 10892 0 0 kqueue 0 0K 0K 78643K 10 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 8 0 0 1 0 1 1 0 8 0 rtpcb 80 118 0 116 1 0 1 1 0 8 0 rtentry 112 47 0 1 2 0 2 2 0 8 0 unpcb 120 853 0 841 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1981 0 1981 1 1 0 1 0 8 0 tcpcb 544 380 0 376 1 0 1 1 0 8 0 inpcb 280 1142 0 1133 3 2 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 11 0 11 5 5 0 1 0 8 0 ppxss 1128 41 0 41 11 10 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 190 0 0 12 0 12 12 0 8 0 art_table 32 191 0 0 2 0 2 2 0 8 0 art_node 16 46 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 8 2 2 0 1 0 8 0 semapl 112 234 0 224 1 0 1 1 0 8 0 shmpl 112 100 0 9 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5568 0 4163 46 0 46 46 0 8 0 ffsino 240 5568 0 4163 84 0 84 84 0 8 0 nchpl 144 9334 0 7695 61 0 61 61 0 8 0 uvmvnodes 72 5966 0 0 109 0 109 109 0 8 0 vnodes 200 5966 0 0 314 0 314 314 0 8 0 namei 1024 29124 0 29124 4 3 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 28885 0 28885 18 17 1 6 0 8 1 plimitpl 152 283 0 276 1 0 1 1 0 8 0 sigapl 432 2737 0 2723 2 0 2 2 0 8 0 futexpl 56 42996 0 42995 3 2 1 1 0 8 0 knotepl 112 595 0 576 1 0 1 1 0 8 0 kqueuepl 104 674 0 672 1 0 1 1 0 8 0 pipepl 112 1554 0 1535 4 3 1 2 0 8 0 fdescpl 424 2738 0 2723 2 0 2 2 0 8 0 filepl 120 16584 0 16488 4 0 4 4 0 8 1 lockfpl 104 910 0 910 4 3 1 1 0 8 1 lockfspl 48 316 0 316 4 3 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 59 0 49 1 0 1 1 0 8 0 ucredpl 96 3443 0 3436 1 0 1 1 0 8 0 zombiepl 144 2724 0 2723 3 2 1 1 0 8 0 processpl 864 2753 0 2723 4 0 4 4 0 8 0 procpl 632 6078 0 6040 4 0 4 4 0 8 0 sosppl 128 43 0 43 11 10 1 1 0 8 1 sockpl 384 2162 0 2141 5 2 3 3 0 8 0 mcl64k 65536 594 0 594 73 72 1 65 0 8 1 mcl16k 16384 7 0 7 5 4 1 1 0 8 1 mcl12k 12288 53 0 53 11 10 1 1 0 8 1 mcl9k 9216 31 0 31 9 8 1 1 0 8 1 mcl8k 8192 29 0 29 8 7 1 1 0 8 1 mcl4k 4096 119 0 119 6 5 1 1 0 8 1 mcl2k2 2112 17 0 17 6 5 1 1 0 8 1 mcl2k 2048 57006 0 56962 18 12 6 12 0 8 0 mtagpl 80 74 0 22 3 1 2 2 0 8 0 mbufpl 256 103207 0 103034 50 38 12 41 0 8 0 bufpl 256 14745 0 8091 417 0 417 417 0 8 0 anonpl 16 272428 0 260607 142 78 64 65 0 62 16 amapchunkpl 152 12849 0 12741 43 37 6 14 0 158 1 amappl16 192 15238 0 14582 118 77 41 45 0 8 8 amappl15 184 1 0 1 1 0 1 1 0 8 1 amappl14 176 53 0 48 1 0 1 1 0 8 0 amappl13 168 1295 0 1293 2 1 1 1 0 8 0 amappl12 160 15 0 12 1 0 1 1 0 8 0 amappl11 152 58 0 47 1 0 1 1 0 8 0 amappl10 144 1308 0 1305 1 0 1 1 0 8 0 amappl9 136 555 0 550 1 0 1 1 0 8 0 amappl8 128 130 0 113 1 0 1 1 0 8 0 amappl7 120 1271 0 1267 1 0 1 1 0 8 0 amappl6 112 61 0 54 1 0 1 1 0 8 0 amappl5 104 158 0 148 1 0 1 1 0 8 0 amappl4 96 2983 0 2955 1 0 1 1 0 8 0 amappl3 88 271 0 261 1 0 1 1 0 8 0 amappl2 80 22480 0 22404 4 2 2 3 0 8 0 amappl1 72 55854 0 55419 26 17 9 19 0 8 0 amappl 80 6349 0 6311 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 101 0 9 2 0 2 2 0 8 0 uaddrrnd 24 2738 0 2723 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2738 0 2723 1 0 1 1 0 8 0 vmmpekpl 168 18526 0 18500 2 0 2 2 0 8 0 vmmpepl 168 324393 0 322580 169 84 85 92 0 357 6 vmsppl 272 2737 0 2723 2 1 1 2 0 8 0 pdppl 4096 5483 0 5446 6 1 5 6 0 8 0 pvpl 32 763639 0 748680 303 146 157 243 0 265 34 pmappl 200 2737 0 2723 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 692 0 145 19 1 18 19 0 8 0