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(fffffd80366ed320) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802bb9ea50,ffff8000ffff2018) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802bb9ea50,ffff8000ffff2018) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802bb9ea50,ffff8000ffff2018) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2018) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2018,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2018,ffff8000149d6770,ffff8000149d67e0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149d6840) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffe0684) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0650, 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(fffffd80366ed320) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802bb9ea50,ffff8000ffff2018) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802bb9ea50,ffff8000ffff2018) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802bb9ea50,ffff8000ffff2018) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2018) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2018,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2018,ffff8000149d6770,ffff8000149d67e0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149d6840) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffe0684) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0650, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149d6460 rbx 0xffff8000149d6510 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149d6420 r9 0x1 r10 0 r11 0xe8bf4f613ea89ab3 r12 0x3000000008 r13 0xffff8000149d6470 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149d6450 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=292487 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3160,0xffffffff822c3530 process=0xffff8000ffff6a30 user=0xffff8000149d1000, vmspace=0xfffffd803f013880 estcpu=36, cpticks=12, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 82805 120769 1 0 3 0x100083 ttyin getty 61911 520515 0 0 3 0x14200 bored sosplice 66641 26352 16594 0 2 0x482 syz-executor.0 29939 364776 16594 0 2 0x482 syz-executor.1 16594 477944 54239 0 3 0x82 thrsleep syz-fuzzer 16594 500677 54239 0 3 0x4000082 thrsleep syz-fuzzer 16594 455029 54239 0 3 0x4000082 kqread syz-fuzzer 16594 53394 54239 0 3 0x4000082 thrsleep syz-fuzzer 16594 100688 54239 0 3 0x4000082 thrsleep syz-fuzzer 16594 309372 54239 0 3 0x4000082 thrsleep syz-fuzzer 16594 154621 54239 0 3 0x4000082 thrsleep syz-fuzzer 54239 172395 66818 0 3 0x10008a pause ksh 66818 217399 97228 0 3 0x92 select sshd 97228 71051 1 0 3 0x80 select sshd 4887 330888 8017 73 2 0x100090 syslogd 8017 200582 1 0 3 0x100082 netio syslogd 79710 307511 1 77 3 0x100090 poll dhclient 60105 55584 1 0 3 0x80 poll dhclient 34232 516243 0 0 2 0x14200 zerothread 91913 521177 0 0 3 0x14200 aiodoned aiodoned 36719 149821 0 0 3 0x14200 syncer update 94523 406606 0 0 3 0x14200 cleaner cleaner 7516 322976 0 0 3 0x14200 reaper reaper 35821 63855 0 0 3 0x14200 pgdaemon pagedaemon 68020 80374 0 0 3 0x14200 bored crynlk 17460 115570 0 0 3 0x14200 bored crypto 60733 96164 0 0 3 0x40014200 acpi0 acpi0 55862 435577 0 0 3 0x14200 bored softnet 29636 483283 0 0 3 0x14200 bored systqmp 3249 221485 0 0 3 0x14200 bored systq 68839 458656 0 0 2 0x40014200 softclock 4742 79795 0 0 3 0x40014200 idle0 68259 21237 0 0 2 0x14200 smr 1 225880 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 9564 6496K 7524K 78643K 30612 0 0 pcb 13 8K 8K 78643K 526 0 0 rtable 119 12K 12K 78643K 1285 0 0 ifaddr 70 17K 19K 78643K 611 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 389 0 0 iov 0 0K 24K 78643K 874 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1209 76K 77K 78643K 8110 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 85 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 771 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 6986 0 0 sigio 1 0K 0K 78643K 84 0 0 proc 42 30K 54K 78643K 950 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 716 0 0 in_multi 33 2K 2K 78643K 268 0 0 ether_multi 1 0K 0K 78643K 38 0 0 mrt 0 0K 0K 78643K 16 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 830 0 0 pfkey data 0 0K 4K 78643K 6 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 95 21K 37K 78643K 17205 0 0 UVM aobj 130 5K 5K 78643K 168 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 279 0 0 NDP 16 0K 0K 78643K 164 0 0 temp 199 2728K 3367K 78643K 24871 0 0 kqueue 0 0K 0K 78643K 64 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 7 0 1 1 0 1 1 0 8 0 rtpcb 80 308 0 306 1 0 1 1 0 8 0 rtentry 112 57 0 12 2 0 2 2 0 8 0 unpcb 120 2394 0 2384 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1370 0 1370 1 1 0 1 0 8 0 tcpcb 544 1138 0 1132 1 0 1 1 0 8 0 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 4 0 4 1 1 0 1 0 8 0 inpcb 280 3065 0 3058 2 0 2 2 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 50 0 50 14 14 0 1 0 8 0 swfcl 56 6 0 0 1 0 1 1 0 8 0 ppxss 1128 117 0 117 17 16 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 1 12 0 12 12 0 8 0 art_table 32 190 0 1 2 0 2 2 0 8 0 art_node 16 46 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 9 1 0 1 1 0 8 0 semapl 112 767 0 757 1 0 1 1 0 8 0 shmpl 112 166 0 38 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 12780 0 11374 46 0 46 46 0 8 0 ffsino 240 12780 0 11374 84 0 84 84 0 8 0 nchpl 144 22689 0 21047 62 0 62 62 0 8 0 uvmvnodes 72 6618 0 0 121 0 121 121 0 8 0 vnodes 200 6618 0 0 349 0 349 349 0 8 0 namei 1024 73561 0 73561 5 4 1 1 0 8 1 scsiplug 64 12 0 12 10 9 1 1 0 8 1 scxspl 192 70820 0 70820 40 39 1 6 0 8 1 plimitpl 152 576 0 569 1 0 1 1 0 8 0 sigapl 432 7159 0 7146 2 0 2 2 0 8 0 futexpl 56 119156 0 119156 5 4 1 1 0 8 1 knotepl 112 1342 0 1323 2 1 1 2 0 8 0 kqueuepl 104 1686 0 1684 1 0 1 1 0 8 0 pipepl 112 4090 0 4071 8 6 2 2 0 8 1 fdescpl 424 7160 0 7146 2 0 2 2 0 8 0 filepl 120 44328 0 44233 5 1 4 5 0 8 0 lockfpl 104 2586 0 2586 9 8 1 1 0 8 1 lockfspl 48 887 0 887 9 8 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 71 0 61 1 0 1 1 0 8 0 ucredpl 96 9747 0 9740 1 0 1 1 0 8 0 zombiepl 144 7147 0 7145 2 1 1 1 0 8 0 processpl 864 7175 0 7145 4 0 4 4 0 8 0 procpl 632 16210 0 16174 4 0 4 4 0 8 0 sosppl 128 98 0 98 25 24 1 1 0 8 1 sockpl 384 5859 0 5840 12 9 3 4 0 8 1 mcl64k 65536 1211 0 1211 135 134 1 64 0 8 1 mcl16k 16384 32 0 32 19 19 0 1 0 8 0 mcl12k 12288 130 0 130 18 17 1 1 0 8 1 mcl9k 9216 100 0 100 17 16 1 1 0 8 1 mcl8k 8192 96 0 96 22 21 1 1 0 8 1 mcl4k 4096 363 0 363 8 7 1 1 0 8 1 mcl2k2 2112 41 0 41 18 17 1 1 0 8 1 mcl2k 2048 65660 0 65622 20 14 6 15 0 8 0 mtagpl 80 195 0 109 3 1 2 2 0 8 0 mbufpl 256 138955 0 138704 79 61 18 45 0 8 0 bufpl 256 25487 0 18870 414 0 414 414 0 8 0 anonpl 16 631200 0 619301 242 191 51 65 0 62 1 amapchunkpl 152 29415 0 29307 83 74 9 18 0 158 4 amappl16 192 39297 0 38636 232 196 36 46 0 8 2 amappl15 184 3473 0 3472 1 0 1 1 0 8 0 amappl14 176 3524 0 3519 1 0 1 1 0 8 0 amappl13 168 9 0 9 4 4 0 1 0 8 0 amappl12 160 8 0 7 1 0 1 1 0 8 0 amappl11 152 51 0 39 1 0 1 1 0 8 0 amappl10 144 61 0 61 4 4 0 1 0 8 0 amappl9 136 500 0 497 1 0 1 1 0 8 0 amappl8 128 137 0 118 1 0 1 1 0 8 0 amappl7 120 31 0 28 1 0 1 1 0 8 0 amappl6 112 66 0 57 1 0 1 1 0 8 0 amappl5 104 307 0 297 1 0 1 1 0 8 0 amappl4 96 3971 0 3947 1 0 1 1 0 8 0 amappl3 88 7365 0 7353 1 0 1 1 0 8 0 amappl2 80 56900 0 56830 3 1 2 3 0 8 0 amappl1 72 133041 0 132623 25 15 10 19 0 8 0 amappl 80 16508 0 16471 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 167 0 38 4 1 3 3 0 8 0 uaddrrnd 24 7160 0 7146 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 7160 0 7146 1 0 1 1 0 8 0 vmmpekpl 168 42015 0 41994 2 0 2 2 0 8 0 vmmpepl 168 830516 0 828804 209 128 81 90 0 357 1 vmsppl 272 7159 0 7146 2 1 1 2 0 8 0 pdppl 4096 14326 0 14292 6 1 5 6 0 8 0 pvpl 32 1825232 0 1810277 498 365 133 227 0 265 8 pmappl 200 7159 0 7146 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 813 0 264 18 1 17 18 0 8 0