panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 514179 94836 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(fffffd80671ace20) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8067ed23a8,ffff800020b29650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8067ed23a8,ffff800020b29650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8067ed23a8,ffff800020b29650) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b29650) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b29650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b29650,ffff800020bd9640,ffff800020bd96b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020bd9720) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020bd9720) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe5be4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe5bb0, 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(fffffd80671ace20) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8067ed23a8,ffff800020b29650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd8067ed23a8,ffff800020b29650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8067ed23a8,ffff800020b29650) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b29650) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b29650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b29650,ffff800020bd9640,ffff800020bd96b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020bd9720) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020bd9720) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe5be4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe5bb0, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020bd9330 rbx 0xffff800020bd93e0 rdx 0xffff800020b29650 rcx 0 rax 0 r8 0xffffffff81b74c73 kprintf+0x173 r9 0x1 r10 0x25 r11 0x4094a6b04cd6fd31 r12 0x3000000008 r13 0xffff800020bd9340 r14 0x100 r15 0x1 rip 0xffffffff819bf398 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bd9320 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=476916 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28c70,0xffffffff8239ad38 process=0xffff800020b7c000 user=0xffff800020bd4000, vmspace=0xfffffd807f00b000 estcpu=36, cpticks=9, pctcpu=0.0 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69903 141760 1 0 3 0x100083 ttyin getty 39157 495754 67309 0 3 0x82 nanosleep syz-executor.0 12272 265101 0 0 3 0x14200 bored sosplice 55651 455962 67309 0 3 0x82 nanosleep syz-executor.1 67309 61079 53978 0 3 0x82 thrsleep syz-fuzzer 67309 58438 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 310069 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 302698 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 490066 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 387991 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 58529 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 357956 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 242584 53978 0 3 0x4000082 thrsleep syz-fuzzer 67309 255391 53978 0 3 0x4000082 kqread syz-fuzzer 53978 237034 95415 0 3 0x10008a pause ksh 95415 470678 8119 0 3 0x92 select sshd 8119 274737 1 0 3 0x80 select sshd 87126 366016 10507 74 3 0x100092 bpf pflogd 10507 37378 1 0 3 0x80 netio pflogd 53363 16100 5547 73 3 0x100090 kqread syslogd 5547 106509 1 0 3 0x100082 netio syslogd 32570 458055 0 0 3 0x14200 pgzero zerothread 34806 195683 0 0 3 0x14200 aiodoned aiodoned 57870 66558 0 0 3 0x14200 syncer update 26092 287094 0 0 3 0x14200 cleaner cleaner 94836 514179 0 0 7 0x14200 reaper 54545 29914 0 0 3 0x14200 pgdaemon pagedaemon 68684 50718 0 0 3 0x14200 bored crynlk 89909 419725 0 0 3 0x14200 bored crypto 41153 95122 0 0 3 0x40014200 acpi0 acpi0 20189 466635 0 0 3 0x40014200 idle1 82227 290612 0 0 3 0x14200 bored softnet 19104 479011 0 0 3 0x14200 bored systqmp 93769 338006 0 0 3 0x14200 bored systq 4395 272027 0 0 3 0x40014200 bored softclock 70684 388722 0 0 3 0x40014200 idle0 67262 292588 0 0 3 0x14200 bored smr 1 402849 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 9614 6787K 14710K 78643K 28314 0 0 pcb 13 8K 8K 78643K 509 0 0 rtable 113 4K 5K 78643K 435 0 0 ifaddr 84 19K 21K 78643K 727 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1779 0 0 iov 0 0K 24K 78643K 774 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 77K 78643K 7159 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 113 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 789 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 6974 0 0 sigio 1 0K 0K 78643K 109 0 0 proc 54 51K 83K 78643K 1179 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 645 0 0 in_multi 33 2K 2K 78643K 264 0 0 ether_multi 1 0K 0K 78643K 33 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 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 771 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 106 21K 31K 78643K 23982 0 0 UVM aobj 130 6K 6K 78643K 147 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 368 0 0 NDP 20 0K 0K 78643K 197 0 0 temp 228 2749K 3388K 78643K 24936 0 0 kqueue 0 0K 0K 78643K 67 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 264 0 264 16 15 1 1 0 8 1 rtentry 112 65 0 20 2 0 2 2 0 8 0 unpcb 120 2255 0 2245 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 8168 0 8168 3 3 0 2 0 8 0 tcpcb 544 1046 0 1042 1 0 1 1 0 8 0 inpcb 280 3027 0 3020 1 0 1 1 0 8 0 rttmr 72 4 0 4 4 4 0 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 40 0 40 12 12 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 140 0 140 15 14 1 1 0 8 1 pffrag 232 4 0 4 3 3 0 1 0 482 0 pffrnode 88 4 0 4 3 3 0 1 0 8 0 pffrent 40 13 0 13 4 4 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 106 0 93 1 0 1 1 0 8 0 pfstkey 112 106 0 93 1 0 1 1 0 8 0 pfstate 328 106 0 93 3 0 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 236 0 44 14 2 12 12 0 8 0 art_table 32 237 0 44 2 0 2 2 0 8 0 art_node 16 60 0 19 1 0 1 1 0 8 0 sysvmsgpl 40 24 0 19 1 0 1 1 0 8 0 semapl 112 787 0 777 1 0 1 1 0 8 0 shmpl 112 145 0 17 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 12363 0 10939 47 0 47 47 0 8 0 ffsino 272 12363 0 10939 96 0 96 96 0 8 0 nchpl 144 22352 0 20720 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 74149 0 74149 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 10 0 10 9 9 0 1 0 8 0 scxspl 192 68633 0 68633 39 38 1 6 0 8 1 plimitpl 152 586 0 578 1 0 1 1 0 8 0 sigapl 432 7173 0 7160 3 1 2 3 0 8 0 futexpl 56 85090 0 85090 1 0 1 1 0 8 1 knotepl 112 1307 0 1288 2 1 1 2 0 8 0 kqueuepl 104 1604 0 1602 1 0 1 1 0 8 0 pipepl 112 4370 0 4351 15 13 2 2 0 8 1 fdescpl 488 7174 0 7160 3 0 3 3 0 8 0 filepl 152 44352 0 44262 13 8 5 7 0 8 0 lockfpl 104 2325 0 2325 3 2 1 1 0 8 1 lockfspl 48 792 0 792 3 2 1 1 0 8 1 sessionpl 112 21 0 12 1 0 1 1 0 8 0 pgrppl 48 104 0 95 1 0 1 1 0 8 0 ucredpl 96 10505 0 10497 1 0 1 1 0 8 0 zombiepl 144 7161 0 7159 3 2 1 1 0 8 0 processpl 896 7190 0 7159 4 0 4 4 0 8 0 procpl 632 22908 0 22866 16 11 5 5 0 8 1 srpgc 64 6 0 6 5 5 0 1 0 8 0 sosppl 128 80 0 80 21 21 0 1 0 8 0 sockpl 384 5664 0 5650 18 15 3 3 0 8 1 mcl64k 65536 33 0 0 4 1 3 3 0 8 0 mcl16k 16384 12 0 0 2 0 2 2 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 11 0 0 2 0 2 2 0 8 0 mcl4k 4096 19 0 0 3 1 2 3 0 8 0 mcl2k2 2112 9 0 0 1 0 1 1 0 8 0 mcl2k 2048 208 0 0 23 2 21 23 0 8 0 mtagpl 80 79 0 0 2 0 2 2 0 8 0 mbufpl 256 428 0 0 17 0 17 17 0 8 0 bufpl 256 24352 0 17323 440 0 440 440 0 8 0 anonpl 16 623935 0 611947 203 140 63 65 0 125 11 amapchunkpl 152 42768 0 42652 59 53 6 12 0 158 0 amappl16 192 35446 0 34784 192 152 40 46 0 8 6 amappl15 184 532 0 532 1 1 0 1 0 8 0 amappl14 176 597 0 591 1 0 1 1 0 8 0 amappl13 168 15 0 14 2 1 1 1 0 8 0 amappl12 160 7 0 7 2 2 0 1 0 8 0 amappl11 152 61 0 53 1 0 1 1 0 8 0 amappl10 144 77 0 72 1 0 1 1 0 8 0 amappl9 136 7010 0 7003 1 0 1 1 0 8 0 amappl8 128 6574 0 6544 2 0 2 2 0 8 1 amappl7 120 39 0 34 1 0 1 1 0 8 0 amappl6 112 60 0 53 1 0 1 1 0 8 0 amappl5 104 191 0 180 1 0 1 1 0 8 0 amappl4 96 6966 0 6937 2 0 2 2 0 8 0 amappl3 88 1505 0 1494 1 0 1 1 0 8 0 amappl2 80 57349 0 57284 4 2 2 3 0 8 0 amappl1 72 161758 0 161343 26 16 10 20 0 8 0 amappl 80 23238 0 23201 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 146 0 17 3 0 3 3 0 8 0 uaddrrnd 24 7174 0 7160 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 7174 0 7160 1 0 1 1 0 8 0 vmmpekpl 168 61230 0 61196 2 0 2 2 0 8 0 vmmpepl 168 872408 0 870678 254 168 86 98 0 357 5 vmsppl 368 7173 0 7160 2 0 2 2 0 8 0 pdppl 4096 14355 0 14320 7 1 6 6 0 8 0 pvpl 32 1675612 0 1660515 409 251 158 162 0 265 33 pmappl 232 7173 0 7160 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