panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 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(fffffd802b14a558) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802fc153c0,ffff8000ffff3b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802fc153c0,ffff8000ffff3b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802fc153c0,ffff8000ffff3b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3b40,ffff800016be45a0,ffff800016be4610) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016be4670) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdce34) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdce00, 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> 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(fffffd802b14a558) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802fc153c0,ffff8000ffff3b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802fc153c0,ffff8000ffff3b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802fc153c0,ffff8000ffff3b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3b40,ffff800016be45a0,ffff800016be4610) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016be4670) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdce34) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdce00, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016be4290 rbx 0xffff800016be4340 rdx 0x2 rcx 0 rax 0 r8 0xffff800016be4250 r9 0x1 r10 0 r11 0x16dc01cd0c97f54c r12 0x3000000008 r13 0xffff800016be42a0 r14 0x100 r15 0x1 rip 0xffffffff81126a98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016be4280 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=32088 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff29f8,0xffffffff82298b28 process=0xffff8000ffff6370 user=0xffff800016bdf000, vmspace=0xfffffd803f014110 estcpu=36, cpticks=9, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 77025 30493 1 0 3 0x100083 ttyin getty 69632 513865 0 0 3 0x14200 bored sosplice 18078 26507 96499 0 2 0x482 syz-executor.0 99758 511583 96499 0 2 0x482 syz-executor.1 96499 279000 33083 0 3 0x82 thrsleep syz-fuzzer 96499 92677 33083 0 3 0x4000082 thrsleep syz-fuzzer 96499 190298 33083 0 3 0x4000082 kqread syz-fuzzer 96499 322479 33083 0 3 0x4000082 thrsleep syz-fuzzer 96499 415040 33083 0 3 0x4000082 thrsleep syz-fuzzer 96499 270573 33083 0 3 0x4000082 thrsleep syz-fuzzer 96499 41422 33083 0 3 0x4000082 thrsleep syz-fuzzer 33083 261362 83101 0 3 0x10008a pause ksh 83101 1399 5925 0 3 0x92 select sshd 5925 369745 1 0 3 0x80 select sshd 59391 363026 40302 73 2 0x100090 syslogd 40302 108605 1 0 3 0x100082 netio syslogd 5452 406686 1 77 3 0x100090 poll dhclient 49603 215156 1 0 3 0x80 poll dhclient 59048 2572 0 0 2 0x14200 zerothread 27022 360813 0 0 3 0x14200 aiodoned aiodoned 18347 93749 0 0 3 0x14200 syncer update 42647 452794 0 0 3 0x14200 cleaner cleaner 68368 515725 0 0 3 0x14200 reaper reaper 43159 520172 0 0 3 0x14200 pgdaemon pagedaemon 91302 92233 0 0 3 0x14200 bored crynlk 80549 78142 0 0 3 0x14200 bored crypto 898 433387 0 0 3 0x40014200 acpi0 acpi0 51020 296920 0 0 3 0x14200 bored softnet 52654 150654 0 0 3 0x14200 bored systqmp 81728 49062 0 0 3 0x14200 bored systq 96235 56078 0 0 3 0x40014200 bored softclock 53447 247730 0 0 3 0x40014200 idle0 99437 270338 0 0 3 0x14200 bored smr 1 390000 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 9601 6510K 14787K 78643K 33928 0 0 pcb 13 8K 8K 78643K 656 0 0 rtable 115 12K 12K 78643K 1442 0 0 ifaddr 85 19K 20K 78643K 713 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 452 0 0 iov 0 0K 32K 78643K 1170 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 77K 78643K 9123 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 122 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 894 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 8643 0 0 sigio 1 0K 0K 78643K 120 0 0 proc 42 30K 54K 78643K 1188 0 0 subproc 32 2K 2K 78643K 40 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 923 0 0 in_multi 33 2K 2K 78643K 349 0 0 ether_multi 1 0K 0K 78643K 50 0 0 mrt 0 0K 0K 78643K 26 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 988 0 0 pfkey data 0 0K 0K 78643K 4 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 86 20K 37K 78643K 21240 0 0 UVM aobj 130 4K 4K 78643K 144 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 466 0 0 NDP 21 0K 0K 78643K 192 0 0 temp 234 2729K 2856K 78643K 29573 0 0 kqueue 0 0K 0K 78643K 66 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 1 1 0 1 1 0 8 0 rtpcb 80 351 0 349 1 0 1 1 0 8 0 rtentry 112 50 0 6 2 0 2 2 0 8 0 unpcb 120 2999 0 2989 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 878 0 878 1 1 0 1 0 8 0 tcpcb 544 1327 0 1323 1 0 1 1 0 8 0 inpcb 280 3752 0 3742 11 9 2 2 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 32 0 32 12 11 1 1 0 8 1 swfcl 56 5 0 0 1 0 1 1 0 8 0 ppxss 1128 141 0 141 36 35 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 45 0 5 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 20 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 892 0 882 1 0 1 1 0 8 0 shmpl 112 142 0 14 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 15317 0 13913 46 0 46 46 0 8 0 ffsino 240 15317 0 13913 84 0 84 84 0 8 0 nchpl 144 27654 0 26022 61 0 61 61 0 8 0 uvmvnodes 72 7767 0 0 142 0 142 142 0 8 0 vnodes 200 7767 0 0 409 0 409 409 0 8 0 namei 1024 88938 0 88938 3 2 1 1 0 8 1 scsiplug 64 16 0 16 10 10 0 1 0 8 0 scxspl 192 87701 0 87701 52 49 3 6 0 8 3 plimitpl 152 794 0 787 1 0 1 1 0 8 0 sigapl 432 8819 0 8806 2 0 2 2 0 8 0 futexpl 56 145177 0 145177 3 2 1 1 0 8 1 knotepl 112 1615 0 1596 2 1 1 2 0 8 0 kqueuepl 104 2087 0 2085 1 0 1 1 0 8 0 pipepl 112 4940 0 4921 12 11 1 2 0 8 0 fdescpl 424 8820 0 8806 2 0 2 2 0 8 0 filepl 120 53283 0 53188 8 4 4 5 0 8 0 lockfpl 104 3023 0 3023 7 6 1 1 0 8 1 lockfspl 48 1032 0 1032 7 6 1 1 0 8 1 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 120 0 110 1 0 1 1 0 8 0 ucredpl 96 11142 0 11135 1 0 1 1 0 8 0 zombiepl 144 8807 0 8805 3 2 1 1 0 8 0 processpl 864 8835 0 8805 4 0 4 4 0 8 0 procpl 632 20129 0 20093 4 0 4 4 0 8 0 sosppl 128 107 0 107 24 24 0 1 0 8 0 sockpl 384 7221 0 7202 9 6 3 4 0 8 1 mcl64k 65536 4093 0 4093 393 378 15 65 0 8 15 mcl16k 16384 27 0 27 21 21 0 1 0 8 0 mcl12k 12288 161 0 161 25 24 1 1 0 8 1 mcl9k 9216 121 0 121 31 30 1 1 0 8 1 mcl8k 8192 116 0 116 29 28 1 1 0 8 1 mcl4k 4096 470 0 468 7 6 1 1 0 8 0 mcl2k2 2112 47 0 47 23 23 0 1 0 8 0 mcl2k 2048 67315 0 67268 15 8 7 12 0 8 0 mtagpl 80 269 0 88 5 1 4 4 0 8 0 mbufpl 256 151592 0 151122 249 218 31 60 0 8 0 bufpl 256 32830 0 25064 486 0 486 486 0 8 0 anonpl 16 814981 0 803158 274 221 53 67 0 62 0 amapchunkpl 152 40440 0 40337 131 125 6 20 0 158 0 amappl16 192 44231 0 43579 306 271 35 46 0 8 1 amappl15 184 4308 0 4306 1 0 1 1 0 8 0 amappl14 176 4359 0 4351 1 0 1 1 0 8 0 amappl13 168 9 0 9 4 4 0 1 0 8 0 amappl12 160 4314 0 4312 1 0 1 1 0 8 0 amappl11 152 56 0 45 1 0 1 1 0 8 0 amappl10 144 65 0 65 7 7 0 1 0 8 0 amappl9 136 563 0 559 1 0 1 1 0 8 0 amappl8 128 135 0 118 1 0 1 1 0 8 0 amappl7 120 30 0 27 1 0 1 1 0 8 0 amappl6 112 60 0 53 1 0 1 1 0 8 0 amappl5 104 4505 0 4492 1 0 1 1 0 8 0 amappl4 96 536 0 511 1 0 1 1 0 8 0 amappl3 88 13400 0 13386 1 0 1 1 0 8 0 amappl2 80 70596 0 70530 4 2 2 3 0 8 0 amappl1 72 161489 0 161074 26 17 9 19 0 8 0 amappl 80 20476 0 20441 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 143 0 14 3 0 3 3 0 8 0 uaddrrnd 24 8820 0 8806 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 8820 0 8806 1 0 1 1 0 8 0 vmmpekpl 168 48799 0 48776 2 0 2 2 0 8 0 vmmpepl 168 1014292 0 1012599 278 197 81 90 0 357 2 vmsppl 272 8819 0 8806 2 1 1 2 0 8 0 pdppl 4096 17646 0 17612 6 1 5 6 0 8 0 pvpl 32 2391284 0 2376426 706 536 170 257 0 265 48 pmappl 200 8819 0 8806 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1314 0 665 22 1 21 21 0 8 1