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(fffffd802b54f038) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803a9a4bd0,ffff8000159f29f8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803a9a4bd0,ffff8000159f29f8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803a9a4bd0,ffff8000159f29f8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000159f29f8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000159f29f8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000159f29f8,ffff800014fc0cd0,ffff800014fc0d40) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800014fc0da0) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffdf0e4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdf0b0, 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(fffffd802b54f038) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803a9a4bd0,ffff8000159f29f8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803a9a4bd0,ffff8000159f29f8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803a9a4bd0,ffff8000159f29f8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000159f29f8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000159f29f8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000159f29f8,ffff800014fc0cd0,ffff800014fc0d40) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800014fc0da0) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffdf0e4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdf0b0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014fc09c0 rbx 0xffff800014fc0a70 rdx 0x2 rcx 0 rax 0 r8 0xffff800014fc0980 r9 0x1 r10 0 r11 0x108d4dd8d609f4bf r12 0x3000000008 r13 0xffff800014fc09d0 r14 0x100 r15 0x1 rip 0xffffffff81972198 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014fc09b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=380923 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000159f2c70,0xffffffff82296468 process=0xffff8000ffff6370 user=0xffff800014fbb000, vmspace=0xfffffd803f014dd0 estcpu=36, cpticks=7, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 89957 168909 1 0 3 0x100083 ttyin getty 21212 445618 24751 0 2 0x482 syz-executor.1 19384 75156 0 0 3 0x14200 bored sosplice 93323 466884 24751 0 2 0x2 syz-executor.0 24751 137721 1149 0 3 0x82 thrsleep syz-fuzzer 24751 81573 1149 0 2 0x4000482 syz-fuzzer 24751 128604 1149 0 3 0x4000082 kqread syz-fuzzer 24751 100963 1149 0 3 0x4000082 thrsleep syz-fuzzer 24751 283595 1149 0 3 0x4000082 thrsleep syz-fuzzer 24751 7599 1149 0 3 0x4000082 thrsleep syz-fuzzer 24751 41993 1149 0 3 0x4000082 thrsleep syz-fuzzer 1149 37969 84120 0 3 0x10008a pause ksh 84120 29139 90177 0 3 0x92 select sshd 90177 368299 1 0 3 0x80 select sshd 97997 454365 62699 73 2 0x100090 syslogd 62699 497484 1 0 3 0x100082 netio syslogd 29469 12190 1 77 3 0x100090 poll dhclient 51056 457913 1 0 3 0x80 poll dhclient 77651 293999 0 0 2 0x14200 zerothread 99355 296138 0 0 3 0x14200 aiodoned aiodoned 75869 48693 0 0 3 0x14200 syncer update 83232 108250 0 0 3 0x14200 cleaner cleaner 88529 436128 0 0 3 0x14200 reaper reaper 89261 493596 0 0 3 0x14200 pgdaemon pagedaemon 57001 452912 0 0 3 0x14200 bored crynlk 37652 448856 0 0 3 0x14200 bored crypto 27289 207413 0 0 3 0x40014200 acpi0 acpi0 10561 408148 0 0 3 0x14200 bored softnet 87926 463276 0 0 3 0x14200 bored systqmp 2599 462986 0 0 3 0x14200 bored systq 88483 357221 0 0 3 0x40014200 bored softclock 54074 118540 0 0 3 0x40014200 idle0 12013 417273 0 0 3 0x14200 bored smr 1 462814 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 9528 6359K 7089K 78643K 18367 0 0 pcb 13 8K 8K 78643K 217 0 0 rtable 113 4K 4K 78643K 768 0 0 ifaddr 65 15K 16K 78643K 331 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 182 0 0 iov 0 0K 20K 78643K 387 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 77K 78643K 3991 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 32 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 301 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 2895 0 0 sigio 0 0K 0K 78643K 52 0 0 proc 43 30K 54K 78643K 698 0 0 subproc 32 2K 2K 78643K 53 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 287 0 0 in_multi 33 2K 2K 78643K 123 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 13 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 488 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 88 20K 36K 78643K 7635 0 0 UVM aobj 106 4K 4K 78643K 115 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 14 0K 0K 78643K 88 0 0 temp 185 2727K 3367K 78643K 12151 0 0 kqueue 0 0K 0K 78643K 31 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 11 0 5 1 0 1 1 0 8 0 rtpcb 80 154 0 152 1 0 1 1 0 8 0 rtentry 112 61 0 17 2 0 2 2 0 8 0 unpcb 120 905 0 895 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1535 0 1535 1 1 0 1 0 8 0 tcpcb 544 460 0 456 1 0 1 1 0 8 0 inpcb 280 1230 0 1223 3 1 2 2 0 8 1 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 20 0 20 8 8 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 64 0 64 10 10 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 238 0 46 14 1 13 13 0 8 0 art_table 32 239 0 46 2 0 2 2 0 8 0 art_node 16 58 0 18 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 14 1 0 1 1 0 8 0 semapl 112 299 0 289 1 0 1 1 0 8 0 shmpl 112 113 0 9 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6075 0 4669 46 0 46 46 0 8 0 ffsino 240 6075 0 4669 84 0 84 84 0 8 0 nchpl 144 10263 0 8637 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 32042 0 32042 3 2 1 1 0 8 1 scsiplug 64 6 0 6 5 5 0 1 0 8 0 scxspl 192 31551 0 31551 29 26 3 6 0 8 3 plimitpl 152 210 0 203 1 0 1 1 0 8 0 sigapl 432 3065 0 3052 2 0 2 2 0 8 0 futexpl 56 47895 0 47895 2 1 1 1 0 8 1 knotepl 112 579 0 560 1 0 1 1 0 8 0 kqueuepl 104 700 0 698 1 0 1 1 0 8 0 pipepl 112 1680 0 1661 5 4 1 2 0 8 0 fdescpl 424 3066 0 3052 2 0 2 2 0 8 0 filepl 120 18373 0 18275 4 0 4 4 0 8 0 lockfpl 104 1031 0 1031 4 3 1 1 0 8 1 lockfspl 48 355 0 355 4 3 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 58 0 48 1 0 1 1 0 8 0 ucredpl 96 4011 0 4004 1 0 1 1 0 8 0 zombiepl 144 3053 0 3052 3 2 1 1 0 8 0 processpl 864 3081 0 3052 4 0 4 4 0 8 0 procpl 632 6812 0 6777 4 0 4 4 0 8 0 sosppl 128 23 0 23 6 6 0 1 0 8 0 sockpl 384 2335 0 2316 4 1 3 3 0 8 1 mcl64k 65536 885 0 885 102 101 1 33 0 8 1 mcl16k 16384 10 0 10 6 6 0 1 0 8 0 mcl12k 12288 47 0 47 10 9 1 1 0 8 1 mcl9k 9216 42 0 42 9 9 0 1 0 8 0 mcl8k 8192 47 0 47 10 9 1 1 0 8 1 mcl4k 4096 172 0 172 6 5 1 1 0 8 1 mcl2k2 2112 19 0 19 11 11 0 1 0 8 0 mcl2k 2048 58314 0 58269 14 7 7 11 0 8 1 mtagpl 80 84 0 39 2 1 1 1 0 8 0 mbufpl 256 107593 0 107422 65 53 12 27 0 8 0 bufpl 256 12430 0 7859 286 0 286 286 0 8 0 anonpl 16 275206 0 263129 141 91 50 66 0 62 1 amapchunkpl 152 12949 0 12846 48 43 5 18 0 158 0 amappl16 192 14997 0 14328 140 105 35 45 0 8 1 amappl15 184 1429 0 1428 1 0 1 1 0 8 0 amappl14 176 1486 0 1479 1 0 1 1 0 8 0 amappl13 168 15 0 15 2 2 0 1 0 8 0 amappl12 160 4 0 3 1 0 1 1 0 8 0 amappl11 152 1031 0 1018 1 0 1 1 0 8 0 amappl10 144 65 0 63 2 1 1 1 0 8 0 amappl9 136 1010 0 1007 1 0 1 1 0 8 0 amappl8 128 577 0 561 1 0 1 1 0 8 0 amappl7 120 36 0 32 1 0 1 1 0 8 0 amappl6 112 1028 0 1021 1 0 1 1 0 8 0 amappl5 104 172 0 162 1 0 1 1 0 8 0 amappl4 96 1885 0 1859 1 0 1 1 0 8 0 amappl3 88 3116 0 3103 1 0 1 1 0 8 0 amappl2 80 23692 0 23625 4 2 2 3 0 8 0 amappl1 72 61375 0 60961 26 17 9 19 0 8 0 amappl 80 7069 0 7034 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 114 0 9 2 0 2 2 0 8 0 uaddrrnd 24 3066 0 3052 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3066 0 3052 1 0 1 1 0 8 0 vmmpekpl 168 20415 0 20391 2 0 2 2 0 8 0 vmmpepl 168 357248 0 355540 175 95 80 95 0 357 4 vmsppl 272 3065 0 3052 2 1 1 2 0 8 0 pdppl 4096 6138 0 6104 6 1 5 6 0 8 0 pvpl 32 733973 0 718874 262 119 143 166 0 265 21 pmappl 200 3065 0 3052 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 605 0 188 14 0 14 14 0 8 0