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(fffffd802f732660) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803b707d38,ffff8000149413d8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803b707d38,ffff8000149413d8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803b707d38,ffff8000149413d8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000149413d8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000149413d8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000149413d8,ffff800016be6960,ffff800016be69d0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016be6a30) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7fffff9a14) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff99e0, 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(fffffd802f732660) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803b707d38,ffff8000149413d8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803b707d38,ffff8000149413d8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803b707d38,ffff8000149413d8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000149413d8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000149413d8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000149413d8,ffff800016be6960,ffff800016be69d0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016be6a30) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7fffff9a14) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff99e0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016be6650 rbx 0xffff800016be6700 rdx 0x2 rcx 0 rax 0 r8 0xffff800016be6610 r9 0x1 r10 0 r11 0xc913eb2b023c311d r12 0x3000000008 r13 0xffff800016be6660 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016be6640 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=232086 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014941160,0xffffffff822db690 process=0xffff8000ffff70f0 user=0xffff800016be1000, vmspace=0xfffffd803f00cee0 estcpu=36, cpticks=8, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 88998 193681 1 0 3 0x100083 ttyin getty 99335 95232 0 0 3 0x14200 bored sosplice 68177 342435 2744 0 2 0x482 syz-executor.1 65904 42354 2744 0 2 0x2 syz-executor.0 2744 179376 89988 0 3 0x82 thrsleep syz-fuzzer 2744 407275 89988 0 2 0x4000482 syz-fuzzer 2744 276385 89988 0 3 0x4000082 thrsleep syz-fuzzer 2744 412690 89988 0 3 0x4000082 thrsleep syz-fuzzer 2744 486710 89988 0 3 0x4000082 thrsleep syz-fuzzer 2744 289596 89988 0 3 0x4000082 kqread syz-fuzzer 2744 309886 89988 0 3 0x4000082 thrsleep syz-fuzzer 89988 5581 89678 0 3 0x10008a pause ksh 89678 106910 86805 0 3 0x92 select sshd 86805 313759 1 0 3 0x80 select sshd 52001 300180 64667 73 2 0x100090 syslogd 64667 168975 1 0 3 0x100082 netio syslogd 93412 183796 1 77 3 0x100090 poll dhclient 99808 336542 1 0 3 0x80 poll dhclient 72941 58544 0 0 2 0x14200 zerothread 66996 158920 0 0 3 0x14200 aiodoned aiodoned 58983 309391 0 0 3 0x14200 syncer update 98949 68410 0 0 3 0x14200 cleaner cleaner 22309 82640 0 0 3 0x14200 reaper reaper 28619 61069 0 0 3 0x14200 pgdaemon pagedaemon 88996 256211 0 0 3 0x14200 bored crynlk 13107 361966 0 0 3 0x14200 bored crypto 77957 440729 0 0 3 0x40014200 acpi0 acpi0 47430 515553 0 0 3 0x14200 bored softnet 74104 196520 0 0 3 0x14200 bored systqmp 84619 144496 0 0 3 0x14200 bored systq 35910 445650 0 0 3 0x40014200 bored softclock 50079 138423 0 0 3 0x40014200 idle0 58808 237088 0 0 3 0x14200 bored smr 1 374955 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 9533 6376K 14617K 78643K 19703 0 0 pcb 13 8K 8K 78643K 228 0 0 rtable 122 12K 12K 78643K 752 0 0 ifaddr 64 15K 16K 78643K 319 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 163 0 0 iov 0 0K 24K 78643K 395 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 4262 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 45 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 307 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 3303 0 0 sigio 1 0K 0K 78643K 63 0 0 proc 42 30K 54K 78643K 761 0 0 subproc 32 2K 2K 78643K 38 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 355 0 0 in_multi 33 2K 2K 78643K 149 0 0 ether_multi 1 0K 0K 78643K 17 0 0 mrt 0 0K 0K 78643K 10 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 467 0 0 pfkey data 0 0K 4K 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 92 21K 30K 78643K 8521 0 0 UVM aobj 118 4K 4K 78643K 134 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 122 0 0 NDP 14 0K 0K 78643K 84 0 0 temp 185 2727K 2797K 78643K 13274 0 0 kqueue 0 0K 0K 78643K 25 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 0 1 0 1 1 0 8 0 rtpcb 80 185 0 183 1 0 1 1 0 8 0 rtentry 112 57 0 10 2 0 2 2 0 8 0 unpcb 120 1127 0 1117 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 478 0 478 1 1 0 1 0 8 0 tcpcb 544 569 0 565 1 0 1 1 0 8 0 inpcb 280 1457 0 1444 4 2 2 2 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 22 0 22 8 7 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 59 0 59 10 9 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 47 0 5 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 9 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 303 0 293 1 0 1 1 0 8 0 shmpl 112 132 0 16 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6651 0 5242 46 0 46 46 0 8 0 ffsino 240 6651 0 5242 84 0 84 84 0 8 0 nchpl 144 11485 0 9855 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 36095 0 36095 1 0 1 1 0 8 1 scsiplug 64 4 0 4 4 3 1 1 0 8 1 scxspl 192 36205 0 36205 25 24 1 7 0 8 1 plimitpl 152 279 0 272 1 0 1 1 0 8 0 sigapl 432 3476 0 3463 2 0 2 2 0 8 0 futexpl 56 54573 0 54573 1 0 1 1 0 8 1 knotepl 112 638 0 619 1 0 1 1 0 8 0 kqueuepl 104 746 0 744 1 0 1 1 0 8 0 pipepl 112 1944 0 1925 4 3 1 2 0 8 0 fdescpl 424 3477 0 3463 2 0 2 2 0 8 0 filepl 120 20460 0 20365 4 0 4 4 0 8 0 lockfpl 104 1275 0 1275 2 1 1 1 0 8 1 lockfspl 48 452 0 452 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 54 0 44 1 0 1 1 0 8 0 ucredpl 96 3993 0 3986 1 0 1 1 0 8 0 zombiepl 144 3464 0 3463 1 0 1 1 0 8 0 processpl 864 3492 0 3463 4 0 4 4 0 8 0 procpl 632 7718 0 7683 4 0 4 4 0 8 0 sosppl 128 37 0 37 9 8 1 1 0 8 1 sockpl 384 2831 0 2812 3 0 3 3 0 8 1 mcl64k 65536 614 0 614 71 61 10 33 0 8 10 mcl16k 16384 10 0 10 8 8 0 1 0 8 0 mcl12k 12288 61 0 61 9 8 1 1 0 8 1 mcl9k 9216 46 0 46 9 8 1 1 0 8 1 mcl8k 8192 46 0 46 11 10 1 1 0 8 1 mcl4k 4096 170 0 170 5 4 1 1 0 8 1 mcl2k2 2112 18 0 18 9 9 0 1 0 8 0 mcl2k 2048 60138 0 60090 18 11 7 12 0 8 0 mtagpl 80 101 0 31 3 1 2 2 0 8 0 mbufpl 256 110757 0 110533 48 33 15 31 0 8 0 bufpl 256 15207 0 10387 302 0 302 302 0 8 0 anonpl 16 293072 0 281372 140 86 54 65 0 62 6 amapchunkpl 152 13801 0 13665 34 27 7 11 0 158 1 amappl16 192 17914 0 17300 113 77 36 43 0 8 5 amappl15 184 1622 0 1620 1 0 1 1 0 8 0 amappl14 176 56 0 49 1 0 1 1 0 8 0 amappl13 168 1659 0 1657 1 0 1 1 0 8 0 amappl12 160 10 0 10 2 2 0 1 0 8 0 amappl11 152 54 0 43 1 0 1 1 0 8 0 amappl10 144 62 0 61 1 0 1 1 0 8 0 amappl9 136 554 0 550 1 0 1 1 0 8 0 amappl8 128 128 0 113 1 0 1 1 0 8 0 amappl7 120 37 0 33 1 0 1 1 0 8 0 amappl6 112 54 0 47 1 0 1 1 0 8 0 amappl5 104 177 0 167 1 0 1 1 0 8 0 amappl4 96 5379 0 5347 2 1 1 2 0 8 0 amappl3 88 275 0 265 1 0 1 1 0 8 0 amappl2 80 28701 0 28634 3 1 2 3 0 8 0 amappl1 72 68055 0 67639 25 16 9 19 0 8 0 amappl 80 7978 0 7935 2 0 2 2 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 133 0 16 3 1 2 2 0 8 0 uaddrrnd 24 3477 0 3463 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3477 0 3463 1 0 1 1 0 8 0 vmmpekpl 168 21452 0 21428 2 0 2 2 0 8 0 vmmpepl 168 403116 0 401449 160 78 82 89 0 357 7 vmsppl 272 3476 0 3463 2 1 1 2 0 8 0 pdppl 4096 6961 0 6926 6 1 5 6 0 8 0 pvpl 32 790024 0 775320 260 117 143 157 0 265 21 pmappl 200 3476 0 3463 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 575 0 131 15 1 14 14 0 8 0