panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 294490 75060 0 0x14000 0x200 0 reaper 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(fffffd806e36e338) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8065935e40,ffff800020b28ee8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8065935e40,ffff800020b28ee8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8065935e40,ffff800020b28ee8) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28ee8) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28ee8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28ee8,ffff800021c49a70,ffff800021c49ae0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800021c49b50) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021c49b50) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffecec4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffece90, 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(fffffd806e36e338) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8065935e40,ffff800020b28ee8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8065935e40,ffff800020b28ee8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8065935e40,ffff800020b28ee8) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28ee8) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28ee8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28ee8,ffff800021c49a70,ffff800021c49ae0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800021c49b50) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021c49b50) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffecec4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffece90, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800021c49760 rbx 0xffff800021c49810 rdx 0xffff800020b28ee8 rcx 0 rax 0 r8 0xffffffff81c83d13 kprintf+0x173 r9 0x1 r10 0x25 r11 0xcf4710a0d5247269 r12 0x3000000008 r13 0xffff800021c49770 r14 0x100 r15 0x1 rip 0xffffffff81a69fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021c49750 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=151648 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b298c8,0xffff800020b28028 process=0xffff800020b2b190 user=0xffff800021c44000, vmspace=0xfffffd807f00b8a0 estcpu=36, cpticks=10, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 22340 472196 16566 0 2 0 syz-executor.1 22340 151155 16566 0 3 0x4000080 fsleep syz-executor.1 16566 54025 15022 0 3 0x82 nanosleep syz-executor.1 90029 217536 0 0 3 0x14200 bored sosplice 24997 94269 1 0 3 0x100083 ttyopn getty 91898 486013 15022 0 3 0x82 nanosleep syz-executor.0 15022 508552 15221 0 3 0x82 thrsleep syz-fuzzer 15022 254608 15221 0 3 0x4000082 thrsleep syz-fuzzer 15022 472804 15221 0 3 0x4000082 thrsleep syz-fuzzer 15022 82187 15221 0 3 0x4000082 thrsleep syz-fuzzer 15022 314116 15221 0 3 0x4000082 thrsleep syz-fuzzer 15022 237223 15221 0 3 0x4000082 kqread syz-fuzzer 15022 372973 15221 0 3 0x4000082 thrsleep syz-fuzzer 15022 109601 15221 0 3 0x4000082 thrsleep syz-fuzzer 15022 116692 15221 0 3 0x4000082 thrsleep syz-fuzzer 15022 152683 15221 0 3 0x4000082 thrsleep syz-fuzzer 15221 389746 44211 0 3 0x10008a pause ksh 44211 419421 62337 0 3 0x92 select sshd 62337 341240 1 0 3 0x80 select sshd 69502 108394 76029 74 3 0x100092 bpf pflogd 76029 188909 1 0 3 0x80 netio pflogd 56706 500525 94071 73 3 0x100090 kqread syslogd 94071 290491 1 0 3 0x100082 netio syslogd 6031 374711 1 77 3 0x100090 poll dhclient 50963 397101 1 0 3 0x80 poll dhclient 40979 144683 0 0 2 0x14200 zerothread 96507 85543 0 0 3 0x14200 aiodoned aiodoned 5400 222900 0 0 3 0x14200 syncer update 98174 245599 0 0 3 0x14200 cleaner cleaner 75060 294490 0 0 7 0x14200 reaper 2008 355475 0 0 3 0x14200 pgdaemon pagedaemon 38985 239060 0 0 3 0x14200 bored crynlk 64560 404470 0 0 3 0x14200 bored crypto 59495 224773 0 0 3 0x40014200 acpi0 acpi0 44851 425966 0 0 3 0x40014200 idle1 66570 264868 0 0 3 0x14200 bored softnet 66202 85609 0 0 3 0x14200 bored systqmp 1198 487121 0 0 3 0x14200 bored systq 56617 35512 0 0 3 0x40014200 bored softclock 95541 117280 0 0 3 0x40014200 idle0 21408 453879 0 0 3 0x14200 bored smr 1 435106 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 9570 6445K 7732K 78643K 16627 0 0 pcb 13 8K 8K 78643K 191 0 0 rtable 111 4K 4K 78643K 737 0 0 ifaddr 75 16K 17K 78643K 309 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1607 0 0 iov 0 0K 24K 78643K 245 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 77K 78643K 3346 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 43 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 280 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 2305 0 0 sigio 0 0K 0K 78643K 21 0 0 proc 54 51K 83K 78643K 725 0 0 subproc 32 2K 2K 78643K 68 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 197 0 0 in_multi 33 2K 2K 78643K 97 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 29 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 427 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 31K 78643K 8503 0 0 UVM aobj 110 4K 4K 78643K 131 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 121 0 0 NDP 17 0K 0K 78643K 85 0 0 temp 208 2750K 3388K 78643K 10682 0 0 kqueue 0 0K 0K 78643K 21 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 10 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 94 0 91 1 0 1 1 0 8 0 rtentry 112 79 0 35 2 0 2 2 0 8 0 unpcb 120 774 0 762 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9702 0 9702 3 3 0 2 0 8 0 tcpcb 544 340 0 336 1 0 1 1 0 8 0 inpcb 280 982 0 975 1 0 1 1 0 8 0 rttmr 72 17 0 17 4 4 0 1 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 pkpcb 40 10 0 10 4 3 1 1 0 8 1 ppxss 1128 46 0 46 4 3 1 1 0 8 1 pffrag 232 3 0 3 2 2 0 1 0 482 0 pffrnode 88 3 0 3 2 2 0 1 0 8 0 pffrent 40 8 0 8 2 2 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 47 0 33 1 0 1 1 0 8 0 pfstkey 112 47 0 33 1 0 1 1 0 8 0 pfstate 328 47 0 33 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 283 0 91 12 0 12 12 0 8 0 art_table 32 284 0 91 2 0 2 2 0 8 0 art_node 16 78 0 38 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 13 1 0 1 1 0 8 0 semapl 112 278 0 268 1 0 1 1 0 8 0 shmpl 112 129 0 21 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5155 0 3739 47 0 47 47 0 8 0 ffsino 272 5155 0 3739 96 0 96 96 0 8 0 nchpl 144 8608 0 6968 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 27219 0 27219 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 25052 0 25052 17 16 1 6 0 8 1 plimitpl 152 259 0 251 1 0 1 1 0 8 0 sigapl 432 2500 0 2484 3 1 2 3 0 8 0 futexpl 56 29593 0 29592 1 0 1 1 0 8 0 knotepl 112 504 0 484 1 0 1 1 0 8 0 kqueuepl 104 550 0 547 1 0 1 1 0 8 0 pipepl 112 1550 0 1531 5 3 2 2 0 8 1 fdescpl 488 2501 0 2484 3 0 3 3 0 8 0 filepl 152 15100 0 14997 10 4 6 7 0 8 1 lockfpl 104 805 0 805 2 1 1 1 0 8 1 lockfspl 48 288 0 288 2 1 1 1 0 8 1 sessionpl 112 21 0 10 1 0 1 1 0 8 0 pgrppl 48 52 0 41 1 0 1 1 0 8 0 ucredpl 96 3064 0 3055 1 0 1 1 0 8 0 zombiepl 144 2485 0 2484 2 1 1 1 0 8 0 processpl 896 2517 0 2484 4 0 4 4 0 8 0 procpl 632 7535 0 7491 8 3 5 5 0 8 1 srpgc 64 11 0 11 6 6 0 1 0 8 0 sosppl 128 24 0 24 6 6 0 1 0 8 0 sockpl 384 1882 0 1860 5 2 3 4 0 8 0 mcl64k 65536 511 0 0 64 6 58 64 0 8 1 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 12 0 0 1 0 1 1 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 267 0 0 32 0 32 32 0 8 1 mtagpl 80 34 0 0 1 0 1 1 0 8 0 mbufpl 256 695 0 0 37 0 37 37 0 8 0 bufpl 256 11639 0 4610 440 0 440 440 0 8 0 anonpl 16 243918 0 231917 93 41 52 65 0 125 0 amapchunkpl 152 14702 0 14590 26 21 5 12 0 158 0 amappl16 192 12026 0 11364 96 62 34 46 0 8 0 amappl15 184 1136 0 1133 1 0 1 1 0 8 0 amappl14 176 1197 0 1190 1 0 1 1 0 8 0 amappl13 168 258 0 258 2 2 0 1 0 8 0 amappl12 160 15 0 13 1 0 1 1 0 8 0 amappl11 152 927 0 910 1 0 1 1 0 8 0 amappl10 144 81 0 76 1 0 1 1 0 8 0 amappl9 136 625 0 622 1 0 1 1 0 8 0 amappl8 128 175 0 154 1 0 1 1 0 8 0 amappl7 120 46 0 39 1 0 1 1 0 8 0 amappl6 112 915 0 905 1 0 1 1 0 8 0 amappl5 104 163 0 148 1 0 1 1 0 8 0 amappl4 96 1655 0 1625 2 1 1 2 0 8 0 amappl3 88 2524 0 2510 1 0 1 1 0 8 0 amappl2 80 19062 0 18981 3 1 2 3 0 8 0 amappl1 72 62641 0 62180 27 16 11 20 0 8 0 amappl 80 7849 0 7809 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 130 0 21 2 0 2 2 0 8 0 uaddrrnd 24 2501 0 2484 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2501 0 2484 1 0 1 1 0 8 0 vmmpekpl 168 24034 0 24005 2 0 2 2 0 8 0 vmmpepl 168 307172 0 305265 165 80 85 101 0 357 2 vmsppl 368 2500 0 2484 2 0 2 2 0 8 0 pdppl 4096 5010 0 4968 6 0 6 6 0 8 0 pvpl 32 656692 0 641277 219 88 131 161 0 265 4 pmappl 232 2500 0 2484 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 704 0 10 20 0 20 20 0 8 0