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(fffffd8037c923b8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803d371bc0,ffff8000ffff3b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803d371bc0,ffff8000ffff3b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803d371bc0,ffff8000ffff3b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3b40,ffff800016a09300,ffff800016a09370) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016a093d0) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffd83a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd8370, 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(fffffd8037c923b8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803d371bc0,ffff8000ffff3b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803d371bc0,ffff8000ffff3b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803d371bc0,ffff8000ffff3b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3b40,ffff800016a09300,ffff800016a09370) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016a093d0) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffd83a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd8370, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016a08ff0 rbx 0xffff800016a090a0 rdx 0x2 rcx 0 rax 0 r8 0xffff800016a08fb0 r9 0x1 r10 0 r11 0x35004e5501348ac9 r12 0x3000000008 r13 0xffff800016a09000 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016a08fe0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=479600 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2780,0xffff8000ffff33e8 process=0xffff8000ffff6a30 user=0xffff800016a04000, vmspace=0xfffffd803f013dd0 estcpu=36, cpticks=17, pctcpu=0.0 user=0, sys=3, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 77716 358694 40565 0 2 0 syz-executor.1 77716 467889 40565 0 3 0x4000080 fsleep syz-executor.1 40565 380558 59339 0 2 0x482 syz-executor.1 80100 248528 0 0 3 0x14200 bored sosplice 99631 339377 59339 0 2 0x482 syz-executor.0 59339 471696 22316 0 3 0x82 thrsleep syz-fuzzer 59339 469040 22316 0 3 0x4000082 thrsleep syz-fuzzer 59339 199917 22316 0 3 0x4000082 thrsleep syz-fuzzer 59339 225011 22316 0 3 0x4000082 thrsleep syz-fuzzer 59339 190058 22316 0 3 0x4000082 kqread syz-fuzzer 59339 348411 22316 0 3 0x4000082 thrsleep syz-fuzzer 59339 160075 22316 0 3 0x4000082 thrsleep syz-fuzzer 22316 87571 60774 0 3 0x10008a pause ksh 60774 222225 72665 0 3 0x92 select sshd 24697 251108 1 0 3 0x100083 ttyin getty 72665 70245 1 0 3 0x80 select sshd 46798 115788 5740 73 2 0x100090 syslogd 5740 460342 1 0 3 0x100082 netio syslogd 79012 523368 1 77 3 0x100090 poll dhclient 63034 45090 1 0 3 0x80 poll dhclient 28676 22807 0 0 2 0x14200 zerothread 2914 518712 0 0 3 0x14200 aiodoned aiodoned 44036 131694 0 0 3 0x14200 syncer update 63945 144385 0 0 3 0x14200 cleaner cleaner 58843 378293 0 0 3 0x14200 reaper reaper 95066 176829 0 0 3 0x14200 pgdaemon pagedaemon 37363 383604 0 0 3 0x14200 bored crynlk 5631 187431 0 0 3 0x14200 bored crypto 23145 133914 0 0 3 0x40014200 acpi0 acpi0 97611 29657 0 0 3 0x14200 bored softnet 7660 377923 0 0 3 0x14200 bored systqmp 64775 432110 0 0 3 0x14200 bored systq 67792 252783 0 0 3 0x40014200 bored softclock 72757 338926 0 0 3 0x40014200 idle0 49724 233570 0 0 3 0x14200 bored smr 1 436322 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 9513 6414K 6929K 78643K 13721 0 0 pcb 13 8K 8K 78643K 100 0 0 rtable 111 4K 4K 78643K 512 0 0 ifaddr 59 13K 14K 78643K 192 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 56 0 0 iov 0 0K 16K 78643K 124 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 2269 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 16 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 148 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1183 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 42 30K 54K 78643K 473 0 0 subproc 32 2K 2K 78643K 51 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 115 0 0 in_multi 33 2K 2K 78643K 97 0 0 ether_multi 1 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 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 255 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 22K 78643K 3572 0 0 UVM aobj 58 2K 2K 78643K 65 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 57 0 0 NDP 12 0K 0K 78643K 55 0 0 temp 170 2723K 2791K 78643K 6865 0 0 kqueue 0 0K 0K 78643K 6 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 2 1 0 1 1 0 8 0 rtpcb 80 75 0 73 1 0 1 1 0 8 0 rtentry 112 56 0 12 2 0 2 2 0 8 0 unpcb 120 501 0 491 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1762 0 1762 2 2 0 1 0 8 0 tcpcb 544 224 0 220 1 0 1 1 0 8 0 inpcb 280 602 0 595 3 2 1 2 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 24 0 24 5 5 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 236 0 44 12 0 12 12 0 8 0 art_table 32 237 0 44 2 0 2 2 0 8 0 art_node 16 55 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 14 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 144 0 134 1 0 1 1 0 8 0 shmpl 112 63 0 7 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3256 0 1848 46 0 46 46 0 8 0 ffsino 240 3256 0 1848 84 0 84 84 0 8 0 nchpl 144 5047 0 3417 61 0 61 61 0 8 0 uvmvnodes 72 4019 0 0 74 0 74 74 0 8 0 vnodes 200 4019 0 0 212 0 212 212 0 8 0 namei 1024 14992 0 14992 1 0 1 1 0 8 1 scsiplug 64 5 0 5 4 4 0 1 0 8 0 scxspl 192 14723 0 14723 10 9 1 5 0 8 1 plimitpl 152 84 0 77 1 0 1 1 0 8 0 sigapl 432 1351 0 1337 2 0 2 2 0 8 0 futexpl 56 19478 0 19477 1 0 1 1 0 8 0 knotepl 112 270 0 251 1 0 1 1 0 8 0 kqueuepl 104 297 0 295 1 0 1 1 0 8 0 pipepl 112 900 0 881 5 4 1 2 0 8 0 fdescpl 424 1352 0 1337 2 0 2 2 0 8 0 filepl 120 7943 0 7847 7 3 4 5 0 8 0 lockfpl 104 415 0 415 3 2 1 1 0 8 1 lockfspl 48 138 0 138 3 2 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 34 0 24 1 0 1 1 0 8 0 ucredpl 96 1381 0 1374 1 0 1 1 0 8 0 zombiepl 144 1338 0 1337 2 1 1 1 0 8 0 processpl 864 1367 0 1337 4 0 4 4 0 8 0 procpl 632 2825 0 2788 4 0 4 4 0 8 0 sosppl 128 21 0 21 4 3 1 1 0 8 1 sockpl 384 1192 0 1173 5 2 3 4 0 8 0 mcl64k 65536 37 0 37 5 4 1 1 0 8 1 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl12k 12288 17 0 17 5 4 1 1 0 8 1 mcl9k 9216 7 0 7 4 4 0 1 0 8 0 mcl8k 8192 26 0 26 4 3 1 1 0 8 1 mcl4k 4096 62 0 62 3 2 1 1 0 8 1 mcl2k2 2112 5 0 5 3 3 0 1 0 8 0 mcl2k 2048 55564 0 55520 20 13 7 12 0 8 1 mtagpl 80 38 0 6 2 1 1 1 0 8 0 mbufpl 256 94116 0 93993 14 5 9 10 0 8 0 bufpl 256 9372 0 3719 354 0 354 354 0 8 0 anonpl 16 131136 0 119466 95 40 55 63 0 62 6 amapchunkpl 152 5561 0 5448 18 11 7 15 0 158 2 amappl16 192 7371 0 6729 72 37 35 44 0 8 2 amappl15 184 2 0 1 1 0 1 1 0 8 0 amappl14 176 629 0 622 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 134 0 131 1 0 1 1 0 8 0 amappl11 152 51 0 40 1 0 1 1 0 8 0 amappl10 144 70 0 70 2 2 0 1 0 8 0 amappl9 136 524 0 520 1 0 1 1 0 8 0 amappl8 128 144 0 128 1 0 1 1 0 8 0 amappl7 120 36 0 31 1 0 1 1 0 8 0 amappl6 112 60 0 53 1 0 1 1 0 8 0 amappl5 104 362 0 352 1 0 1 1 0 8 0 amappl4 96 1568 0 1542 1 0 1 1 0 8 0 amappl3 88 763 0 752 1 0 1 1 0 8 0 amappl2 80 10027 0 9949 4 2 2 3 0 8 0 amappl1 72 33103 0 32682 24 15 9 19 0 8 0 amappl 80 3072 0 3032 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 64 0 7 1 0 1 1 0 8 0 uaddrrnd 24 1352 0 1337 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1352 0 1337 1 0 1 1 0 8 0 vmmpekpl 168 12024 0 11997 2 0 2 2 0 8 0 vmmpepl 168 161878 0 160100 129 48 81 95 0 357 3 vmsppl 272 1351 0 1337 2 1 1 2 0 8 0 pdppl 4096 2710 0 2674 6 1 5 6 0 8 0 pvpl 32 428458 0 413636 227 88 139 224 0 265 18 pmappl 200 1351 0 1337 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 513 0 32 14 0 14 14 0 8 0