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(fffffd800451b4e0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80044a0348,ffff8000ffff2018) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd80044a0348,ffff8000ffff2018) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80044a0348,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,ffff800018de8db0,ffff800018de8e20) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800018de8e80) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffec3c4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec390, 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(fffffd800451b4e0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80044a0348,ffff8000ffff2018) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd80044a0348,ffff8000ffff2018) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80044a0348,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,ffff800018de8db0,ffff800018de8e20) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800018de8e80) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffec3c4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec390, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800018de8aa0 rbx 0xffff800018de8b50 rdx 0x2 rcx 0 rax 0 r8 0xffff800018de8a60 r9 0x1 r10 0 r11 0x796987803e9c2b3a r12 0x3000000008 r13 0xffff800018de8ab0 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800018de8a90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=408435 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3160,0xffff8000ffff3660 process=0xffff8000ffff77b0 user=0xffff800018de3000, vmspace=0xfffffd803f00c000 estcpu=36, cpticks=10, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 7611 37603 87993 0 2 0 syz-executor.0 7611 18440 87993 0 3 0x4000080 wsevent_read syz-executor.0 7611 408458 87993 0 3 0x4000080 wsevent_read syz-executor.0 7611 348263 87993 0 3 0x4000080 fsleep syz-executor.0 7611 326531 87993 0 3 0x4000080 fsleep syz-executor.0 99174 244414 1 0 3 0x100083 ttyin getty 29539 481640 0 0 3 0x14200 bored sosplice 66974 15339 11410 0 2 0x482 syz-executor.1 87993 259249 11410 0 2 0x482 syz-executor.0 11410 6520 91300 0 3 0x82 thrsleep syz-fuzzer 11410 81520 91300 0 3 0x4000082 thrsleep syz-fuzzer 11410 325191 91300 0 3 0x4000082 thrsleep syz-fuzzer 11410 498770 91300 0 3 0x4000082 thrsleep syz-fuzzer 11410 186981 91300 0 3 0x4000082 kqread syz-fuzzer 11410 176143 91300 0 3 0x4000082 thrsleep syz-fuzzer 11410 158743 91300 0 3 0x4000082 thrsleep syz-fuzzer 91300 476294 40618 0 3 0x10008a pause ksh 40618 27407 69863 0 3 0x92 select sshd 69863 64121 1 0 3 0x80 select sshd 40117 250916 69474 73 2 0x100090 syslogd 69474 93406 1 0 3 0x100082 netio syslogd 54228 279345 1 77 3 0x100090 poll dhclient 67696 443488 1 0 3 0x80 poll dhclient 25445 182504 0 0 2 0x14200 zerothread 81437 127484 0 0 3 0x14200 aiodoned aiodoned 26092 281938 0 0 3 0x14200 syncer update 95297 300504 0 0 3 0x14200 cleaner cleaner 74630 210889 0 0 3 0x14200 reaper reaper 93585 94037 0 0 3 0x14200 pgdaemon pagedaemon 53224 426549 0 0 3 0x14200 bored crynlk 31100 223714 0 0 3 0x14200 bored crypto 28280 221821 0 0 3 0x40014200 acpi0 acpi0 96895 330567 0 0 3 0x14200 bored softnet 736 363778 0 0 3 0x14200 bored systqmp 82113 193215 0 0 3 0x14200 bored systq 7879 419671 0 0 3 0x40014200 bored softclock 11519 59496 0 0 3 0x40014200 idle0 32429 265287 0 0 3 0x14200 bored smr 1 218505 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 9504 6370K 6894K 78643K 14308 0 0 pcb 13 8K 8K 78643K 122 0 0 rtable 113 3K 4K 78643K 456 0 0 ifaddr 56 13K 14K 78643K 182 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 69 0 0 iov 0 0K 16K 78643K 160 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 77K 78643K 2559 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 21 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 155 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1442 0 0 sigio 0 0K 0K 78643K 20 0 0 proc 42 30K 54K 78643K 459 0 0 subproc 32 2K 2K 78643K 36 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 139 0 0 in_multi 33 2K 2K 78643K 78 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 328 0 0 pfkey data 0 0K 0K 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 93 20K 29K 78643K 4260 0 0 UVM aobj 68 3K 3K 78643K 79 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 76 0 0 NDP 11 0K 0K 78643K 50 0 0 temp 164 2727K 2796K 78643K 7474 0 0 kqueue 0 0K 0K 78643K 7 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 0 1 0 1 1 0 8 0 rtpcb 80 73 0 71 1 0 1 1 0 8 0 rtentry 112 50 0 4 2 0 2 2 0 8 0 unpcb 120 475 0 465 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1274 0 1274 1 1 0 1 0 8 0 tcpcb 544 218 0 214 1 0 1 1 0 8 0 inpcb 280 671 0 662 2 1 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 12 0 12 3 3 0 1 0 8 0 ppxss 1128 20 0 20 5 4 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 46 0 5 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 5 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 153 0 143 1 0 1 1 0 8 0 shmpl 112 77 0 11 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3786 0 2371 46 0 46 46 0 8 0 ffsino 240 3786 0 2371 84 0 84 84 0 8 0 nchpl 144 5976 0 4340 61 0 61 61 0 8 0 uvmvnodes 72 4684 0 0 86 0 86 86 0 8 0 vnodes 200 4684 0 0 247 0 247 247 0 8 0 namei 1024 18294 0 18294 1 0 1 1 0 8 1 scsiplug 64 12 0 12 7 6 1 1 0 8 1 scxspl 192 16771 0 16771 10 9 1 7 0 8 1 plimitpl 152 127 0 120 1 0 1 1 0 8 0 sigapl 432 1615 0 1601 2 0 2 2 0 8 0 futexpl 56 24252 0 24250 1 0 1 1 0 8 0 knotepl 112 332 0 313 1 0 1 1 0 8 0 kqueuepl 104 385 0 383 1 0 1 1 0 8 0 pipepl 112 954 0 935 4 3 1 2 0 8 0 fdescpl 424 1616 0 1601 2 0 2 2 0 8 0 filepl 120 9749 0 9651 6 2 4 5 0 8 0 lockfpl 104 557 0 557 2 1 1 1 0 8 1 lockfspl 48 193 0 193 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 35 0 25 1 0 1 1 0 8 0 ucredpl 96 1893 0 1886 1 0 1 1 0 8 0 zombiepl 144 1602 0 1601 1 0 1 1 0 8 0 processpl 864 1631 0 1601 4 0 4 4 0 8 0 procpl 632 3503 0 3463 4 0 4 4 0 8 0 sosppl 128 33 0 33 7 6 1 1 0 8 1 sockpl 384 1244 0 1225 4 1 3 4 0 8 1 mcl64k 65536 58 0 58 3 2 1 1 0 8 1 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 29 0 29 6 5 1 1 0 8 1 mcl9k 9216 34 0 34 4 3 1 1 0 8 1 mcl8k 8192 25 0 25 3 2 1 1 0 8 1 mcl4k 4096 78 0 78 4 3 1 1 0 8 1 mcl2k2 2112 9 0 9 6 5 1 1 0 8 1 mcl2k 2048 55825 0 55786 16 10 6 11 0 8 0 mtagpl 80 45 0 23 2 1 1 1 0 8 0 mbufpl 256 95781 0 95685 13 5 8 9 0 8 0 bufpl 256 8491 0 3986 282 0 282 282 0 8 0 anonpl 16 148252 0 136650 102 39 63 63 0 62 15 amapchunkpl 152 6846 0 6732 18 9 9 9 0 158 4 amappl16 192 8800 0 8155 75 34 41 45 0 8 8 amappl14 176 54 0 49 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 15 0 13 1 0 1 1 0 8 0 amappl11 152 51 0 40 1 0 1 1 0 8 0 amappl10 144 747 0 743 1 0 1 1 0 8 0 amappl9 136 554 0 550 1 0 1 1 0 8 0 amappl8 128 123 0 111 1 0 1 1 0 8 0 amappl7 120 710 0 705 1 0 1 1 0 8 0 amappl6 112 64 0 54 1 0 1 1 0 8 0 amappl5 104 157 0 147 1 0 1 1 0 8 0 amappl4 96 1852 0 1826 1 0 1 1 0 8 0 amappl3 88 240 0 229 1 0 1 1 0 8 0 amappl2 80 12211 0 12137 3 1 2 3 0 8 0 amappl1 72 38074 0 37629 26 17 9 19 0 8 0 amappl 80 3759 0 3718 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 78 0 11 2 0 2 2 0 8 0 uaddrrnd 24 1616 0 1601 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1616 0 1601 1 0 1 1 0 8 0 vmmpekpl 168 13726 0 13703 2 0 2 2 0 8 0 vmmpepl 168 192088 0 190280 123 35 88 89 0 357 9 vmsppl 272 1615 0 1601 2 1 1 2 0 8 0 pdppl 4096 3239 0 3202 6 1 5 6 0 8 0 pvpl 32 407891 0 393186 205 50 155 155 0 265 36 pmappl 200 1615 0 1601 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 436 0 29 12 0 12 12 0 8 0