panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 14735 75241 0 0 0 0 syz-executor.0 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(fffffd80680cb9e8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80677cf568,ffff800020b513d8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80677cf568,ffff800020b513d8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80677cf568,ffff800020b513d8) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b513d8) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b513d8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b513d8,ffff800022601c30,ffff800022601ca0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800022601d10) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022601d10) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff8564) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8530, 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(fffffd80680cb9e8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80677cf568,ffff800020b513d8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80677cf568,ffff800020b513d8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80677cf568,ffff800020b513d8) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b513d8) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b513d8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b513d8,ffff800022601c30,ffff800022601ca0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800022601d10) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022601d10) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7fffff8564) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8530, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800022601920 rbx 0xffff8000226019d0 rdx 0xffff800020b513d8 rcx 0 rax 0 r8 0xffffffff81386d93 kprintf+0x173 r9 0x1 r10 0x25 r11 0x5f54d7048147ed39 r12 0x3000000008 r13 0xffff800022601930 r14 0x100 r15 0x1 rip 0xffffffff81dcdf98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022601910 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=318947 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b509f8,0xffff800020b518d8 process=0xffff800020b2b510 user=0xffff8000225fc000, vmspace=0xfffffd807f00bcf0 estcpu=36, cpticks=9, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 75241 14735 98826 0 7 0 syz-executor.0 75241 65089 98826 0 3 0x4000080 fsleep syz-executor.0 12921 501265 69293 0 3 0x82 nanosleep syz-executor.1 44864 418867 1 0 3 0x100083 ttyin getty 34111 240095 0 0 3 0x14200 bored sosplice 98826 197402 69293 0 3 0x82 nanosleep syz-executor.0 69293 164483 61328 0 3 0x82 thrsleep syz-fuzzer 69293 53314 61328 0 3 0x4000082 thrsleep syz-fuzzer 69293 381240 61328 0 3 0x4000082 thrsleep syz-fuzzer 69293 77219 61328 0 3 0x4000082 thrsleep syz-fuzzer 69293 516468 61328 0 3 0x4000082 kqread syz-fuzzer 69293 197822 61328 0 3 0x4000082 thrsleep syz-fuzzer 69293 74798 61328 0 3 0x4000082 thrsleep syz-fuzzer 69293 522502 61328 0 3 0x4000082 thrsleep syz-fuzzer 69293 503940 61328 0 3 0x4000082 thrsleep syz-fuzzer 69293 69689 61328 0 3 0x4000082 thrsleep syz-fuzzer 61328 328376 68886 0 3 0x10008a pause ksh 68886 405551 83989 0 3 0x92 select sshd 83989 513276 1 0 3 0x80 select sshd 91876 89492 14884 74 3 0x100092 bpf pflogd 14884 45212 1 0 3 0x80 netio pflogd 29112 482322 28593 73 3 0x100090 kqread syslogd 28593 32594 1 0 3 0x100082 netio syslogd 68945 401108 1 77 3 0x100090 poll dhclient 35534 49589 1 0 3 0x80 poll dhclient 37253 453796 0 0 2 0x14200 zerothread 21622 301554 0 0 3 0x14200 aiodoned aiodoned 17874 492513 0 0 3 0x14200 syncer update 89014 173675 0 0 3 0x14200 cleaner cleaner 99143 420649 0 0 3 0x14200 reaper reaper 94473 416152 0 0 3 0x14200 pgdaemon pagedaemon 72442 51830 0 0 3 0x14200 bored crynlk 98404 228499 0 0 3 0x14200 bored crypto 78227 498468 0 0 3 0x40014200 acpi0 acpi0 20873 490916 0 0 3 0x40014200 idle1 10870 280555 0 0 3 0x14200 bored softnet 81876 158831 0 0 3 0x14200 bored systqmp 94316 366604 0 0 3 0x14200 bored systq 52009 53654 0 0 3 0x40014200 bored softclock 11114 100409 0 0 3 0x40014200 idle0 45193 427868 0 0 3 0x14200 bored smr 1 65494 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 9557 6428K 6927K 78643K 14602 0 0 pcb 13 8K 8K 78643K 143 0 0 rtable 113 4K 4K 78643K 567 0 0 ifaddr 72 15K 15K 78643K 237 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1560 0 0 iov 0 0K 32K 78643K 215 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 2693 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 22 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 491 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 1897 0 0 sigio 0 0K 0K 78643K 601 0 0 proc 54 51K 71K 78643K 648 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 131 0 0 in_multi 33 2K 2K 78643K 73 0 0 ether_multi 1 0K 0K 78643K 7 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 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 356 0 0 pfkey data 0 0K 0K 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 103 21K 30K 78643K 7053 0 0 UVM aobj 79 3K 3K 78643K 88 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 85 0 0 NDP 16 0K 0K 78643K 64 0 0 temp 200 2748K 2867K 78643K 9108 0 0 kqueue 0 0K 0K 78643K 11 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 2 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 78 0 76 1 0 1 1 0 8 0 rtentry 112 63 0 18 2 0 2 2 0 8 0 unpcb 120 567 0 553 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 8974 0 8974 3 3 0 2 0 8 0 tcpcb 544 276 0 272 1 0 1 1 0 8 0 inpcb 280 775 0 767 3 2 1 2 0 8 0 rttmr 72 6 0 6 3 3 0 1 0 8 0 nd6 48 10 0 4 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 ppxss 1128 33 0 33 6 5 1 1 0 8 1 pffrag 232 2 0 2 1 1 0 1 0 482 0 pffrnode 88 2 0 2 1 1 0 1 0 8 0 pffrent 40 6 0 6 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 42 0 27 1 0 1 1 0 8 0 pfstkey 112 42 0 27 1 0 1 1 0 8 0 pfstate 328 42 0 27 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 237 0 46 13 1 12 12 0 8 0 art_table 32 238 0 46 2 0 2 2 0 8 0 art_node 16 62 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 6 1 0 1 1 0 8 0 semapl 112 489 0 479 1 0 1 1 0 8 0 shmpl 112 86 0 9 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4282 0 2865 47 0 47 47 0 8 0 ffsino 272 4282 0 2865 96 0 96 96 0 8 0 nchpl 144 7054 0 5421 62 0 62 62 0 8 0 uvmvnodes 72 5357 0 0 98 0 98 98 0 8 0 vnodes 200 5357 0 0 282 0 282 282 0 8 0 namei 1024 21104 0 21104 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 6 0 6 3 3 0 1 0 8 0 scxspl 192 21576 0 21576 14 13 1 6 0 8 1 plimitpl 152 145 0 137 1 0 1 1 0 8 0 sigapl 432 2096 0 2080 3 1 2 3 0 8 0 futexpl 56 22446 0 22445 1 0 1 1 0 8 0 knotepl 112 357 0 338 1 0 1 1 0 8 0 kqueuepl 104 388 0 386 1 0 1 1 0 8 0 pipepl 112 1642 0 1623 4 3 1 2 0 8 0 fdescpl 488 2097 0 2080 3 0 3 3 0 8 0 filepl 152 11537 0 11435 9 4 5 7 0 8 0 lockfpl 104 602 0 602 2 1 1 1 0 8 1 lockfspl 48 211 0 211 2 1 1 1 0 8 1 sessionpl 112 21 0 10 1 0 1 1 0 8 0 pgrppl 48 54 0 43 1 0 1 1 0 8 0 ucredpl 96 2506 0 2497 1 0 1 1 0 8 0 zombiepl 144 2081 0 2080 3 2 1 1 0 8 0 processpl 896 2113 0 2080 4 0 4 4 0 8 0 procpl 632 6179 0 6136 7 3 4 5 0 8 0 srpgc 64 6 0 6 3 3 0 1 0 8 0 sosppl 128 20 0 20 7 6 1 1 0 8 1 sockpl 384 1446 0 1423 6 3 3 4 0 8 0 mcl64k 65536 16 0 0 2 0 2 2 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 14 0 0 2 0 2 2 0 8 0 mcl9k 9216 10 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 294 0 0 35 0 35 35 0 8 0 mtagpl 80 24 0 0 1 0 1 1 0 8 0 mbufpl 256 624 0 0 31 0 31 31 0 8 0 bufpl 256 10074 0 3045 440 0 440 440 0 8 0 anonpl 16 189690 0 180010 106 55 51 65 0 125 1 amapchunkpl 152 11845 0 11732 22 16 6 10 0 158 1 amappl16 192 9295 0 8634 83 48 35 46 0 8 1 amappl15 184 962 0 959 1 0 1 1 0 8 0 amappl14 176 1013 0 1007 1 0 1 1 0 8 0 amappl13 168 7 0 7 1 1 0 1 0 8 0 amappl12 160 882 0 881 2 1 1 1 0 8 0 amappl11 152 78 0 61 1 0 1 1 0 8 0 amappl10 144 85 0 81 1 0 1 1 0 8 0 amappl9 136 616 0 612 1 0 1 1 0 8 0 amappl8 128 175 0 149 1 0 1 1 0 8 0 amappl7 120 37 0 33 1 0 1 1 0 8 0 amappl6 112 79 0 67 1 0 1 1 0 8 0 amappl5 104 1010 0 996 1 0 1 1 0 8 0 amappl4 96 2371 0 2341 1 0 1 1 0 8 0 amappl3 88 231 0 221 1 0 1 1 0 8 0 amappl2 80 16712 0 16629 3 1 2 3 0 8 0 amappl1 72 54671 0 54208 26 16 10 20 0 8 0 amappl 80 6453 0 6412 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 87 0 9 2 0 2 2 0 8 0 uaddrrnd 24 2097 0 2080 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2097 0 2080 1 0 1 1 0 8 0 vmmpekpl 168 19466 0 19434 2 0 2 2 0 8 0 vmmpepl 168 258266 0 256357 180 78 102 102 0 357 19 vmsppl 368 2096 0 2080 2 0 2 2 0 8 0 pdppl 4096 4201 0 4160 7 1 6 6 0 8 0 pvpl 32 544465 0 531502 242 95 147 165 0 265 21 pmappl 232 2096 0 2080 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 644 0 7 19 0 19 19 0 8 0