panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *338452 65117 0 0 0x4000000 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(fffffd803908bd98) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f869f10,ffff800014941160) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f869f10,ffff800014941160) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f869f10,ffff800014941160) at closef+0x118 sys/kern/kern_descrip.c:1253 syscall(ffff8000159d8270) at syscall+0x508 Xsyscall(6,0,fffffffffffffed2,0,1,c97b379d0e0) at Xsyscall+0x128 end of kernel end trace frame: 0xc9a4ab57e00, count: 7 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(fffffd803908bd98) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f869f10,ffff800014941160) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f869f10,ffff800014941160) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f869f10,ffff800014941160) at closef+0x118 sys/kern/kern_descrip.c:1253 syscall(ffff8000159d8270) at syscall+0x508 Xsyscall(6,0,fffffffffffffed2,0,1,c97b379d0e0) at Xsyscall+0x128 end of kernel end trace frame: 0xc9a4ab57e00, count: -8 ddb> show registers rdi 0xffffffff81877897 db_enter+0x17 rsi 0x6e50 __ALIGN_SIZE+0x5e50 rbp 0xffff8000159d7fa0 rbx 0xffff8000159d8050 rdx 0x6e51 __ALIGN_SIZE+0x5e51 rcx 0xffff800016def000 rax 0xffff800016def000 r8 0xffff8000159d7f60 r9 0x1 r10 0xffff800000997e00 r11 0x873ed6e9f80bab76 r12 0x3000000008 r13 0xffff8000159d7fb0 r14 0x100 r15 0x1 rip 0xffffffff81877898 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159d7f90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=338452 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014940780,0xffff8000149402a0 process=0xffff8000ffff6d90 user=0xffff8000159d3000, vmspace=0xfffffd803f00b770 estcpu=36, cpticks=3, pctcpu=0.0 user=0, sys=3, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 94910 6450 99714 0 2 0 syz-executor.1 94910 1669 99714 0 3 0x4000080 fsleep syz-executor.1 65117 329541 3304 0 2 0 syz-executor.0 65117 146142 3304 0 3 0x4000080 poll syz-executor.0 *65117 338452 3304 0 7 0x4000000 syz-executor.0 95817 437306 0 0 3 0x14200 bored sosplice 3304 225547 12120 0 2 0x482 syz-executor.0 99714 182943 12120 0 2 0x482 syz-executor.1 12120 328808 25321 0 3 0x82 kqread syz-fuzzer 12120 228118 25321 0 3 0x4000082 thrsleep syz-fuzzer 12120 167134 25321 0 3 0x4000082 thrsleep syz-fuzzer 12120 484900 25321 0 3 0x4000082 thrsleep syz-fuzzer 12120 420385 25321 0 3 0x4000082 thrsleep syz-fuzzer 12120 27458 25321 0 3 0x4000082 thrsleep syz-fuzzer 12120 42614 25321 0 3 0x4000082 thrsleep syz-fuzzer 25321 369400 8388 0 3 0x10008a pause ksh 8388 355071 77806 0 3 0x92 select sshd 94370 74736 1 0 3 0x100083 ttyin getty 77806 17288 1 0 3 0x80 select sshd 96627 46119 74419 73 2 0x100090 syslogd 74419 352450 1 0 3 0x100082 netio syslogd 23509 426527 1 77 3 0x100090 poll dhclient 65332 176904 1 0 3 0x80 poll dhclient 13859 242368 0 0 2 0x14200 zerothread 76715 89167 0 0 3 0x14200 aiodoned aiodoned 36148 65400 0 0 3 0x14200 syncer update 96964 275841 0 0 3 0x14200 cleaner cleaner 65066 246211 0 0 3 0x14200 reaper reaper 20904 241413 0 0 3 0x14200 pgdaemon pagedaemon 49154 25277 0 0 3 0x14200 bored crynlk 1050 494979 0 0 3 0x14200 bored crypto 13055 22029 0 0 3 0x40014200 acpi0 acpi0 75864 463027 0 0 3 0x14200 bored softnet 10514 5649 0 0 3 0x14200 bored systqmp 42576 23910 0 0 3 0x14200 bored systq 30110 415215 0 0 2 0x40014200 softclock 50303 496241 0 0 3 0x40014200 idle0 49996 483651 0 0 3 0x14200 bored smr 1 357168 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 6335K 6969K 78643K 11830 0 0 pcb 13 8K 8K 78643K 38 0 0 rtable 113 4K 4K 78643K 297 0 0 ifaddr 51 12K 12K 78643K 100 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 35 0 0 iov 0 0K 24K 78643K 48 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1223 77K 77K 78643K 1650 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 1K 1K 78643K 22 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 476 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 41 30K 54K 78643K 415 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 53 0 0 in_multi 33 2K 2K 78643K 41 0 0 ether_multi 1 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 217 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 84 20K 30K 78643K 1955 0 0 UVM aobj 13 2K 2K 78643K 17 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 20 0 0 NDP 10 0K 0K 78643K 27 0 0 temp 156 2723K 2787K 78643K 4469 0 0 kqueue 0 0K 0K 78643K 2 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 7 0 0 1 0 1 1 0 8 0 rtpcb 80 27 0 25 1 0 1 1 0 8 0 rtentry 112 46 0 1 2 0 2 2 0 8 0 unpcb 120 141 0 131 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1904 0 1904 2 2 0 1 0 8 0 tcpcb 544 95 0 91 1 0 1 1 0 8 0 inpcb 280 228 0 221 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 6 0 6 3 2 1 1 0 8 1 ppxss 1128 8 0 8 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 190 0 0 12 0 12 12 0 8 0 art_table 32 191 0 0 2 0 2 2 0 8 0 art_node 16 45 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 7 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 16 0 6 1 0 1 1 0 8 0 shmpl 112 15 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2160 0 742 46 0 46 46 0 8 0 ffsino 240 2160 0 742 84 0 84 84 0 8 0 nchpl 144 3021 0 1379 62 0 62 62 0 8 0 uvmvnodes 72 2493 0 0 46 0 46 46 0 8 0 vnodes 200 2493 0 0 132 0 132 132 0 8 0 namei 1024 8538 0 8538 3 2 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 9260 0 9260 15 12 3 6 0 8 3 plimitpl 152 44 0 37 1 0 1 1 0 8 0 sigapl 432 647 0 633 2 0 2 2 0 8 0 futexpl 56 7544 0 7543 3 2 1 1 0 8 0 knotepl 112 120 0 101 1 0 1 1 0 8 0 kqueuepl 104 106 0 104 1 0 1 1 0 8 0 pipepl 112 410 0 391 2 1 1 1 0 8 0 fdescpl 424 648 0 633 2 0 2 2 0 8 0 filepl 120 3601 0 3505 4 0 4 4 0 8 1 lockfpl 104 193 0 193 4 3 1 1 0 8 1 lockfspl 48 70 0 70 4 3 1 1 0 8 1 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 560 0 553 1 0 1 1 0 8 0 zombiepl 144 633 0 633 2 1 1 1 0 8 1 processpl 864 663 0 633 4 0 4 4 0 8 0 procpl 632 1250 0 1211 4 0 4 4 0 8 0 sosppl 128 8 0 8 3 2 1 1 0 8 1 sockpl 384 408 0 389 5 2 3 3 0 8 1 mcl64k 65536 7 0 7 3 3 0 1 0 8 0 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl12k 12288 6 0 6 3 2 1 1 0 8 1 mcl9k 9216 3 0 3 2 2 0 1 0 8 0 mcl8k 8192 4 0 4 2 1 1 1 0 8 1 mcl4k 4096 27 0 27 4 3 1 1 0 8 1 mcl2k 2048 54779 0 54735 20 14 6 17 0 8 0 mtagpl 80 22 0 2 2 1 1 1 0 8 0 mbufpl 256 89043 0 88920 15 6 9 11 0 8 0 bufpl 256 8289 0 2823 342 0 342 342 0 8 0 anonpl 16 90416 0 78935 74 13 61 63 0 62 14 amapchunkpl 152 3040 0 2931 19 7 12 12 0 158 7 amappl16 192 4020 0 3392 54 15 39 44 0 8 7 amappl15 184 218 0 216 1 0 1 1 0 8 0 amappl14 176 268 0 261 1 0 1 1 0 8 0 amappl13 168 233 0 231 2 1 1 1 0 8 0 amappl12 160 9 0 6 1 0 1 1 0 8 0 amappl11 152 55 0 43 1 0 1 1 0 8 0 amappl10 144 59 0 59 2 2 0 1 0 8 0 amappl9 136 560 0 555 1 0 1 1 0 8 0 amappl8 128 123 0 109 1 0 1 1 0 8 0 amappl7 120 29 0 26 1 0 1 1 0 8 0 amappl6 112 52 0 45 1 0 1 1 0 8 0 amappl5 104 148 0 138 1 0 1 1 0 8 0 amappl4 96 878 0 850 1 0 1 1 0 8 0 amappl3 88 611 0 597 1 0 1 1 0 8 0 amappl2 80 4394 0 4319 4 2 2 3 0 8 0 amappl1 72 20448 0 20033 26 17 9 19 0 8 0 amappl 80 1488 0 1450 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 16 0 4 1 0 1 1 0 8 0 uaddrrnd 24 648 0 633 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 648 0 633 1 0 1 1 0 8 0 vmmpekpl 168 8359 0 8334 2 0 2 2 0 8 0 vmmpepl 168 82561 0 80803 121 36 85 94 0 357 8 vmsppl 272 647 0 633 2 1 1 2 0 8 0 pdppl 4096 1303 0 1266 6 1 5 6 0 8 0 pvpl 32 236795 0 222267 172 19 153 156 0 265 34 pmappl 200 647 0 633 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 502 0 35 14 0 14 14 0 8 0