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(fffffd802f739e60) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8032c2e090,ffff800016bde780) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd8032c2e090,ffff800016bde780) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8032c2e090,ffff800016bde780) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800016bde780) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800016bde780,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800016bde780,ffff800017a00ba0,ffff800017a00c10) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800017a00c70) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbc954) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbc920, 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(fffffd802f739e60) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8032c2e090,ffff800016bde780) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd8032c2e090,ffff800016bde780) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8032c2e090,ffff800016bde780) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800016bde780) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800016bde780,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800016bde780,ffff800017a00ba0,ffff800017a00c10) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800017a00c70) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbc954) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbc920, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800017a00890 rbx 0xffff800017a00940 rdx 0x2 rcx 0 rax 0 r8 0xffff800017a00850 r9 0x1 r10 0 r11 0x2b24c9f76c4a4ae6 r12 0x3000000008 r13 0xffff800017a008a0 r14 0x100 r15 0x1 rip 0xffffffff818b9068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800017a00880 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=280841 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800016bde290,0xffffffff822d6d20 process=0xffff8000ffff70f0 user=0xffff8000179fb000, vmspace=0xfffffd803f00ccc0 estcpu=36, cpticks=16, pctcpu=0.0 user=0, sys=3, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 48049 112484 1 0 3 0x100083 ttyin getty 78054 379062 0 0 3 0x14200 bored sosplice 70858 476548 57101 0 2 0x482 syz-executor.1 60603 522209 57101 0 2 0x482 syz-executor.0 57101 103548 68634 0 3 0x82 thrsleep syz-fuzzer 57101 469277 68634 0 3 0x4000082 thrsleep syz-fuzzer 57101 45923 68634 0 3 0x4000082 thrsleep syz-fuzzer 57101 513235 68634 0 3 0x4000082 kqread syz-fuzzer 57101 10124 68634 0 3 0x4000082 thrsleep syz-fuzzer 57101 132159 68634 0 3 0x4000082 thrsleep syz-fuzzer 57101 377564 68634 0 3 0x4000082 thrsleep syz-fuzzer 68634 396140 8972 0 3 0x10008a pause ksh 8972 234613 6488 0 3 0x92 select sshd 6488 304053 1 0 3 0x80 select sshd 69969 1036 80552 73 2 0x100090 syslogd 80552 253668 1 0 3 0x100082 netio syslogd 42396 5750 1 77 3 0x100090 poll dhclient 54432 340000 1 0 3 0x80 poll dhclient 88222 241622 0 0 2 0x14200 zerothread 8652 23571 0 0 3 0x14200 aiodoned aiodoned 3578 41281 0 0 3 0x14200 syncer update 51260 349977 0 0 3 0x14200 cleaner cleaner 39007 504481 0 0 3 0x14200 reaper reaper 86172 46832 0 0 3 0x14200 pgdaemon pagedaemon 40671 148846 0 0 3 0x14200 bored crynlk 28862 397075 0 0 3 0x14200 bored crypto 34046 309868 0 0 3 0x40014200 acpi0 acpi0 16829 364929 0 0 3 0x14200 bored softnet 28582 86752 0 0 3 0x14200 bored systqmp 24721 346489 0 0 3 0x14200 bored systq 631 178837 0 0 3 0x40014200 bored softclock 54715 405180 0 0 3 0x40014200 idle0 96693 359624 0 0 3 0x14200 bored smr 1 39693 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 9478 6332K 7104K 78643K 11224 0 0 pcb 13 8K 8K 78643K 35 0 0 rtable 108 3K 4K 78643K 210 0 0 ifaddr 48 11K 11K 78643K 53 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 33 0 0 iov 0 0K 28K 78643K 38 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1214 76K 77K 78643K 1433 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 5 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 14 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 289 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 42 30K 46K 78643K 356 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 32 0 0 in_multi 33 2K 2K 78643K 43 0 0 ether_multi 1 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 209 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 82 20K 20K 78643K 1491 0 0 UVM aobj 2 2K 2K 78643K 2 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 10 0 0 NDP 9 0K 0K 78643K 14 0 0 temp 134 2719K 2784K 78643K 3804 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 25 0 23 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 77 0 67 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1037 0 1037 1 1 0 1 0 8 0 tcpcb 544 52 0 48 1 0 1 1 0 8 0 inpcb 280 154 0 147 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 12 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1830 0 413 46 0 46 46 0 8 0 ffsino 240 1830 0 413 84 0 84 84 0 8 0 nchpl 144 2422 0 781 61 0 61 61 0 8 0 uvmvnodes 72 2018 0 0 37 0 37 37 0 8 0 vnodes 200 2018 0 0 107 0 107 107 0 8 0 namei 1024 6556 0 6556 1 0 1 1 0 8 1 scxspl 192 6364 0 6364 7 6 1 6 0 8 1 plimitpl 152 41 0 34 1 0 1 1 0 8 0 sigapl 432 461 0 448 2 0 2 2 0 8 0 futexpl 56 4300 0 4300 1 0 1 1 0 8 1 knotepl 112 90 0 71 1 0 1 1 0 8 0 kqueuepl 104 66 0 64 1 0 1 1 0 8 0 pipepl 112 314 0 295 1 0 1 1 0 8 0 fdescpl 424 462 0 448 2 0 2 2 0 8 0 filepl 120 2561 0 2466 4 0 4 4 0 8 0 lockfpl 104 133 0 133 2 1 1 1 0 8 1 lockfspl 48 49 0 49 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 397 0 390 1 0 1 1 0 8 0 zombiepl 144 449 0 447 1 0 1 1 0 8 0 processpl 864 477 0 447 4 0 4 4 0 8 0 procpl 632 812 0 776 4 0 4 4 0 8 0 sosppl 128 4 0 4 1 1 0 1 0 8 0 sockpl 384 262 0 243 3 0 3 3 0 8 0 mcl64k 65536 11 0 11 1 0 1 1 0 8 1 mcl12k 12288 4 0 4 2 1 1 1 0 8 1 mcl9k 9216 3 0 3 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 2 1 1 1 0 8 1 mcl4k 4096 17 0 17 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 54428 0 54382 17 10 7 13 0 8 0 mtagpl 80 10 0 2 2 1 1 1 0 8 0 mbufpl 256 87312 0 87208 13 5 8 11 0 8 0 bufpl 256 6148 0 1588 286 0 286 286 0 8 0 anonpl 16 54605 0 42371 67 1 66 66 0 62 15 amapchunkpl 152 1756 0 1649 6 1 5 6 0 158 0 amappl16 192 2383 0 1704 47 5 42 47 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 52 0 47 1 0 1 1 0 8 0 amappl13 168 125 0 124 1 0 1 1 0 8 0 amappl12 160 11 0 11 1 1 0 1 0 8 0 amappl11 152 52 0 41 1 0 1 1 0 8 0 amappl10 144 62 0 61 1 0 1 1 0 8 0 amappl9 136 558 0 555 1 0 1 1 0 8 0 amappl8 128 125 0 111 1 0 1 1 0 8 0 amappl7 120 30 0 26 1 0 1 1 0 8 0 amappl6 112 60 0 54 1 0 1 1 0 8 0 amappl5 104 143 0 130 1 0 1 1 0 8 0 amappl4 96 685 0 657 1 0 1 1 0 8 0 amappl3 88 180 0 170 1 0 1 1 0 8 0 amappl2 80 2899 0 2834 3 1 2 3 0 8 0 amappl1 72 17878 0 17461 25 15 10 19 0 8 0 amappl 80 1038 0 1001 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 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 462 0 448 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 462 0 448 1 0 1 1 0 8 0 vmmpekpl 168 7352 0 7328 2 0 2 2 0 8 0 vmmpepl 168 60448 0 58736 109 19 90 99 0 357 14 vmsppl 272 461 0 448 2 1 1 2 0 8 0 pdppl 4096 931 0 896 6 1 5 6 0 8 0 pvpl 32 171224 0 156016 162 2 160 160 0 265 35 pmappl 200 461 0 448 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 433 0 21 13 0 13 13 0 8 0