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(fffffd802fbdb208) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f7b7630,ffff8000ffff3650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f7b7630,ffff8000ffff3650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f7b7630,ffff8000ffff3650) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3650) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3650,ffff8000159e9fe0,ffff8000159ea050) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159ea0b0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbf9b4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbf980, 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(fffffd802fbdb208) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f7b7630,ffff8000ffff3650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f7b7630,ffff8000ffff3650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f7b7630,ffff8000ffff3650) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3650) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3650,ffff8000159e9fe0,ffff8000159ea050) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159ea0b0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbf9b4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbf980, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159e9cd0 rbx 0xffff8000159e9d80 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159e9c90 r9 0x1 r10 0 r11 0xd2b793b54fb3c847 r12 0x3000000008 r13 0xffff8000159e9ce0 r14 0x100 r15 0x1 rip 0xffffffff81ba4ad8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159e9cc0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=193660 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2290,0xffffffff822962e8 process=0xffff8000ffff70f0 user=0xffff8000159e5000, vmspace=0xfffffd803f014990 estcpu=36, cpticks=16, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 41854 284417 27380 0 2 0x480 syz-executor.0 41854 196317 27380 0 3 0x4000080 kqread syz-executor.0 41854 332889 27380 0 3 0x4000080 kqread syz-executor.0 41854 230515 27380 0 3 0x4000080 fsleep syz-executor.0 83258 79804 0 0 3 0x14200 bored sosplice 27380 390597 16390 0 2 0x482 syz-executor.0 52162 114135 16390 0 2 0x482 syz-executor.1 16390 481600 92236 0 3 0x82 thrsleep syz-fuzzer 16390 287906 92236 0 3 0x4000082 thrsleep syz-fuzzer 16390 124869 92236 0 3 0x4000082 kqread syz-fuzzer 16390 495215 92236 0 3 0x4000082 thrsleep syz-fuzzer 16390 199858 92236 0 3 0x4000082 thrsleep syz-fuzzer 16390 454464 92236 0 2 0x4000482 syz-fuzzer 16390 378818 92236 0 3 0x4000082 thrsleep syz-fuzzer 92236 361447 87459 0 3 0x10008a pause ksh 87459 440205 46208 0 3 0x92 select sshd 93807 489256 1 0 3 0x100083 ttyin getty 46208 105715 1 0 3 0x80 select sshd 6764 347238 24346 73 2 0x100090 syslogd 24346 154030 1 0 3 0x100082 netio syslogd 85950 377106 1 77 3 0x100090 poll dhclient 2354 298407 1 0 3 0x80 poll dhclient 70841 409959 0 0 2 0x14200 zerothread 91106 295044 0 0 3 0x14200 aiodoned aiodoned 47370 257448 0 0 3 0x14200 syncer update 27695 3094 0 0 3 0x14200 cleaner cleaner 60624 471564 0 0 3 0x14200 reaper reaper 34530 522906 0 0 3 0x14200 pgdaemon pagedaemon 15070 173980 0 0 3 0x14200 bored crynlk 44555 478585 0 0 3 0x14200 bored crypto 61416 185067 0 0 3 0x40014200 acpi0 acpi0 80418 475660 0 0 3 0x14200 bored softnet 84046 51241 0 0 3 0x14200 bored systqmp 75955 99942 0 0 3 0x14200 bored systq 78621 175616 0 0 3 0x40014200 bored softclock 63826 84126 0 0 3 0x40014200 idle0 85761 110280 0 0 3 0x14200 bored smr 1 395020 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 9455 6387K 6838K 78643K 10799 0 0 pcb 13 8K 8K 78643K 27 0 0 rtable 108 3K 4K 78643K 202 0 0 ifaddr 39 10K 10K 78643K 43 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 17 0 0 iov 0 0K 4K 78643K 6 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1218 76K 77K 78643K 1292 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 5 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 16 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 118 0 0 proc 41 30K 54K 78643K 350 0 0 subproc 32 2K 2K 78643K 34 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 16 0 0 in_multi 33 2K 2K 78643K 35 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 190 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 84 20K 20K 78643K 1085 0 0 UVM aobj 10 2K 3K 78643K 14 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 4 0 0 NDP 6 0K 0K 78643K 11 0 0 temp 94 2720K 2784K 78643K 3306 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 6 0 0 1 0 1 1 0 8 0 rtpcb 80 21 0 19 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 85 0 75 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 800 0 800 1 1 0 1 0 8 0 tcpcb 544 26 0 22 1 0 1 1 0 8 0 inpcb 280 74 0 67 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 0 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 44 0 4 1 0 1 1 0 8 0 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 12 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1558 0 137 46 0 46 46 0 8 0 ffsino 240 1558 0 137 84 0 84 84 0 8 0 nchpl 144 1927 0 286 61 0 61 61 0 8 0 uvmvnodes 72 1662 0 0 31 0 31 31 0 8 0 vnodes 200 1662 0 0 88 0 88 88 0 8 0 namei 1024 4884 0 4884 1 0 1 1 0 8 1 scxspl 192 4698 0 4698 7 1 6 6 0 8 6 plimitpl 152 28 0 21 1 0 1 1 0 8 0 sigapl 432 289 0 275 2 0 2 2 0 8 0 futexpl 56 1504 0 1503 1 0 1 1 0 8 0 knotepl 112 58 0 37 1 0 1 1 0 8 0 kqueuepl 104 11 0 8 1 0 1 1 0 8 0 pipepl 112 198 0 179 1 0 1 1 0 8 0 fdescpl 424 290 0 275 2 0 2 2 0 8 0 filepl 120 1494 0 1397 4 0 4 4 0 8 0 lockfpl 104 36 0 36 2 1 1 1 0 8 1 lockfspl 48 14 0 14 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 142 0 135 1 0 1 1 0 8 0 zombiepl 144 276 0 275 1 0 1 1 0 8 0 processpl 864 305 0 275 4 0 4 4 0 8 0 procpl 632 424 0 385 4 0 4 4 0 8 0 sosppl 128 2 0 2 1 0 1 1 0 8 1 sockpl 384 180 0 161 4 1 3 4 0 8 1 mcl64k 65536 2 0 2 1 0 1 1 0 8 1 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 11 0 11 2 1 1 1 0 8 1 mcl2k 2048 53704 0 53668 13 7 6 12 0 8 1 mtagpl 80 4 0 2 2 1 1 1 0 8 0 mbufpl 256 85256 0 85191 9 0 9 9 0 8 4 bufpl 256 5711 0 1270 278 0 278 278 0 8 0 anonpl 16 36247 0 25344 46 2 44 45 0 62 0 amapchunkpl 152 1163 0 1051 7 2 5 6 0 158 0 amappl16 192 1045 0 448 30 0 30 30 0 8 0 amappl15 184 3 0 2 1 0 1 1 0 8 0 amappl14 176 60 0 54 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 48 0 43 1 0 1 1 0 8 0 amappl11 152 50 0 39 1 0 1 1 0 8 0 amappl10 144 67 0 66 1 0 1 1 0 8 0 amappl9 136 596 0 591 1 0 1 1 0 8 0 amappl8 128 168 0 153 1 0 1 1 0 8 0 amappl7 120 30 0 27 1 0 1 1 0 8 0 amappl6 112 50 0 44 1 0 1 1 0 8 0 amappl5 104 185 0 175 1 0 1 1 0 8 0 amappl4 96 507 0 479 1 0 1 1 0 8 0 amappl3 88 164 0 154 1 0 1 1 0 8 0 amappl2 80 1529 0 1452 3 1 2 3 0 8 0 amappl1 72 14730 0 14281 25 16 9 19 0 8 0 amappl 80 645 0 605 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 13 0 4 1 0 1 1 0 8 0 uaddrrnd 24 290 0 275 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 290 0 275 1 0 1 1 0 8 0 vmmpekpl 168 6195 0 6174 2 0 2 2 0 8 0 vmmpepl 168 40969 0 39196 97 11 86 89 0 357 8 vmsppl 272 289 0 275 2 1 1 2 0 8 0 pdppl 4096 586 0 550 6 1 5 6 0 8 0 pvpl 32 129372 0 115435 117 0 117 117 0 265 4 pmappl 200 289 0 275 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 417 0 13 12 0 12 12 0 8 0