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(fffffd803899e500) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803e604d38,ffff8000ffff3b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803e604d38,ffff8000ffff3b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803e604d38,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,ffff8000159d61d0,ffff8000159d6240) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159d62a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffda404) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffda3d0, 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(fffffd803899e500) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803e604d38,ffff8000ffff3b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803e604d38,ffff8000ffff3b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803e604d38,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,ffff8000159d61d0,ffff8000159d6240) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159d62a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffda404) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffda3d0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159d5ec0 rbx 0xffff8000159d5f70 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159d5e80 r9 0x1 r10 0 r11 0x1cc1040eb884beeb r12 0x3000000008 r13 0xffff8000159d5ed0 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159d5eb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=89368 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3650,0xffffffff822c3530 process=0xffff8000ffff6d90 user=0xffff8000159d1000, vmspace=0xfffffd803f013110 estcpu=36, cpticks=9, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 48596 122916 87316 0 2 0 syz-executor.1 48596 438500 87316 0 2 0x4000000 syz-executor.1 48596 366474 87316 0 3 0x4000000 inode syz-executor.1 80091 267254 0 0 3 0x14200 bored sosplice 76682 307003 89878 0 2 0x482 syz-executor.0 87316 10837 89878 0 2 0x482 syz-executor.1 89878 463026 48430 0 3 0x82 thrsleep syz-fuzzer 89878 313528 48430 0 3 0x4000082 thrsleep syz-fuzzer 89878 190378 48430 0 3 0x4000082 thrsleep syz-fuzzer 89878 42540 48430 0 3 0x4000082 thrsleep syz-fuzzer 89878 128814 48430 0 3 0x4000082 thrsleep syz-fuzzer 89878 136299 48430 0 3 0x4000082 kqread syz-fuzzer 89878 393398 48430 0 3 0x4000082 thrsleep syz-fuzzer 48430 461254 59416 0 3 0x10008a pause ksh 59416 489539 27184 0 3 0x92 select sshd 1756 184470 1 0 3 0x100083 ttyin getty 27184 105261 1 0 3 0x80 select sshd 90035 75531 87447 73 2 0x100090 syslogd 87447 303850 1 0 3 0x100082 netio syslogd 84034 350697 1 77 3 0x100090 poll dhclient 94236 487386 1 0 3 0x80 poll dhclient 14753 364751 0 0 2 0x14200 zerothread 70083 492655 0 0 3 0x14200 aiodoned aiodoned 44706 335388 0 0 3 0x14200 syncer update 42107 134731 0 0 3 0x14200 cleaner cleaner 45150 452738 0 0 3 0x14200 reaper reaper 50216 250864 0 0 3 0x14200 pgdaemon pagedaemon 78724 172928 0 0 3 0x14200 bored crynlk 28883 230427 0 0 3 0x14200 bored crypto 44483 318803 0 0 3 0x40014200 acpi0 acpi0 11662 456237 0 0 3 0x14200 bored softnet 76183 273719 0 0 3 0x14200 bored systqmp 17962 337671 0 0 3 0x14200 bored systq 38771 331910 0 0 3 0x40014200 bored softclock 45949 491716 0 0 3 0x40014200 idle0 29090 1529 0 0 3 0x14200 bored smr 1 278419 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 9485 6326K 6793K 78643K 11625 0 0 pcb 13 8K 8K 78643K 53 0 0 rtable 108 3K 4K 78643K 277 0 0 ifaddr 52 12K 13K 78643K 87 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 33 0 0 iov 1 12K 24K 78643K 49 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1217 76K 77K 78643K 1625 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 4 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 50 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 482 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 41 30K 54K 78643K 424 0 0 subproc 32 2K 2K 78643K 34 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 45 0 0 in_multi 33 2K 2K 78643K 36 0 0 ether_multi 1 0K 0K 78643K 2 0 0 mrt 0 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 219 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 92 20K 22K 78643K 1964 0 0 UVM aobj 24 2K 2K 78643K 26 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 18 0 0 NDP 10 0K 0K 78643K 23 0 0 temp 138 2718K 2787K 78643K 4429 0 0 kqueue 0 0K 0K 78643K 3 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 6 0 0 1 0 1 1 0 8 0 rtpcb 80 49 0 47 1 0 1 1 0 8 0 rtentry 112 47 0 3 2 0 2 2 0 8 0 unpcb 120 167 0 157 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 942 0 942 1 1 0 1 0 8 0 tcpcb 544 91 0 86 1 0 1 1 0 8 0 inpcb 280 248 0 239 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 8 0 8 2 1 1 1 0 8 1 ppxss 1128 7 0 7 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 24 0 14 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 48 0 38 1 0 1 1 0 8 0 shmpl 112 24 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2189 0 773 46 0 46 46 0 8 0 ffsino 240 2189 0 773 84 0 84 84 0 8 0 nchpl 144 3074 0 1431 61 0 61 61 0 8 0 uvmvnodes 72 2478 0 0 46 0 46 46 0 8 0 vnodes 200 2478 0 0 131 0 131 131 0 8 0 namei 1024 8601 0 8601 2 1 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 8438 0 8438 9 7 2 6 0 8 2 plimitpl 152 63 0 56 1 0 1 1 0 8 0 sigapl 432 653 0 639 2 0 2 2 0 8 0 futexpl 56 7981 0 7981 1 0 1 1 0 8 1 knotepl 112 159 0 140 1 0 1 1 0 8 0 kqueuepl 104 126 0 124 1 0 1 1 0 8 0 pipepl 112 394 0 375 3 1 2 2 0 8 1 fdescpl 424 654 0 639 2 0 2 2 0 8 0 filepl 120 3878 0 3778 5 0 5 5 0 8 1 lockfpl 104 141 0 139 3 2 1 1 0 8 0 lockfspl 48 56 0 55 3 2 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 720 0 713 1 0 1 1 0 8 0 zombiepl 144 640 0 639 2 1 1 1 0 8 0 processpl 864 669 0 639 4 0 4 4 0 8 0 procpl 632 1266 0 1228 4 0 4 4 0 8 0 sosppl 128 5 0 5 2 1 1 1 0 8 1 sockpl 384 478 0 457 3 0 3 3 0 8 0 mcl64k 65536 14 0 14 2 1 1 1 0 8 1 mcl16k 16384 4 0 4 4 3 1 1 0 8 1 mcl12k 12288 12 0 12 2 1 1 1 0 8 1 mcl9k 9216 3 0 3 2 2 0 1 0 8 0 mcl8k 8192 10 0 10 2 1 1 1 0 8 1 mcl4k 4096 28 0 28 4 3 1 1 0 8 1 mcl2k2 2112 4 0 4 2 2 0 1 0 8 0 mcl2k 2048 55122 0 55087 17 11 6 12 0 8 1 mtagpl 80 18 0 2 2 1 1 1 0 8 0 mbufpl 256 89241 0 89137 10 1 9 9 0 8 0 bufpl 256 6745 0 2193 285 0 285 285 0 8 0 anonpl 16 76404 0 64550 79 16 63 63 0 62 15 amapchunkpl 152 2706 0 2570 11 4 7 9 0 158 1 amappl16 192 3630 0 2999 63 25 38 43 0 8 6 amappl14 176 287 0 279 1 0 1 1 0 8 0 amappl13 168 7 0 7 1 1 0 1 0 8 0 amappl12 160 7 0 5 1 0 1 1 0 8 0 amappl11 152 274 0 260 1 0 1 1 0 8 0 amappl10 144 60 0 60 2 2 0 1 0 8 0 amappl9 136 552 0 549 1 0 1 1 0 8 0 amappl8 128 129 0 113 1 0 1 1 0 8 0 amappl7 120 33 0 28 1 0 1 1 0 8 0 amappl6 112 265 0 259 1 0 1 1 0 8 0 amappl5 104 150 0 140 1 0 1 1 0 8 0 amappl4 96 877 0 850 1 0 1 1 0 8 0 amappl3 88 414 0 402 1 0 1 1 0 8 0 amappl2 80 4442 0 4367 4 2 2 3 0 8 0 amappl1 72 20643 0 20202 26 17 9 19 0 8 0 amappl 80 1499 0 1454 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 25 0 2 1 0 1 1 0 8 0 uaddrrnd 24 654 0 639 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 654 0 639 1 0 1 1 0 8 0 vmmpekpl 168 7985 0 7958 2 0 2 2 0 8 0 vmmpepl 168 82820 0 81019 118 31 87 90 0 357 8 vmsppl 272 653 0 639 2 1 1 2 0 8 0 pdppl 4096 1314 0 1278 6 1 5 6 0 8 0 pvpl 32 221638 0 206344 173 19 154 157 0 265 30 pmappl 200 653 0 639 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 437 0 25 12 0 12 12 0 8 0