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(fffffd80279da6c8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f79e438,ffff800014fd18c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f79e438,ffff800014fd18c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f79e438,ffff800014fd18c8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014fd18c8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014fd18c8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014fd18c8,ffff8000159f25d0,ffff8000159f2640) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159f26a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffd47a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4770, 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(fffffd80279da6c8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f79e438,ffff800014fd18c8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f79e438,ffff800014fd18c8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f79e438,ffff800014fd18c8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014fd18c8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014fd18c8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014fd18c8,ffff8000159f25d0,ffff8000159f2640) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159f26a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffd47a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4770, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159f22c0 rbx 0xffff8000159f2370 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159f2280 r9 0x1 r10 0 r11 0x7e4a0d1aee465927 r12 0x3000000008 r13 0xffff8000159f22d0 r14 0x100 r15 0x1 rip 0xffffffff81877898 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159f22b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=476973 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800014fd0290,0xffffffff822e6ed0 process=0xffff8000ffff6d90 user=0xffff8000159ed000, vmspace=0xfffffd803f00baa0 estcpu=31, cpticks=1, pctcpu=0.10 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 63128 135063 1 0 3 0x100083 ttyin getty 80848 493968 0 0 3 0x14200 bored sosplice 17649 117123 82238 0 2 0x482 syz-executor.0 17000 339121 82238 0 2 0x482 syz-executor.1 82238 385552 70578 0 3 0x82 kqread syz-fuzzer 82238 338736 70578 0 3 0x4000082 thrsleep syz-fuzzer 82238 198084 70578 0 3 0x4000082 thrsleep syz-fuzzer 82238 438334 70578 0 3 0x4000082 thrsleep syz-fuzzer 82238 332861 70578 0 3 0x4000082 thrsleep syz-fuzzer 82238 438515 70578 0 3 0x4000082 thrsleep syz-fuzzer 82238 101072 70578 0 3 0x4000082 thrsleep syz-fuzzer 70578 488029 86393 0 3 0x10008a pause ksh 86393 83949 1455 0 3 0x92 select sshd 1455 221845 1 0 3 0x80 select sshd 78581 94005 94697 73 2 0x100090 syslogd 94697 26881 1 0 3 0x100082 netio syslogd 75452 397593 1 77 3 0x100090 poll dhclient 43850 405062 1 0 3 0x80 poll dhclient 85081 362897 0 0 2 0x14200 zerothread 91417 517279 0 0 3 0x14200 aiodoned aiodoned 69274 143295 0 0 2 0x14200 update 65785 10510 0 0 3 0x14200 cleaner cleaner 63345 311663 0 0 3 0x14200 reaper reaper 25208 115877 0 0 3 0x14200 pgdaemon pagedaemon 26985 420886 0 0 3 0x14200 bored crynlk 56299 433238 0 0 3 0x14200 bored crypto 22068 371003 0 0 3 0x40014200 acpi0 acpi0 39975 404761 0 0 3 0x14200 bored softnet 47724 138057 0 0 3 0x14200 bored systqmp 44388 402038 0 0 3 0x14200 bored systq 11362 504209 0 0 3 0x40014200 bored softclock 72466 470038 0 0 3 0x40014200 idle0 73052 274307 0 0 3 0x14200 bored smr 1 258966 0 0 3 0x82 wait init 0 0 -1 0 2 0x10200 swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9572 6492K 7122K 78643K 24045 0 0 pcb 13 8K 8K 78643K 351 0 0 rtable 120 12K 12K 78643K 967 0 0 ifaddr 77 16K 17K 78643K 443 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 265 0 0 iov 0 0K 28K 78643K 704 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 77K 78643K 5850 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 59 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 546 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 4911 0 0 sigio 1 0K 0K 78643K 74 0 0 proc 42 30K 46K 78643K 889 0 0 subproc 32 2K 2K 78643K 34 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 419 0 0 in_multi 33 2K 2K 78643K 170 0 0 ether_multi 1 0K 0K 78643K 11 0 0 mrt 0 0K 0K 78643K 18 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 743 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 86 20K 36K 78643K 12392 0 0 UVM aobj 130 4K 4K 78643K 148 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 271 0 0 NDP 18 0K 0K 78643K 121 0 0 temp 213 2728K 3367K 78643K 18252 0 0 kqueue 0 0K 0K 78643K 37 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 1 1 0 1 1 0 8 0 rtpcb 80 235 0 233 1 0 1 1 0 8 0 rtentry 112 51 0 5 2 0 2 2 0 8 0 unpcb 120 1665 0 1655 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 580 0 580 1 1 0 1 0 8 0 tcpcb 544 681 0 677 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 1974 0 1965 4 3 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 26 0 26 9 9 0 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 77 0 77 18 17 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 190 0 1 12 0 12 12 0 8 0 art_table 32 191 0 1 2 0 2 2 0 8 0 art_node 16 47 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 14 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 544 0 534 1 0 1 1 0 8 0 shmpl 112 146 0 18 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9469 0 8060 46 0 46 46 0 8 0 ffsino 240 9469 0 8060 84 0 84 84 0 8 0 nchpl 144 16598 0 14951 62 0 62 62 0 8 0 uvmvnodes 72 6714 0 0 123 0 123 123 0 8 0 vnodes 200 6714 0 0 354 0 354 354 0 8 0 namei 1024 53144 0 53144 1 0 1 1 0 8 1 scsiplug 64 6 0 6 5 5 0 1 0 8 0 scxspl 192 52934 0 52934 32 31 1 6 0 8 1 plimitpl 152 372 0 365 1 0 1 1 0 8 0 sigapl 432 5086 0 5073 2 0 2 2 0 8 0 futexpl 56 82392 0 82392 2 1 1 1 0 8 1 knotepl 112 919 0 900 2 1 1 2 0 8 0 kqueuepl 104 1219 0 1217 1 0 1 1 0 8 0 pipepl 112 2736 0 2717 9 8 1 2 0 8 0 fdescpl 424 5087 0 5073 2 0 2 2 0 8 0 filepl 120 30899 0 30804 6 2 4 5 0 8 0 lockfpl 104 1794 0 1794 4 3 1 1 0 8 1 lockfspl 48 612 0 612 4 3 1 1 0 8 1 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 69 0 59 1 0 1 1 0 8 0 ucredpl 96 6669 0 6662 1 0 1 1 0 8 0 zombiepl 144 5074 0 5072 2 1 1 1 0 8 0 processpl 864 5102 0 5072 4 0 4 4 0 8 0 procpl 632 11420 0 11384 4 0 4 4 0 8 0 sosppl 128 69 0 69 18 17 1 1 0 8 1 sockpl 384 3928 0 3909 8 5 3 3 0 8 1 mcl64k 65536 1678 0 1678 137 137 0 33 0 8 0 mcl16k 16384 20 0 20 12 11 1 1 0 8 1 mcl12k 12288 75 0 75 16 16 0 1 0 8 0 mcl9k 9216 75 0 75 18 17 1 1 0 8 1 mcl8k 8192 63 0 63 17 16 1 1 0 8 1 mcl4k 4096 226 0 226 7 6 1 1 0 8 1 mcl2k2 2112 36 0 36 14 14 0 1 0 8 0 mcl2k 2048 62472 0 62430 16 10 6 12 0 8 0 mtagpl 80 121 0 60 3 1 2 2 0 8 0 mbufpl 256 122937 0 122760 77 63 14 28 0 8 0 bufpl 256 22499 0 15698 426 0 426 426 0 8 0 anonpl 16 473151 0 461179 212 146 66 66 0 62 15 amapchunkpl 152 22012 0 21907 82 68 14 18 0 158 9 amappl16 192 28196 0 27535 202 165 37 46 0 8 3 amappl15 184 2428 0 2426 1 0 1 1 0 8 0 amappl14 176 2503 0 2497 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 11 0 8 1 0 1 1 0 8 0 amappl11 152 50 0 39 1 0 1 1 0 8 0 amappl10 144 64 0 64 7 7 0 1 0 8 0 amappl9 136 560 0 556 1 0 1 1 0 8 0 amappl8 128 137 0 120 1 0 1 1 0 8 0 amappl7 120 39 0 34 1 0 1 1 0 8 0 amappl6 112 57 0 50 1 0 1 1 0 8 0 amappl5 104 161 0 150 1 0 1 1 0 8 0 amappl4 96 5355 0 5329 1 0 1 1 0 8 0 amappl3 88 2775 0 2763 1 0 1 1 0 8 0 amappl2 80 42668 0 42600 4 2 2 3 0 8 0 amappl1 72 94410 0 93997 26 17 9 19 0 8 0 amappl 80 11736 0 11700 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 147 0 18 3 0 3 3 0 8 0 uaddrrnd 24 5087 0 5073 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5087 0 5073 1 0 1 1 0 8 0 vmmpekpl 168 29125 0 29099 2 0 2 2 0 8 0 vmmpepl 168 593229 0 591522 213 130 83 93 0 357 4 vmsppl 272 5086 0 5073 2 1 1 2 0 8 0 pdppl 4096 10181 0 10146 6 1 5 6 0 8 0 pvpl 32 1307605 0 1292588 493 245 248 251 0 265 124 pmappl 200 5086 0 5073 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 804 0 247 19 2 17 17 0 8 0