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(fffffd803c766118) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803bbbbf18,ffff800014941b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803bbbbf18,ffff800014941b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803bbbbf18,ffff800014941b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941b40,ffff8000149200d0,ffff800014920140) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149201a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdeba4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdeb70, 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(fffffd803c766118) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803bbbbf18,ffff800014941b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803bbbbf18,ffff800014941b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803bbbbf18,ffff800014941b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941b40,ffff8000149200d0,ffff800014920140) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149201a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffdeba4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdeb70, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001491fdc0 rbx 0xffff80001491fe70 rdx 0x2 rcx 0 rax 0 r8 0xffff80001491fd80 r9 0x1 r10 0 r11 0xc7bca16c3fd4e3d0 r12 0x3000000008 r13 0xffff80001491fdd0 r14 0x100 r15 0x1 rip 0xffffffff818b9068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001491fdb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=32446 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff800014940018,0xffff800014940ef8 process=0xffff8000ffff6370 user=0xffff80001491b000, vmspace=0xfffffd803f00ccc0 estcpu=33, cpticks=11, pctcpu=0.4 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 9344 442997 44161 0 2 0 syz-executor.0 9344 419114 44161 0 2 0x4000000 syz-executor.0 18072 150059 1 0 3 0x100083 ttyin getty 591 56763 0 0 3 0x14200 bored sosplice 44161 463818 9593 0 2 0x482 syz-executor.0 8938 405536 9593 0 2 0x482 syz-executor.1 9593 206047 64637 0 3 0x82 thrsleep syz-fuzzer 9593 22317 64637 0 3 0x4000082 thrsleep syz-fuzzer 9593 307284 64637 0 3 0x4000082 thrsleep syz-fuzzer 9593 148305 64637 0 3 0x4000082 thrsleep syz-fuzzer 9593 408685 64637 0 3 0x4000082 thrsleep syz-fuzzer 9593 462042 64637 0 3 0x4000082 kqread syz-fuzzer 9593 309780 64637 0 3 0x4000082 thrsleep syz-fuzzer 64637 520834 77164 0 3 0x10008a pause ksh 77164 480657 70902 0 3 0x92 select sshd 70902 120087 1 0 3 0x80 select sshd 79395 339037 59794 73 2 0x100090 syslogd 59794 228327 1 0 3 0x100082 netio syslogd 53342 400253 0 0 2 0x14200 zerothread 1806 511995 0 0 3 0x14200 aiodoned aiodoned 12863 248553 0 0 3 0x14200 syncer update 61472 183372 0 0 3 0x14200 cleaner cleaner 37631 108723 0 0 3 0x14200 reaper reaper 50233 521465 0 0 3 0x14200 pgdaemon pagedaemon 89193 117427 0 0 3 0x14200 bored crynlk 17143 66478 0 0 3 0x14200 bored crypto 31100 256269 0 0 3 0x40014200 acpi0 acpi0 51815 349486 0 0 3 0x14200 bored softnet 39170 361412 0 0 3 0x14200 bored systqmp 64674 274245 0 0 3 0x14200 bored systq 93651 246137 0 0 2 0x40014200 softclock 88413 230959 0 0 3 0x40014200 idle0 78053 234398 0 0 3 0x14200 bored smr 1 169262 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 9558 6306K 7584K 78643K 35495 0 0 pcb 13 8K 8K 78643K 651 0 0 rtable 99 11K 12K 78643K 1322 0 0 ifaddr 70 17K 21K 78643K 826 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 508 0 0 iov 0 0K 32K 78643K 2005 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1193 75K 77K 78643K 10542 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 100 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 1829 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 9698 0 0 sigio 0 0K 0K 78643K 124 0 0 proc 42 30K 54K 78643K 1379 0 0 subproc 32 2K 2K 78643K 42 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 774 0 0 in_multi 22 1K 2K 78643K 306 0 0 ether_multi 1 0K 0K 78643K 34 0 0 mrt 0 0K 0K 78643K 27 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 1090 0 0 pfkey data 0 0K 4K 78643K 8 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 89 20K 36K 78643K 23303 0 0 UVM aobj 130 5K 5K 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 0K 78643K 346 0 0 NDP 17 0K 0K 78643K 224 0 0 temp 206 2728K 3368K 78643K 33295 0 0 kqueue 0 0K 0K 78643K 82 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 8 0 4 1 0 1 1 0 8 0 rtpcb 80 436 0 436 5 4 1 1 0 8 1 rtentry 112 60 0 26 2 0 2 2 0 8 0 unpcb 120 2870 0 2862 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1039 0 1039 1 1 0 1 0 8 0 tcpcb 544 1275 0 1271 1 0 1 1 0 8 0 inpcb 280 3703 0 3699 8 7 1 2 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 pkpcb 40 71 0 71 22 21 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 153 0 153 30 29 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 45 12 1 11 12 0 8 0 art_table 32 190 0 45 2 0 2 2 0 8 0 art_node 16 47 0 17 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 6 1 0 1 1 0 8 0 semapl 112 1827 0 1817 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 16911 0 15500 46 0 46 46 0 8 0 ffsino 240 16911 0 15500 84 0 84 84 0 8 0 nchpl 144 31960 0 30323 64 3 61 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 100507 0 100507 2 1 1 1 0 8 1 scsiplug 64 15 0 15 11 11 0 1 0 8 0 scxspl 192 95513 0 95513 47 46 1 7 0 8 1 plimitpl 152 764 0 757 1 0 1 1 0 8 0 sigapl 432 9881 0 9869 2 0 2 2 0 8 0 futexpl 56 176923 0 176923 2 1 1 1 0 8 1 knotepl 112 1817 0 1798 1 0 1 1 0 8 0 kqueuepl 104 2360 0 2358 1 0 1 1 0 8 0 pipepl 112 5276 0 5257 14 13 1 2 0 8 0 fdescpl 424 9882 0 9869 2 0 2 2 0 8 0 filepl 120 60138 0 60049 16 12 4 5 0 8 0 lockfpl 104 3363 0 3363 4 3 1 1 0 8 1 lockfspl 48 1159 0 1159 4 3 1 1 0 8 1 sessionpl 112 29 0 21 1 0 1 1 0 8 0 pgrppl 48 122 0 114 1 0 1 1 0 8 0 ucredpl 96 12873 0 12867 1 0 1 1 0 8 0 zombiepl 144 9870 0 9869 1 0 1 1 0 8 0 processpl 864 9897 0 9869 4 0 4 4 0 8 0 procpl 632 22206 0 22171 5 1 4 5 0 8 0 sosppl 128 132 0 132 28 27 1 1 0 8 1 sockpl 384 7163 0 7151 11 9 2 4 0 8 0 mcl64k 65536 2572 0 2572 206 205 1 65 0 8 1 mcl16k 16384 21 0 21 16 16 0 1 0 8 0 mcl12k 12288 174 0 174 25 24 1 1 0 8 1 mcl9k 9216 132 0 132 28 27 1 1 0 8 1 mcl8k 8192 121 0 121 29 29 0 1 0 8 0 mcl4k 4096 1192 0 1190 5 4 1 1 0 8 0 mcl2k2 2112 55 0 55 27 26 1 1 0 8 1 mcl2k 2048 69302 0 69263 15 9 6 10 0 8 0 mtagpl 80 261 0 183 4 1 3 3 0 8 0 mbufpl 256 156538 0 156317 116 96 20 50 0 8 0 bufpl 256 32287 0 26441 366 0 366 366 0 8 0 anonpl 16 815393 0 803448 285 231 54 65 0 62 2 amapchunkpl 152 39257 0 39155 93 88 5 19 0 158 0 amappl16 192 46606 0 45938 255 220 35 46 0 8 1 amappl15 184 4937 0 4935 1 0 1 1 0 8 0 amappl14 176 4983 0 4977 1 0 1 1 0 8 0 amappl13 168 9 0 9 2 2 0 1 0 8 0 amappl12 160 20 0 16 1 0 1 1 0 8 0 amappl11 152 51 0 46 1 0 1 1 0 8 0 amappl10 144 4802 0 4800 1 0 1 1 0 8 0 amappl9 136 559 0 555 1 0 1 1 0 8 0 amappl8 128 147 0 127 1 0 1 1 0 8 0 amappl7 120 4754 0 4750 1 0 1 1 0 8 0 amappl6 112 61 0 53 1 0 1 1 0 8 0 amappl5 104 199 0 192 1 0 1 1 0 8 0 amappl4 96 5285 0 5260 1 0 1 1 0 8 0 amappl3 88 11078 0 11063 1 0 1 1 0 8 0 amappl2 80 78338 0 78270 3 1 2 3 0 8 0 amappl1 72 175522 0 175130 25 16 9 19 0 8 0 amappl 80 22514 0 22480 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 9882 0 9869 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9882 0 9869 1 0 1 1 0 8 0 vmmpekpl 168 51405 0 51382 2 0 2 2 0 8 0 vmmpepl 168 1134302 0 1132570 264 187 77 89 0 357 0 vmsppl 272 9881 0 9869 2 1 1 2 0 8 0 pdppl 4096 19771 0 19738 6 1 5 6 0 8 0 pvpl 32 2264153 0 2249153 528 389 139 209 0 265 13 pmappl 200 9881 0 9869 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 866 0 365 19 1 18 18 0 8 0