panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 242171 56717 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(fffffd8066f58060) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80673a5020,ffff800020aff640) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80673a5020,ffff800020aff640) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80673a5020,ffff800020aff640) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020aff640) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020aff640,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020aff640,ffff800021c03460,ffff800021c034d0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800021c03540) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021c03540) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffc0284) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc0250, 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(fffffd8066f58060) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80673a5020,ffff800020aff640) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd80673a5020,ffff800020aff640) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80673a5020,ffff800020aff640) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020aff640) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020aff640,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020aff640,ffff800021c03460,ffff800021c034d0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800021c03540) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021c03540) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffc0284) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc0250, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800021c03150 rbx 0xffff800021c03200 rdx 0xffff800020aff640 rcx 0 rax 0 r8 0xffffffff81b74c73 kprintf+0x173 r9 0x1 r10 0x25 r11 0x68166532d6b7537 r12 0x3000000008 r13 0xffff800021c03160 r14 0x100 r15 0x1 rip 0xffffffff819bf398 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021c03140 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=185967 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b51650,0xffff800020b60298 process=0xffff800020b7c380 user=0xffff800021bfe000, vmspace=0xfffffd807f00b170 estcpu=36, cpticks=9, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 95219 406279 91224 0 2 0 syz-executor.1 95219 110580 91224 0 2 0x4000000 syz-executor.1 52147 453257 1 0 3 0x100083 ttyin getty 91224 186202 82010 0 3 0x82 nanosleep syz-executor.1 45000 105938 0 0 3 0x14200 bored sosplice 81344 448981 82010 0 3 0x82 nanosleep syz-executor.0 82010 105974 92157 0 3 0x82 thrsleep syz-fuzzer 82010 107883 92157 0 3 0x4000082 nanosleep syz-fuzzer 82010 111305 92157 0 3 0x4000082 thrsleep syz-fuzzer 82010 19114 92157 0 3 0x4000082 thrsleep syz-fuzzer 82010 387459 92157 0 3 0x4000082 thrsleep syz-fuzzer 82010 299440 92157 0 3 0x4000082 thrsleep syz-fuzzer 82010 439142 92157 0 3 0x4000082 kqread syz-fuzzer 82010 369974 92157 0 3 0x4000082 thrsleep syz-fuzzer 82010 50960 92157 0 3 0x4000082 thrsleep syz-fuzzer 82010 206490 92157 0 3 0x4000082 thrsleep syz-fuzzer 92157 73943 81932 0 3 0x10008a pause ksh 81932 195925 43863 0 3 0x92 select sshd 43863 351589 1 0 3 0x80 select sshd 71817 24752 9497 74 3 0x100092 bpf pflogd 9497 422098 1 0 3 0x80 netio pflogd 34675 10060 61331 73 3 0x100090 kqread syslogd 61331 237156 1 0 3 0x100082 netio syslogd 16886 216835 0 0 2 0x14200 zerothread 36438 142506 0 0 3 0x14200 aiodoned aiodoned 54245 333639 0 0 3 0x14200 syncer update 89830 436544 0 0 3 0x14200 cleaner cleaner 56717 242171 0 0 7 0x14200 reaper 96487 442394 0 0 3 0x14200 pgdaemon pagedaemon 76944 479112 0 0 3 0x14200 bored crynlk 25669 360186 0 0 3 0x14200 bored crypto 56595 191228 0 0 3 0x40014200 acpi0 acpi0 1119 446134 0 0 3 0x40014200 idle1 97818 368149 0 0 3 0x14200 bored softnet 16572 337954 0 0 3 0x14200 bored systqmp 87791 381679 0 0 3 0x14200 bored systq 60000 145844 0 0 3 0x40014200 bored softclock 86712 507663 0 0 3 0x40014200 idle0 48783 203867 0 0 3 0x14200 bored smr 1 428934 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 9553 6448K 7158K 78643K 19273 0 0 pcb 13 8K 8K 78643K 241 0 0 rtable 113 4K 5K 78643K 575 0 0 ifaddr 68 15K 16K 78643K 414 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1623 0 0 iov 0 0K 32K 78643K 401 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 76K 77K 78643K 4292 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 51 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 366 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 3609 0 0 sigio 0 0K 0K 78643K 35 0 0 proc 54 51K 83K 78643K 1067 0 0 subproc 32 2K 2K 78643K 123 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 296 0 0 in_multi 33 2K 2K 78643K 177 0 0 ether_multi 1 0K 0K 78643K 12 0 0 mrt 0 0K 0K 78643K 35 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 612 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 108 21K 30K 78643K 12851 0 0 UVM aobj 130 6K 6K 78643K 145 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 162 0 0 NDP 15 0K 0K 78643K 117 0 0 temp 192 2747K 2818K 78643K 14774 0 0 kqueue 0 0K 0K 78643K 35 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 17 0 10 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 176 0 176 8 7 1 1 0 8 1 rtentry 112 113 0 68 2 0 2 2 0 8 0 unpcb 120 1159 0 1149 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9144 0 9144 3 3 0 2 0 8 0 tcpcb 544 1040 0 1036 1 0 1 1 0 8 0 inpcb 280 2021 0 2016 1 0 1 1 0 8 0 rttmr 72 13 0 13 7 7 0 1 0 8 0 nd6 48 21 0 15 1 0 1 1 0 8 0 pkpcb 40 21 0 21 8 8 0 1 0 8 0 swfcl 56 3 0 0 1 0 1 1 0 8 0 ppxss 1128 75 0 75 13 12 1 1 0 8 1 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 64 0 54 1 0 1 1 0 8 0 pfstkey 112 64 0 54 1 0 1 1 0 8 0 pfstate 328 64 0 54 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 435 0 243 15 3 12 13 0 8 0 art_table 32 436 0 243 2 0 2 2 0 8 0 art_node 16 112 0 71 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 16 3 2 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 364 0 354 1 0 1 1 0 8 0 shmpl 112 143 0 15 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6975 0 5563 47 0 47 47 0 8 0 ffsino 272 6975 0 5563 96 0 96 96 0 8 0 nchpl 144 12199 0 10564 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 38034 0 38034 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 5 0 5 4 4 0 1 0 8 0 scxspl 192 37104 0 37104 19 18 1 6 0 8 1 plimitpl 152 323 0 316 1 0 1 1 0 8 0 sigapl 432 3796 0 3782 3 1 2 3 0 8 0 futexpl 56 41463 0 41463 2 1 1 1 0 8 1 knotepl 112 685 0 666 1 0 1 1 0 8 0 kqueuepl 104 764 0 762 1 0 1 1 0 8 0 pipepl 112 1926 0 1907 6 5 1 2 0 8 0 fdescpl 488 3797 0 3782 3 0 3 3 0 8 0 filepl 152 21996 0 21905 16 11 5 6 0 8 1 lockfpl 104 1069 0 1069 2 1 1 1 0 8 1 lockfspl 48 378 0 378 2 1 1 1 0 8 1 sessionpl 112 25 0 16 1 0 1 1 0 8 0 pgrppl 48 63 0 54 1 0 1 1 0 8 0 ucredpl 96 4190 0 4182 1 0 1 1 0 8 0 zombiepl 144 3783 0 3782 3 2 1 1 0 8 0 processpl 896 3813 0 3782 4 0 4 4 0 8 0 procpl 632 11770 0 11728 14 10 4 5 0 8 0 srpgc 64 21 0 21 9 9 0 1 0 8 0 sosppl 128 44 0 44 11 10 1 1 0 8 1 sockpl 384 3408 0 3394 13 10 3 3 0 8 1 mcl64k 65536 259 0 0 33 27 6 33 0 8 1 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 16 0 0 2 0 2 2 0 8 0 mcl8k 8192 13 0 0 2 0 2 2 0 8 0 mcl4k 4096 19 0 0 3 0 3 3 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 259 0 0 30 5 25 30 0 8 0 mtagpl 80 43 0 0 1 0 1 1 0 8 0 mbufpl 256 424 0 0 20 0 20 20 0 8 0 bufpl 256 14305 0 7276 440 0 440 440 0 8 0 anonpl 16 351887 0 340083 154 97 57 64 0 125 8 amapchunkpl 152 22212 0 22081 27 16 11 11 0 158 4 amappl16 192 19474 0 18842 131 98 33 44 0 8 1 amappl15 184 1798 0 1796 1 0 1 1 0 8 0 amappl14 176 88 0 83 1 0 1 1 0 8 0 amappl13 168 78 0 78 2 2 0 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 835 0 824 1 0 1 1 0 8 0 amappl10 144 842 0 838 1 0 1 1 0 8 0 amappl9 136 807 0 803 1 0 1 1 0 8 0 amappl8 128 369 0 339 2 0 2 2 0 8 0 amappl7 120 830 0 822 1 0 1 1 0 8 0 amappl6 112 818 0 809 1 0 1 1 0 8 0 amappl5 104 198 0 187 1 0 1 1 0 8 0 amappl4 96 4102 0 4071 2 1 1 2 0 8 0 amappl3 88 306 0 296 1 0 1 1 0 8 0 amappl2 80 31190 0 31117 3 1 2 3 0 8 0 amappl1 72 92002 0 91572 27 17 10 20 0 8 0 amappl 80 12114 0 12072 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 144 0 15 3 0 3 3 0 8 0 uaddrrnd 24 3797 0 3782 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3797 0 3782 1 0 1 1 0 8 0 vmmpekpl 168 29629 0 29597 2 0 2 2 0 8 0 vmmpepl 168 470022 0 468208 184 103 81 98 0 357 1 vmsppl 368 3796 0 3782 2 0 2 2 0 8 0 pdppl 4096 7601 0 7564 7 2 5 6 0 8 0 pvpl 32 977118 0 962122 302 153 149 160 0 265 26 pmappl 232 3796 0 3782 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 661 0 42 19 0 19 19 0 8 0