panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 315585 87497 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(fffffd806ec0c868) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8063e64998,ffff800020b6ec70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8063e64998,ffff800020b6ec70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8063e64998,ffff800020b6ec70) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b6ec70) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b6ec70,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b6ec70,ffff800022841bb0,ffff800022841c20) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800022841c90) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022841c90) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,1,0,1,0,7f7ffffe5034) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe5000, 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(fffffd806ec0c868) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8063e64998,ffff800020b6ec70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8063e64998,ffff800020b6ec70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8063e64998,ffff800020b6ec70) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b6ec70) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b6ec70,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b6ec70,ffff800022841bb0,ffff800022841c20) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800022841c90) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022841c90) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,1,0,1,0,7f7ffffe5034) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe5000, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000228418a0 rbx 0xffff800022841950 rdx 0xffff800020b6ec70 rcx 0 rax 0 r8 0xffffffff81c83d13 kprintf+0x173 r9 0x1 r10 0x25 r11 0xf00f51d839108a4f r12 0x3000000008 r13 0xffff8000228418b0 r14 0x100 r15 0x1 rip 0xffffffff81a69fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022841890 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=187175 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff800020b6f3d8,0xffff800020b6e2a0 process=0xffff800020b7ce00 user=0xffff80002283c000, vmspace=0xfffffd807f00b730 estcpu=34, cpticks=15, pctcpu=0.6 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 87497 315585 87576 0 7 0 syz-executor.0 87497 337773 87576 0 3 0x4000080 fsleep syz-executor.0 87497 487304 87576 0 3 0x4000080 fsleep syz-executor.0 87497 399939 87576 0 2 0x4000000 syz-executor.0 87576 359747 40189 0 3 0x82 nanosleep syz-executor.0 77555 253719 1 0 3 0x100083 ttyin getty 36455 272058 40189 0 3 0x82 nanosleep syz-executor.1 67045 182308 0 0 3 0x14200 bored sosplice 40189 219828 93481 0 3 0x82 thrsleep syz-fuzzer 40189 280689 93481 0 3 0x4000082 thrsleep syz-fuzzer 40189 84453 93481 0 3 0x4000082 thrsleep syz-fuzzer 40189 78578 93481 0 3 0x4000082 thrsleep syz-fuzzer 40189 475189 93481 0 3 0x4000082 thrsleep syz-fuzzer 40189 5964 93481 0 3 0x4000082 thrsleep syz-fuzzer 40189 344421 93481 0 3 0x4000082 thrsleep syz-fuzzer 40189 229100 93481 0 3 0x4000082 thrsleep syz-fuzzer 40189 261492 93481 0 3 0x4000082 kqread syz-fuzzer 40189 92240 93481 0 3 0x4000082 thrsleep syz-fuzzer 93481 316300 73838 0 3 0x10008a pause ksh 73838 377069 2251 0 3 0x92 select sshd 2251 370634 1 0 3 0x80 select sshd 15653 408706 69792 74 3 0x100092 bpf pflogd 69792 118518 1 0 3 0x80 netio pflogd 63051 54734 99491 73 3 0x100090 kqread syslogd 99491 175659 1 0 3 0x100082 netio syslogd 80476 346588 1 77 3 0x100090 poll dhclient 82033 82114 1 0 3 0x80 poll dhclient 79210 261894 0 0 2 0x14200 zerothread 98751 357313 0 0 3 0x14200 aiodoned aiodoned 87799 462668 0 0 3 0x14200 syncer update 75484 350945 0 0 3 0x14200 cleaner cleaner 11340 140709 0 0 3 0x14200 reaper reaper 33224 424904 0 0 3 0x14200 pgdaemon pagedaemon 39913 490867 0 0 3 0x14200 bored crynlk 2256 456392 0 0 3 0x14200 bored crypto 54252 421605 0 0 3 0x40014200 acpi0 acpi0 4576 114007 0 0 3 0x40014200 idle1 82171 11096 0 0 3 0x14200 bored softnet 90041 12461 0 0 3 0x14200 bored systqmp 55610 214883 0 0 3 0x14200 bored systq 6548 76524 0 0 3 0x40014200 bored softclock 76644 161569 0 0 3 0x40014200 idle0 6489 384211 0 0 3 0x14200 bored smr 1 341222 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 9636 6482K 7254K 78643K 22720 0 0 pcb 13 8K 8K 78643K 355 0 0 rtable 89 4K 5K 78643K 1473 0 0 ifaddr 93 20K 22K 78643K 598 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1713 0 0 iov 0 0K 20K 78643K 548 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1211 76K 77K 78643K 5625 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 70 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 482 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 4897 0 0 sigio 0 0K 0K 78643K 54 0 0 proc 54 51K 83K 78643K 1260 0 0 subproc 32 2K 2K 78643K 191 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 440 0 0 in_multi 22 1K 2K 78643K 293 0 0 ether_multi 1 0K 0K 78643K 22 0 0 mrt 0 0K 0K 78643K 14 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 713 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 114 22K 30K 78643K 17073 0 0 UVM aobj 129 4K 5K 78643K 148 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 258 0 0 NDP 24 0K 1K 78643K 173 0 0 temp 256 2749K 2877K 78643K 19285 0 0 kqueue 0 0K 0K 78643K 37 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 26 0 22 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 212 0 208 1 0 1 1 0 8 0 rtentry 112 149 0 116 2 0 2 2 0 8 0 unpcb 120 1477 0 1465 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 8283 0 8283 2 2 0 2 0 8 0 tcpcb 544 725 0 721 1 0 1 1 0 8 0 inpcb 280 2510 0 2503 3 2 1 2 0 8 0 rttmr 72 3 0 3 2 2 0 1 0 8 0 nd6 48 33 0 30 1 0 1 1 0 8 0 pkpcb 40 33 0 33 10 10 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 97 0 97 16 16 0 1 0 8 0 pffrag 232 2 0 2 2 2 0 1 0 482 0 pffrnode 88 2 0 2 2 2 0 1 0 8 0 pffrent 40 9 0 9 3 3 0 1 0 8 0 pfosfp 40 846 0 846 5 5 0 5 0 8 0 pfosfpen 112 1428 0 1428 21 21 0 21 0 8 0 pfstitem 24 98 0 70 1 0 1 1 0 8 0 pfstkey 112 98 0 70 1 0 1 1 0 8 0 pfstate 328 98 0 69 4 1 3 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 612 0 465 13 0 13 13 0 8 2 art_table 32 613 0 465 2 0 2 2 0 8 0 art_node 16 148 0 118 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 3 2 1 1 1 0 8 0 semapl 112 480 0 470 1 0 1 1 0 8 0 shmpl 112 146 0 19 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9099 0 7685 47 0 47 47 0 8 0 ffsino 272 9099 0 7685 96 0 96 96 0 8 0 nchpl 144 16016 0 14379 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 50932 0 50932 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 9 0 9 6 6 0 1 0 8 0 scxspl 192 48907 0 48907 25 24 1 6 0 8 1 plimitpl 152 479 0 471 1 0 1 1 0 8 0 sigapl 432 5073 0 5057 3 1 2 3 0 8 0 futexpl 56 57961 0 57959 2 1 1 1 0 8 0 knotepl 112 1013 0 994 1 0 1 1 0 8 0 kqueuepl 104 1084 0 1080 1 0 1 1 0 8 0 pipepl 112 2894 0 2875 9 8 1 2 0 8 0 fdescpl 488 5074 0 5057 3 0 3 3 0 8 0 filepl 152 29822 0 29718 14 9 5 7 0 8 0 lockfpl 104 1748 0 1748 3 2 1 1 0 8 1 lockfspl 48 608 0 608 3 2 1 1 0 8 1 sessionpl 112 30 0 19 1 0 1 1 0 8 0 pgrppl 48 62 0 51 1 0 1 1 0 8 0 ucredpl 96 5449 0 5440 1 0 1 1 0 8 0 zombiepl 144 5058 0 5057 5 4 1 1 0 8 0 processpl 896 5090 0 5057 4 0 4 4 0 8 0 procpl 632 15756 0 15711 16 12 4 5 0 8 0 srpgc 64 23 0 23 5 4 1 1 0 8 1 sosppl 128 67 0 67 16 16 0 1 0 8 0 sockpl 384 4278 0 4255 9 6 3 4 0 8 0 mcl64k 65536 511 0 0 64 44 20 64 0 8 1 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 12 0 0 2 0 2 2 0 8 0 mcl4k 4096 13 0 0 2 0 2 2 0 8 0 mcl2k2 2112 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 236 0 0 28 8 20 28 0 8 0 mtagpl 80 48 0 0 1 0 1 1 0 8 0 mbufpl 256 624 0 0 38 1 37 37 0 8 0 bufpl 256 18565 0 11536 440 0 440 440 0 8 0 anonpl 16 460302 0 450705 183 128 55 65 0 125 4 amapchunkpl 152 31095 0 30979 53 47 6 10 0 158 0 amappl16 192 25101 0 24446 145 110 35 45 0 8 1 amappl14 176 134 0 128 1 0 1 1 0 8 0 amappl13 168 189 0 189 3 3 0 1 0 8 0 amappl12 160 19 0 17 1 0 1 1 0 8 0 amappl11 152 1033 0 1014 1 0 1 1 0 8 0 amappl10 144 217 0 214 1 0 1 1 0 8 0 amappl9 136 4213 0 4208 1 0 1 1 0 8 0 amappl8 128 3777 0 3747 2 0 2 2 0 8 0 amappl7 120 191 0 185 1 0 1 1 0 8 0 amappl6 112 996 0 985 1 0 1 1 0 8 0 amappl5 104 241 0 227 1 0 1 1 0 8 0 amappl4 96 5379 0 5346 2 1 1 2 0 8 0 amappl3 88 360 0 349 1 0 1 1 0 8 0 amappl2 80 39167 0 39083 3 1 2 3 0 8 0 amappl1 72 119244 0 118781 26 16 10 20 0 8 0 amappl 80 16168 0 16126 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 147 0 19 3 0 3 3 0 8 0 uaddrrnd 24 5074 0 5057 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5074 0 5057 1 0 1 1 0 8 0 vmmpekpl 168 40394 0 40358 3 0 3 3 0 8 0 vmmpepl 168 621022 0 619105 227 125 102 102 0 357 18 vmsppl 368 5073 0 5057 2 0 2 2 0 8 0 pdppl 4096 10156 0 10114 6 0 6 6 0 8 0 pvpl 32 1260946 0 1248045 345 191 154 162 0 265 28 pmappl 232 5073 0 5057 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 703 0 57 20 0 20 20 0 8 0