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(fffffd802cc3e310) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802b991528,ffff8000ffff2c70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802b991528,ffff8000ffff2c70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802b991528,ffff8000ffff2c70) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2c70) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2c70,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2c70,ffff800015a050d0,ffff800015a05140) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800015a051a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbb444) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbb410, 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(fffffd802cc3e310) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802b991528,ffff8000ffff2c70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802b991528,ffff8000ffff2c70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802b991528,ffff8000ffff2c70) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2c70) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2c70,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2c70,ffff800015a050d0,ffff800015a05140) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800015a051a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbb444) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbb410, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800015a04dc0 rbx 0xffff800015a04e70 rdx 0x2 rcx 0 rax 0 r8 0xffff800015a04d80 r9 0x1 r10 0 r11 0x27df768296fe5483 r12 0x3000000008 r13 0xffff800015a04dd0 r14 0x100 r15 0x1 rip 0xffffffff811134d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015a04db0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=278986 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2508,0xffffffff822b8940 process=0xffff800014942378 user=0xffff800015a00000, vmspace=0xfffffd803f014770 estcpu=36, cpticks=21, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 8893 516512 1 0 3 0x100083 ttyin getty 79282 154491 43578 0 2 0x2 syz-executor.0 76480 267806 43578 0 2 0x482 syz-executor.1 53758 162357 0 0 3 0x14200 bored sosplice 43578 225005 4175 0 3 0x82 thrsleep syz-fuzzer 43578 416276 4175 0 2 0x4000482 syz-fuzzer 43578 436623 4175 0 3 0x4000082 thrsleep syz-fuzzer 43578 258427 4175 0 3 0x4000082 thrsleep syz-fuzzer 43578 343056 4175 0 3 0x4000082 thrsleep syz-fuzzer 43578 136316 4175 0 3 0x4000082 kqread syz-fuzzer 43578 30590 4175 0 3 0x4000082 thrsleep syz-fuzzer 4175 293969 21733 0 3 0x10008a pause ksh 21733 1658 30599 0 3 0x92 select sshd 30599 503879 1 0 3 0x80 select sshd 88503 309663 37282 73 2 0x100090 syslogd 37282 373858 1 0 3 0x100082 netio syslogd 76789 303095 1 77 3 0x100090 poll dhclient 68208 226389 1 0 3 0x80 poll dhclient 41720 405069 0 0 2 0x14200 zerothread 48799 214200 0 0 3 0x14200 aiodoned aiodoned 50520 412519 0 0 3 0x14200 syncer update 21412 56320 0 0 3 0x14200 cleaner cleaner 96375 125521 0 0 3 0x14200 reaper reaper 69411 18561 0 0 3 0x14200 pgdaemon pagedaemon 26659 35330 0 0 3 0x14200 bored crynlk 52597 25645 0 0 3 0x14200 bored crypto 15956 282075 0 0 3 0x40014200 acpi0 acpi0 19209 469972 0 0 3 0x14200 bored softnet 1197 339344 0 0 3 0x14200 bored systqmp 5404 183743 0 0 3 0x14200 bored systq 15032 175676 0 0 3 0x40014200 bored softclock 29521 257582 0 0 3 0x40014200 idle0 25017 489505 0 0 3 0x14200 bored smr 1 214718 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 9576 6395K 14716K 78643K 35297 0 0 pcb 13 8K 8K 78643K 639 0 0 rtable 115 4K 5K 78643K 2080 0 0 ifaddr 80 19K 20K 78643K 937 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 518 0 0 iov 0 0K 24K 78643K 1210 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 77K 78643K 10006 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 113 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 1041 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 9519 0 0 sigio 1 0K 0K 78643K 160 0 0 proc 42 30K 54K 78643K 1706 0 0 subproc 32 2K 2K 78643K 174 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 906 0 0 in_multi 33 2K 2K 78643K 422 0 0 ether_multi 1 0K 0K 78643K 46 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 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 1237 0 0 pfkey data 0 0K 4K 78643K 2 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 98 21K 31K 78643K 23297 0 0 UVM aobj 130 5K 5K 78643K 149 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 376 0 0 NDP 19 0K 1K 78643K 263 0 0 temp 219 2728K 2856K 78643K 33400 0 0 kqueue 0 0K 0K 78643K 76 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 24 0 18 1 0 1 1 0 8 0 rtpcb 80 391 0 389 1 0 1 1 0 8 0 rtentry 112 143 0 99 2 0 2 2 0 8 0 unpcb 120 3172 0 3162 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 985 0 985 1 1 0 1 0 8 0 tcpcb 544 1469 0 1465 1 0 1 1 0 8 0 inpcb 280 3905 0 3898 3 2 1 2 0 8 0 ip6q 72 4 0 4 2 2 0 1 0 8 0 ip6af 48 8 0 8 2 2 0 1 0 8 0 nd6 48 30 0 24 1 0 1 1 0 8 0 pkpcb 40 64 0 64 18 17 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 176 0 176 27 26 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 567 0 375 17 5 12 13 0 8 0 art_table 32 568 0 375 2 0 2 2 0 8 0 art_node 16 134 0 94 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1039 0 1029 1 0 1 1 0 8 0 shmpl 112 147 0 19 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 16716 0 15303 47 0 47 47 0 8 0 ffsino 240 16716 0 15303 84 0 84 84 0 8 0 nchpl 144 30239 0 28610 61 0 61 61 0 8 0 uvmvnodes 72 6848 0 0 125 0 125 125 0 8 0 vnodes 200 6848 0 0 361 0 361 361 0 8 0 namei 1024 97501 0 97501 9 8 1 1 0 8 1 scsiplug 64 12 0 12 9 9 0 1 0 8 0 scxspl 192 109021 0 109021 46 45 1 7 0 8 1 plimitpl 152 792 0 785 1 0 1 1 0 8 0 sigapl 432 9674 0 9661 2 0 2 2 0 8 0 futexpl 56 158714 0 158714 10 9 1 1 0 8 1 knotepl 112 1981 0 1962 1 0 1 1 0 8 0 kqueuepl 104 2355 0 2353 1 0 1 1 0 8 0 pipepl 112 5580 0 5561 11 10 1 2 0 8 0 fdescpl 424 9675 0 9661 2 0 2 2 0 8 0 filepl 120 58540 0 58444 9 5 4 5 0 8 0 lockfpl 104 3349 0 3349 11 10 1 1 0 8 1 lockfspl 48 1164 0 1164 11 10 1 1 0 8 1 sessionpl 112 33 0 23 1 0 1 1 0 8 0 pgrppl 48 117 0 107 1 0 1 1 0 8 0 ucredpl 96 12387 0 12380 1 0 1 1 0 8 0 zombiepl 144 9662 0 9661 5 4 1 1 0 8 0 processpl 864 9690 0 9661 4 0 4 4 0 8 0 procpl 632 21841 0 21806 4 0 4 4 0 8 0 sosppl 128 117 0 117 24 23 1 1 0 8 1 sockpl 384 7610 0 7591 15 12 3 4 0 8 1 mcl64k 65536 2822 0 2822 249 248 1 65 0 8 1 mcl16k 16384 40 0 40 25 24 1 1 0 8 1 mcl12k 12288 199 0 199 29 28 1 1 0 8 1 mcl9k 9216 132 0 132 28 28 0 1 0 8 0 mcl8k 8192 148 0 148 27 27 0 1 0 8 0 mcl4k 4096 451 0 449 17 16 1 1 0 8 0 mcl2k2 2112 56 0 56 29 29 0 1 0 8 0 mcl2k 2048 69103 0 69058 17 10 7 13 0 8 0 mtagpl 80 254 0 205 5 3 2 2 0 8 0 mbufpl 256 158638 0 158470 138 125 13 42 0 8 1 bufpl 256 30400 0 22588 490 1 489 489 0 8 0 anonpl 16 902960 0 891250 303 246 57 66 0 62 4 amapchunkpl 152 41272 0 41165 104 95 9 15 0 158 4 amappl16 192 54654 0 54007 321 286 35 45 0 8 1 amappl15 184 1743 0 1741 1 0 1 1 0 8 0 amappl14 176 1852 0 1846 1 0 1 1 0 8 0 amappl13 168 2383 0 2383 3 3 0 1 0 8 0 amappl12 160 26 0 24 1 0 1 1 0 8 0 amappl11 152 914 0 903 1 0 1 1 0 8 0 amappl10 144 2230 0 2229 1 0 1 1 0 8 0 amappl9 136 1250 0 1247 1 0 1 1 0 8 0 amappl8 128 806 0 781 1 0 1 1 0 8 0 amappl7 120 2204 0 2198 1 0 1 1 0 8 0 amappl6 112 894 0 888 1 0 1 1 0 8 0 amappl5 104 286 0 275 1 0 1 1 0 8 0 amappl4 96 8328 0 8303 1 0 1 1 0 8 0 amappl3 88 3869 0 3856 1 0 1 1 0 8 0 amappl2 80 76303 0 76234 3 1 2 3 0 8 0 amappl1 72 176746 0 176329 25 16 9 19 0 8 0 amappl 80 22300 0 22263 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 148 0 19 3 0 3 3 0 8 0 uaddrrnd 24 9675 0 9661 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9675 0 9661 1 0 1 1 0 8 0 vmmpekpl 168 60568 0 60544 2 0 2 2 0 8 0 vmmpepl 168 1116900 0 1115200 366 284 82 99 0 357 2 vmsppl 272 9674 0 9661 5 4 1 2 0 8 0 pdppl 4096 19356 0 19322 6 1 5 6 0 8 0 pvpl 32 2605640 0 2590778 759 568 191 265 0 265 64 pmappl 200 9674 0 9661 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1091 0 471 24 6 18 19 0 8 0