panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 430099 34400 0 0x2 0x4000480 1 syz-fuzzer 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(fffffd8067d3aea0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8067e3e8e8,ffff800020b50290) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8067e3e8e8,ffff800020b50290) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8067e3e8e8,ffff800020b50290) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b50290) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b50290,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b50290,ffff8000250212f0,ffff800025021360) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000250213d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff8000250213d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffd4d34) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4d00, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic vput: v_writecount != 0 ddb{0}> 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(fffffd8067d3aea0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8067e3e8e8,ffff800020b50290) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8067e3e8e8,ffff800020b50290) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8067e3e8e8,ffff800020b50290) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b50290) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b50290,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b50290,ffff8000250212f0,ffff800025021360) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000250213d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff8000250213d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffd4d34) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4d00, count: -11 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800025020fe0 rbx 0xffff800025021090 rdx 0xffff800020b50290 rcx 0 rax 0 r8 0xffffffff81491283 kprintf+0x173 r9 0x1 r10 0x25 r11 0x1af5ccb4669a29cf r12 0x3000000008 r13 0xffff800025020ff0 r14 0x100 r15 0x1 rip 0xffffffff810a6988 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800025020fd0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=46692 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b513d8,0xffffffff8237b8f0 process=0xffff800020b7c700 user=0xffff80002501c000, vmspace=0xfffffd807f00c450 estcpu=36, cpticks=13, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 14152 346241 0 0 3 0x14200 bored sosplice 54021 435171 1 0 3 0x100083 ttyin getty 78377 63220 34400 0 2 0x482 syz-executor.0 69344 509105 34400 0 2 0x482 syz-executor.1 34400 357957 32354 0 3 0x82 thrsleep syz-fuzzer 34400 430099 32354 0 7 0x4000482 syz-fuzzer 34400 352703 32354 0 3 0x4000082 thrsleep syz-fuzzer 34400 238227 32354 0 3 0x4000082 thrsleep syz-fuzzer 34400 249515 32354 0 3 0x4000082 thrsleep syz-fuzzer 34400 102236 32354 0 3 0x4000082 thrsleep syz-fuzzer 34400 50204 32354 0 3 0x4000082 thrsleep syz-fuzzer 34400 486673 32354 0 3 0x4000082 kqread syz-fuzzer 34400 127950 32354 0 3 0x4000082 thrsleep syz-fuzzer 34400 59017 32354 0 3 0x4000082 thrsleep syz-fuzzer 32354 493182 2047 0 3 0x10008a pause ksh 2047 216669 94590 0 3 0x92 select sshd 94590 505376 1 0 3 0x80 select sshd 77882 201120 79687 74 3 0x100092 bpf pflogd 79687 376845 1 0 3 0x80 netio pflogd 38139 256413 81856 73 2 0x100090 syslogd 81856 349376 1 0 3 0x100082 netio syslogd 6460 102544 1 77 3 0x100090 poll dhclient 91861 414617 1 0 3 0x80 poll dhclient 63089 280381 0 0 3 0x14200 pgzero zerothread 8957 224044 0 0 3 0x14200 aiodoned aiodoned 95238 427230 0 0 3 0x14200 syncer update 95294 102424 0 0 3 0x14200 cleaner cleaner 70071 455945 0 0 2 0x14200 reaper 98026 68674 0 0 3 0x14200 pgdaemon pagedaemon 79371 367787 0 0 3 0x14200 bored crynlk 89701 232676 0 0 3 0x14200 bored crypto 1980 474402 0 0 3 0x40014200 acpi0 acpi0 14302 491778 0 0 3 0x40014200 idle1 53940 332564 0 0 3 0x14200 bored softnet 53785 95300 0 0 3 0x14200 bored systqmp 96648 389979 0 0 3 0x14200 bored systq 32691 87583 0 0 3 0x40014200 bored softclock 4655 195909 0 0 3 0x40014200 idle0 87817 44208 0 0 3 0x14200 bored smr 1 385944 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9510 6401K 6784K 78643K 11286 0 0 pcb 13 8K 8K 78643K 41 0 0 rtable 89 4K 4K 78643K 286 0 0 ifaddr 50 11K 12K 78643K 88 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1500 0 0 iov 0 0K 12K 78643K 36 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1219 77K 77K 78643K 1494 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 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 54 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 358 0 0 sigio 0 0K 0K 78643K 5 0 0 proc 54 51K 83K 78643K 469 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 28 0 0 in_multi 22 1K 2K 78643K 45 0 0 ether_multi 1 0K 0K 78643K 3 0 0 mrt 0 0K 0K 78643K 2 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 225 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 98 21K 30K 78643K 2071 0 0 UVM aobj 8 2K 2K 78643K 8 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 28 0 0 NDP 10 0K 0K 78643K 23 0 0 temp 132 2736K 2800K 78643K 4348 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 2 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 35 0 33 1 0 1 1 0 8 0 rtentry 112 45 0 12 2 0 2 2 0 8 0 unpcb 120 117 0 105 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7327 0 7327 2 2 0 1 0 8 0 tcpcb 544 76 0 72 1 0 1 1 0 8 0 inpcb 280 215 0 208 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 5 0 5 2 1 1 1 0 8 1 pffrag 232 1 0 1 1 1 0 1 0 482 0 pffrnode 88 1 0 1 1 1 0 1 0 8 0 pffrent 40 2 0 2 1 1 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 20 0 6 1 0 1 1 0 8 0 pfstkey 112 20 0 6 1 0 1 1 0 8 0 pfstate 328 20 0 6 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 44 12 0 12 12 0 8 0 art_table 32 189 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 6 1 0 1 1 0 8 0 semapl 112 48 0 38 1 0 1 1 0 8 0 shmpl 112 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1973 0 546 47 0 47 47 0 8 0 ffsino 272 1973 0 546 96 0 96 96 0 8 0 nchpl 144 2638 0 991 62 0 62 62 0 8 0 uvmvnodes 72 2193 0 0 40 0 40 40 0 8 0 vnodes 200 2193 0 0 116 0 116 116 0 8 0 namei 1024 7535 0 7535 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 7435 0 7435 11 10 1 6 0 8 1 plimitpl 152 43 0 35 1 0 1 1 0 8 0 sigapl 432 559 0 544 3 1 2 3 0 8 0 futexpl 56 4330 0 4330 1 0 1 1 0 8 1 knotepl 112 87 0 68 1 0 1 1 0 8 0 kqueuepl 104 67 0 65 1 0 1 1 0 8 0 pipepl 112 352 0 333 1 0 1 1 0 8 0 fdescpl 488 560 0 544 3 0 3 3 0 8 0 filepl 152 3185 0 3085 6 1 5 5 0 8 0 lockfpl 104 145 0 145 2 1 1 1 0 8 1 lockfspl 48 50 0 50 2 1 1 1 0 8 1 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 547 0 538 1 0 1 1 0 8 0 zombiepl 144 545 0 543 2 1 1 1 0 8 0 processpl 896 576 0 543 4 0 4 4 0 8 0 procpl 632 1306 0 1263 5 0 5 5 0 8 1 srpgc 64 2 0 2 1 1 0 1 0 8 0 sosppl 128 6 0 6 1 1 0 1 0 8 0 sockpl 384 367 0 346 4 1 3 3 0 8 0 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 125 0 0 15 0 15 15 0 8 0 mtagpl 80 4 0 0 1 0 1 1 0 8 0 mbufpl 256 158 0 0 10 0 10 10 0 8 0 bufpl 256 6597 0 1166 340 0 340 340 0 8 0 anonpl 16 58336 0 46657 58 2 56 56 0 125 7 amapchunkpl 152 2726 0 2608 13 3 10 10 0 158 4 amappl16 192 2024 0 1393 33 0 33 33 0 8 1 amappl15 184 182 0 180 1 0 1 1 0 8 0 amappl14 176 224 0 218 1 0 1 1 0 8 0 amappl13 168 8 0 7 1 0 1 1 0 8 0 amappl12 160 15 0 11 1 0 1 1 0 8 0 amappl11 152 59 0 44 1 0 1 1 0 8 0 amappl10 144 228 0 222 1 0 1 1 0 8 0 amappl9 136 601 0 598 1 0 1 1 0 8 0 amappl8 128 156 0 136 1 0 1 1 0 8 0 amappl7 120 185 0 180 1 0 1 1 0 8 0 amappl6 112 59 0 54 1 0 1 1 0 8 0 amappl5 104 134 0 119 1 0 1 1 0 8 0 amappl4 96 658 0 626 2 1 1 2 0 8 0 amappl3 88 536 0 524 1 0 1 1 0 8 0 amappl2 80 3565 0 3494 3 1 2 3 0 8 0 amappl1 72 22027 0 21594 27 16 11 20 0 8 0 amappl 80 1558 0 1515 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 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 560 0 544 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 560 0 544 1 0 1 1 0 8 0 vmmpekpl 168 8230 0 8200 2 0 2 2 0 8 0 vmmpepl 168 73709 0 71955 119 36 83 93 0 357 3 vmsppl 368 559 0 544 2 0 2 2 0 8 0 pdppl 4096 1127 0 1088 7 1 6 6 0 8 1 pvpl 32 200892 0 186018 155 14 141 141 0 265 20 pmappl 232 559 0 544 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 497 0 5 15 0 15 15 0 8 0