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(fffffd802f8ecb48) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803923a4c8,ffff8000ffff2c70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803923a4c8,ffff8000ffff2c70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803923a4c8,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,ffff8000159ee150,ffff8000159ee1c0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159ee220) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7fffffb1a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffb170, 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(fffffd802f8ecb48) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803923a4c8,ffff8000ffff2c70) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803923a4c8,ffff8000ffff2c70) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803923a4c8,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,ffff8000159ee150,ffff8000159ee1c0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159ee220) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7fffffb1a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffb170, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159ede40 rbx 0xffff8000159edef0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159ede00 r9 0x1 r10 0 r11 0x741bf2b74ff70a9a r12 0x3000000008 r13 0xffff8000159ede50 r14 0x100 r15 0x1 rip 0xffffffff818b9068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159ede30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=6915 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3160,0xffff8000ffff2518 process=0xffff8000ffff6370 user=0xffff8000159e9000, vmspace=0xfffffd803f00cdd0 estcpu=36, cpticks=16, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 9442 248871 52519 0 2 0x480 syz-executor.1 9442 324996 52519 0 3 0x4000080 ttyin syz-executor.1 9442 10134 52519 0 3 0x4000080 fsleep syz-executor.1 49416 40289 0 0 3 0x14200 bored sosplice 25303 117012 7417 0 2 0x482 syz-executor.0 52519 279629 7417 0 2 0x482 syz-executor.1 7417 389907 42752 0 3 0x82 thrsleep syz-fuzzer 7417 194335 42752 0 3 0x4000082 thrsleep syz-fuzzer 7417 452175 42752 0 3 0x4000082 thrsleep syz-fuzzer 7417 117327 42752 0 3 0x4000082 thrsleep syz-fuzzer 7417 117801 42752 0 3 0x4000082 kqread syz-fuzzer 7417 309695 42752 0 3 0x4000082 thrsleep syz-fuzzer 7417 316112 42752 0 3 0x4000082 thrsleep syz-fuzzer 42752 31433 53235 0 3 0x10008a pause ksh 53235 187775 72404 0 3 0x92 select sshd 21992 340482 1 0 3 0x100083 ttyin getty 72404 56211 1 0 3 0x80 select sshd 41830 368750 53098 73 2 0x100090 syslogd 53098 232639 1 0 3 0x100082 netio syslogd 96429 395813 1 77 3 0x100090 poll dhclient 84367 24816 1 0 3 0x80 poll dhclient 13231 452249 0 0 2 0x14200 zerothread 53063 410390 0 0 3 0x14200 aiodoned aiodoned 27977 176272 0 0 3 0x14200 syncer update 43980 308995 0 0 3 0x14200 cleaner cleaner 89583 269858 0 0 3 0x14200 reaper reaper 57148 412480 0 0 3 0x14200 pgdaemon pagedaemon 29259 175125 0 0 3 0x14200 bored crynlk 50555 267999 0 0 3 0x14200 bored crypto 44305 129497 0 0 3 0x40014200 acpi0 acpi0 30085 288920 0 0 3 0x14200 bored softnet 90605 150105 0 0 3 0x14200 bored systqmp 61815 494938 0 0 3 0x14200 bored systq 11658 62301 0 0 3 0x40014200 bored softclock 60754 109761 0 0 3 0x40014200 idle0 52921 271670 0 0 3 0x14200 bored smr 1 499828 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 9478 6336K 6786K 78643K 11261 0 0 pcb 13 8K 8K 78643K 41 0 0 rtable 108 3K 4K 78643K 239 0 0 ifaddr 48 11K 12K 78643K 71 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 37 0 0 iov 0 0K 16K 78643K 30 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1226 77K 77K 78643K 1461 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 6 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 38 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 280 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 42 30K 54K 78643K 408 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 34 0 0 in_multi 33 2K 2K 78643K 37 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 220 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 87 20K 21K 78643K 1469 0 0 UVM aobj 15 2K 2K 78643K 19 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 20 0 0 NDP 9 0K 0K 78643K 19 0 0 temp 123 2716K 2783K 78643K 3875 0 0 kqueue 0 0K 0K 78643K 5 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 6 0 0 1 0 1 1 0 8 0 rtpcb 80 25 0 23 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 121 0 111 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 561 0 561 1 1 0 1 0 8 0 tcpcb 544 50 0 46 1 0 1 1 0 8 0 inpcb 280 162 0 155 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 4 0 4 2 1 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 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 9 1 0 1 1 0 8 0 semapl 112 36 0 26 1 0 1 1 0 8 0 shmpl 112 17 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1841 0 424 46 0 46 46 0 8 0 ffsino 240 1841 0 424 84 0 84 84 0 8 0 nchpl 144 2449 0 807 61 0 61 61 0 8 0 uvmvnodes 72 2051 0 0 38 0 38 38 0 8 0 vnodes 200 2051 0 0 108 0 108 108 0 8 0 namei 1024 6556 0 6556 1 0 1 1 0 8 1 scxspl 192 6639 0 6639 9 6 3 6 0 8 3 plimitpl 152 26 0 19 1 0 1 1 0 8 0 sigapl 432 451 0 437 2 0 2 2 0 8 0 futexpl 56 4568 0 4567 1 0 1 1 0 8 0 knotepl 112 118 0 99 1 0 1 1 0 8 0 kqueuepl 104 68 0 66 1 0 1 1 0 8 0 pipepl 112 274 0 255 1 0 1 1 0 8 0 fdescpl 424 452 0 437 2 0 2 2 0 8 0 filepl 120 2521 0 2421 4 0 4 4 0 8 0 lockfpl 104 95 0 94 2 1 1 1 0 8 0 lockfspl 48 32 0 31 2 1 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 320 0 313 1 0 1 1 0 8 0 zombiepl 144 438 0 437 1 0 1 1 0 8 0 processpl 864 467 0 437 4 0 4 4 0 8 0 procpl 632 800 0 762 4 0 4 4 0 8 0 sosppl 128 6 0 6 2 1 1 1 0 8 1 sockpl 384 314 0 295 3 0 3 3 0 8 1 mcl64k 65536 7 0 7 1 0 1 1 0 8 1 mcl12k 12288 7 0 7 1 0 1 1 0 8 1 mcl9k 9216 3 0 3 2 2 0 1 0 8 0 mcl8k 8192 2 0 2 2 1 1 1 0 8 1 mcl4k 4096 25 0 25 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 55248 0 55210 13 7 6 11 0 8 0 mtagpl 80 10 0 2 2 1 1 1 0 8 0 mbufpl 256 88299 0 88218 12 5 7 10 0 8 0 bufpl 256 6270 0 1765 282 0 282 282 0 8 0 anonpl 16 48906 0 37462 49 2 47 48 0 62 0 amapchunkpl 152 1883 0 1770 8 3 5 7 0 158 0 amappl16 192 1909 0 1282 33 0 33 33 0 8 1 amappl15 184 2 0 1 1 0 1 1 0 8 0 amappl14 176 186 0 177 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 5 0 4 1 0 1 1 0 8 0 amappl11 152 54 0 43 1 0 1 1 0 8 0 amappl10 144 59 0 59 1 1 0 1 0 8 0 amappl9 136 678 0 673 1 0 1 1 0 8 0 amappl8 128 250 0 235 1 0 1 1 0 8 0 amappl7 120 29 0 26 1 0 1 1 0 8 0 amappl6 112 50 0 44 1 0 1 1 0 8 0 amappl5 104 140 0 130 1 0 1 1 0 8 0 amappl4 96 662 0 637 1 0 1 1 0 8 0 amappl3 88 298 0 286 1 0 1 1 0 8 0 amappl2 80 2825 0 2750 3 1 2 3 0 8 0 amappl1 72 17438 0 16996 25 16 9 19 0 8 0 amappl 80 1020 0 980 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 18 0 4 1 0 1 1 0 8 0 uaddrrnd 24 452 0 437 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 452 0 437 1 0 1 1 0 8 0 vmmpekpl 168 6913 0 6889 2 0 2 2 0 8 0 vmmpepl 168 59070 0 57288 95 17 78 89 0 357 0 vmsppl 272 451 0 437 2 1 1 2 0 8 0 pdppl 4096 911 0 874 6 1 5 6 0 8 0 pvpl 32 165093 0 150599 124 1 123 124 0 265 5 pmappl 200 451 0 437 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 424 0 18 12 0 12 12 0 8 0