panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 57196 86424 0 0 0x4000000 0 syz-executor.1 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(fffffd80669524f8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80640efc98,ffff800020b298c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80640efc98,ffff800020b298c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80640efc98,ffff800020b298c8) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b298c8) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b298c8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b298c8,ffff800022e157f0,ffff800022e15860) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800022e158d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022e158d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe5894) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe5860, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic vput: v_writecount != 0 ddb{1}> 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(fffffd80669524f8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80640efc98,ffff800020b298c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80640efc98,ffff800020b298c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80640efc98,ffff800020b298c8) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b298c8) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b298c8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b298c8,ffff800022e157f0,ffff800022e15860) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800022e158d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022e158d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe5894) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe5860, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800022e154e0 rbx 0xffff800022e15590 rdx 0xffff800020b298c8 rcx 0 rax 0 r8 0xffffffff81ecbab3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x5efe1664e9410353 r12 0x3000000008 r13 0xffff800022e154f0 r14 0x100 r15 0x1 rip 0xffffffff81b7cd58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022e154d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=139236 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b29b40,0xffff800020b28028 process=0xffff800020b7ce00 user=0xffff800022e10000, vmspace=0xfffffd807effe5c0 estcpu=31, cpticks=4, pctcpu=0.4 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 86424 243005 85111 0 2 0 syz-executor.1 86424 321160 85111 0 3 0x4000080 fsleep syz-executor.1 86424 337774 85111 0 3 0x4000080 fsleep syz-executor.1 86424 57196 85111 0 7 0x4000000 syz-executor.1 52068 157737 1 0 3 0x100083 ttyin getty 85111 114588 73890 0 3 0x82 nanosleep syz-executor.1 44482 479925 0 0 3 0x14200 bored sosplice 68004 38580 73890 0 3 0x82 nanosleep syz-executor.0 73890 339870 88454 0 3 0x82 kqread syz-fuzzer 73890 412760 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 442736 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 458997 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 44422 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 197084 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 87547 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 222672 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 60255 88454 0 3 0x4000082 thrsleep syz-fuzzer 73890 329884 88454 0 3 0x4000082 thrsleep syz-fuzzer 88454 498163 66792 0 3 0x10008a pause ksh 66792 95091 95284 0 3 0x92 select sshd 95284 231576 1 0 3 0x80 select sshd 85722 160078 86339 74 3 0x100092 bpf pflogd 86339 312892 1 0 3 0x80 netio pflogd 87733 192232 99657 73 3 0x100090 kqread syslogd 99657 484599 1 0 3 0x100082 netio syslogd 82578 438591 1 77 3 0x100090 poll dhclient 37582 202725 1 0 3 0x80 poll dhclient 58933 436051 0 0 2 0x14200 zerothread 16606 177659 0 0 3 0x14200 aiodoned aiodoned 27686 71920 0 0 3 0x14200 syncer update 88705 165022 0 0 3 0x14200 cleaner cleaner 72394 243929 0 0 3 0x14200 reaper reaper 68676 503356 0 0 3 0x14200 pgdaemon pagedaemon 86091 132981 0 0 3 0x14200 bored crynlk 88999 462489 0 0 3 0x14200 bored crypto 51113 170097 0 0 3 0x40014200 acpi0 acpi0 61031 243022 0 0 3 0x40014200 idle1 59018 403707 0 0 3 0x14200 bored softnet 90797 209168 0 0 3 0x14200 bored systqmp 67040 483324 0 0 3 0x14200 bored systq 20907 58143 0 0 3 0x40014200 bored softclock 54323 353892 0 0 3 0x40014200 idle0 38253 257942 0 0 3 0x14200 bored smr 1 93473 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9561 6436K 7339K 78643K 17316 0 0 pcb 13 8K 8K 78643K 200 0 0 rtable 117 12K 13K 78643K 771 0 0 ifaddr 72 16K 16K 78643K 324 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1600 0 0 iov 0 0K 32K 78643K 289 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1211 76K 77K 78643K 3629 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 38 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 310 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 2600 0 0 sigio 0 0K 0K 78643K 22 0 0 proc 54 51K 82K 78643K 739 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 249 0 0 in_multi 33 2K 2K 78643K 144 0 0 ether_multi 1 0K 0K 78643K 21 0 0 mrt 0 0K 0K 78643K 15 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 435 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 115 22K 31K 78643K 9451 0 0 UVM aobj 123 4K 4K 78643K 132 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 187 0 0 NDP 16 0K 0K 78643K 87 0 0 temp 200 2748K 3387K 78643K 11405 0 0 kqueue 0 0K 0K 78643K 23 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 9 0 3 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 126 0 124 1 0 1 1 0 8 0 rtentry 112 68 0 24 2 0 2 2 0 8 0 unpcb 120 863 0 849 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7611 0 7611 3 3 0 2 0 8 0 tcpcb 544 460 0 456 1 0 1 1 0 8 0 inpcb 280 1259 0 1252 3 2 1 2 0 8 0 rttmr 72 6 0 6 4 4 0 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 24 0 24 10 10 0 1 0 8 0 ppxss 1128 56 0 56 10 10 0 1 0 8 0 pffrag 232 3 0 3 1 1 0 1 0 482 0 pffrnode 88 3 0 3 1 1 0 1 0 8 0 pffrent 40 9 0 9 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 58 0 54 1 0 1 1 0 8 0 pfstkey 112 58 0 54 1 0 1 1 0 8 0 pfstate 328 58 0 54 3 1 2 3 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 235 0 44 13 1 12 12 0 8 0 art_table 32 236 0 44 2 0 2 2 0 8 0 art_node 16 61 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 10 1 0 1 1 0 8 0 semapl 112 308 0 298 1 0 1 1 0 8 0 shmpl 112 130 0 9 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5633 0 4213 47 0 47 47 0 8 0 ffsino 272 5633 0 4213 96 0 96 96 0 8 0 nchpl 144 9455 0 7819 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 29940 0 29940 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 26821 0 26821 15 14 1 6 0 8 1 plimitpl 152 214 0 206 1 0 1 1 0 8 0 sigapl 432 2798 0 2782 3 1 2 3 0 8 0 futexpl 56 33663 0 33661 1 0 1 1 0 8 0 knotepl 112 429 0 410 1 0 1 1 0 8 0 kqueuepl 104 522 0 520 1 0 1 1 0 8 0 pipepl 112 1572 0 1553 6 5 1 2 0 8 0 fdescpl 488 2799 0 2782 3 0 3 3 0 8 0 filepl 152 16955 0 16853 10 5 5 6 0 8 0 lockfpl 104 1030 0 1030 2 1 1 1 0 8 1 lockfspl 48 354 0 354 2 1 1 1 0 8 1 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 43 0 32 1 0 1 1 0 8 0 ucredpl 96 3685 0 3676 1 0 1 1 0 8 0 zombiepl 144 2783 0 2782 3 2 1 1 0 8 0 processpl 896 2815 0 2782 4 0 4 4 0 8 0 procpl 632 8514 0 8469 13 9 4 5 0 8 0 srpgc 64 6 0 6 5 5 0 1 0 8 0 sosppl 128 32 0 32 10 10 0 1 0 8 0 sockpl 384 2289 0 2266 5 2 3 4 0 8 0 mcl64k 65536 19 0 0 3 0 3 3 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 11 0 0 2 0 2 2 0 8 0 mcl4k 4096 14 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 251 0 0 29 6 23 29 0 8 1 mtagpl 80 25 0 0 1 0 1 1 0 8 0 mbufpl 256 324 0 0 16 0 16 16 0 8 0 bufpl 256 10944 0 3915 440 0 440 440 0 8 0 anonpl 16 257555 0 245603 120 55 65 65 0 125 14 amapchunkpl 152 16452 0 16334 25 18 7 10 0 158 0 amappl16 192 12715 0 12061 85 41 44 45 0 8 11 amappl15 184 1294 0 1292 1 0 1 1 0 8 0 amappl14 176 1349 0 1342 1 0 1 1 0 8 0 amappl13 168 8 0 8 3 3 0 1 0 8 0 amappl12 160 674 0 670 1 0 1 1 0 8 0 amappl11 152 663 0 647 1 0 1 1 0 8 0 amappl10 144 85 0 80 1 0 1 1 0 8 0 amappl9 136 618 0 615 1 0 1 1 0 8 0 amappl8 128 184 0 153 2 0 2 2 0 8 0 amappl7 120 40 0 36 1 0 1 1 0 8 0 amappl6 112 664 0 654 1 0 1 1 0 8 0 amappl5 104 809 0 794 1 0 1 1 0 8 0 amappl4 96 1798 0 1768 2 1 1 2 0 8 0 amappl3 88 2853 0 2838 1 0 1 1 0 8 0 amappl2 80 21462 0 21384 4 2 2 3 0 8 0 amappl1 72 69031 0 68560 26 16 10 20 0 8 0 amappl 80 8816 0 8773 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 131 0 9 2 0 2 2 0 8 0 uaddrrnd 24 2799 0 2782 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2799 0 2782 1 0 1 1 0 8 0 vmmpekpl 168 24660 0 24633 2 0 2 2 0 8 0 vmmpepl 168 344147 0 342219 177 82 95 101 0 357 11 vmsppl 368 2798 0 2782 2 0 2 2 0 8 0 pdppl 4096 5606 0 5564 6 0 6 6 0 8 0 pvpl 32 720347 0 705092 271 111 160 160 0 265 33 pmappl 232 2798 0 2782 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 621 0 11 18 0 18 18 0 8 0