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(fffffd8027b55e20) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803a426970,ffff8000ffff3650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803a426970,ffff8000ffff3650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803a426970,ffff8000ffff3650) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3650) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3650,ffff800016bca920,ffff800016bca990) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016bca9f0) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffcbb24) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcbaf0, 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(fffffd8027b55e20) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803a426970,ffff8000ffff3650) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803a426970,ffff8000ffff3650) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803a426970,ffff8000ffff3650) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff3650) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff3650,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff3650,ffff800016bca920,ffff800016bca990) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800016bca9f0) at syscall+0x508 Xsyscall(0,1,0,1,0,7f7ffffcbb24) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcbaf0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800016bca610 rbx 0xffff800016bca6c0 rdx 0x2 rcx 0 rax 0 r8 0xffff800016bca5d0 r9 0x1 r10 0 r11 0x3c59ebe679ba989c r12 0x3000000008 r13 0xffff800016bca620 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016bca600 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=269424 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3160,0xffffffff822c3530 process=0xffff800014943b18 user=0xffff800016bc5000, vmspace=0xfffffd803f013440 estcpu=36, cpticks=10, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 65341 323227 1 0 3 0x100083 ttyin getty 26522 515109 99003 0 2 0x482 syz-executor.1 65584 27069 99003 0 2 0x482 syz-executor.0 13728 350444 0 0 3 0x14200 bored sosplice 99003 168717 54524 0 3 0x82 thrsleep syz-fuzzer 99003 149198 54524 0 3 0x4000082 thrsleep syz-fuzzer 99003 423604 54524 0 3 0x4000082 thrsleep syz-fuzzer 99003 189669 54524 0 3 0x4000082 thrsleep syz-fuzzer 99003 330726 54524 0 3 0x4000082 thrsleep syz-fuzzer 99003 498204 54524 0 3 0x4000082 kqread syz-fuzzer 99003 446853 54524 0 3 0x4000082 thrsleep syz-fuzzer 54524 242638 1806 0 3 0x10008a pause ksh 1806 16571 59962 0 3 0x92 select sshd 59962 16860 1 0 3 0x80 select sshd 23355 53040 5206 73 2 0x100090 syslogd 5206 284046 1 0 3 0x100082 netio syslogd 12527 363527 1 77 3 0x100090 poll dhclient 42934 355756 1 0 3 0x80 poll dhclient 95264 402136 0 0 2 0x14200 zerothread 1031 207150 0 0 3 0x14200 aiodoned aiodoned 78750 106296 0 0 3 0x14200 syncer update 42061 157908 0 0 3 0x14200 cleaner cleaner 26409 228057 0 0 3 0x14200 reaper reaper 65221 441226 0 0 3 0x14200 pgdaemon pagedaemon 67915 305604 0 0 3 0x14200 bored crynlk 56523 146842 0 0 3 0x14200 bored crypto 52444 475505 0 0 3 0x40014200 acpi0 acpi0 41829 391303 0 0 3 0x14200 bored softnet 64776 269841 0 0 3 0x14200 bored systqmp 30568 294604 0 0 3 0x14200 bored systq 76643 81073 0 0 3 0x40014200 bored softclock 30791 25170 0 0 3 0x40014200 idle0 32960 61295 0 0 3 0x14200 bored smr 1 87319 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 9595 6511K 14825K 78643K 58648 0 0 pcb 13 8K 8K 78643K 1224 0 0 rtable 120 12K 12K 78643K 3490 0 0 ifaddr 82 23K 27K 78643K 1509 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 884 0 0 iov 0 0K 32K 78643K 2392 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 77K 78643K 18139 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 236 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 1723 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 17408 0 0 sigio 2 0K 0K 78643K 277 0 0 proc 43 30K 54K 78643K 2874 0 0 subproc 32 2K 2K 78643K 313 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 1719 0 0 in_multi 33 2K 2K 78643K 753 0 0 ether_multi 1 0K 0K 78643K 67 0 0 mrt 0 0K 0K 78643K 23 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 2112 0 0 pfkey data 0 0K 1K 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 104 21K 36K 78643K 41941 0 0 UVM aobj 130 4K 4K 78643K 149 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 643 0 0 NDP 20 0K 1K 78643K 428 0 0 temp 226 2728K 3368K 78643K 58580 0 0 kqueue 0 0K 0K 78643K 129 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 41 0 34 1 0 1 1 0 8 0 rtpcb 80 743 0 741 1 0 1 1 0 8 0 rtentry 112 235 0 189 3 1 2 2 0 8 0 unpcb 120 5641 0 5631 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 1199 0 1199 2 2 0 1 0 8 0 tcpcb 544 2502 0 2498 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 7023 0 7012 6 4 2 2 0 8 1 nd6 48 51 0 45 2 1 1 1 0 8 0 pkpcb 40 91 0 91 31 31 0 1 0 8 0 swfcl 56 8 0 0 1 0 1 1 0 8 0 ppxss 1128 288 0 288 57 56 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 903 0 707 23 10 13 13 0 8 0 art_table 32 904 0 707 3 1 2 2 0 8 0 art_node 16 215 0 174 1 0 1 1 0 8 0 sysvmsgpl 40 28 0 16 1 0 1 1 0 8 0 semapl 112 1721 0 1711 1 0 1 1 0 8 0 shmpl 112 147 0 19 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 29519 0 28102 46 0 46 46 0 8 0 ffsino 240 29519 0 28102 84 0 84 84 0 8 0 nchpl 144 53986 0 52354 63 2 61 62 0 8 0 uvmvnodes 72 7809 0 0 142 0 142 142 0 8 0 vnodes 200 7809 0 0 411 0 411 411 0 8 0 namei 1024 177837 0 177837 10 9 1 1 0 8 1 scsiplug 64 33 0 33 19 19 0 1 0 8 0 scxspl 192 190863 0 190863 88 87 1 6 0 8 1 plimitpl 152 1404 0 1397 1 0 1 1 0 8 0 sigapl 432 17548 0 17535 2 0 2 2 0 8 0 futexpl 56 291181 0 291181 12 11 1 1 0 8 1 knotepl 112 3420 0 3401 1 0 1 1 0 8 0 kqueuepl 104 4242 0 4240 1 0 1 1 0 8 0 pipepl 112 9778 0 9759 16 15 1 2 0 8 0 fdescpl 424 17549 0 17535 2 0 2 2 0 8 0 filepl 120 107298 0 107203 19 15 4 5 0 8 0 lockfpl 104 6592 0 6592 21 20 1 1 0 8 1 lockfspl 48 2207 0 2207 21 20 1 1 0 8 1 sessionpl 112 46 0 36 1 0 1 1 0 8 0 pgrppl 48 228 0 218 1 0 1 1 0 8 0 ucredpl 96 23207 0 23200 1 0 1 1 0 8 0 zombiepl 144 17536 0 17534 4 3 1 1 0 8 0 processpl 864 17564 0 17534 4 0 4 4 0 8 0 procpl 632 39799 0 39763 4 0 4 4 0 8 0 sosppl 128 214 0 214 48 47 1 1 0 8 1 sockpl 384 13680 0 13661 27 24 3 4 0 8 1 mcl64k 65536 3343 0 3343 331 302 29 65 0 8 29 mcl16k 16384 58 0 58 40 40 0 1 0 8 0 mcl12k 12288 332 0 332 47 46 1 1 0 8 1 mcl9k 9216 236 0 236 59 58 1 1 0 8 1 mcl8k 8192 262 0 262 60 59 1 1 0 8 1 mcl4k 4096 788 0 788 19 18 1 1 0 8 1 mcl2k2 2112 104 0 104 45 45 0 1 0 8 0 mcl2k 2048 82940 0 82891 28 21 7 12 0 8 0 mtagpl 80 487 0 424 8 6 2 2 0 8 0 mbufpl 256 218018 0 217812 183 160 23 45 0 8 8 bufpl 256 53810 0 46001 489 0 489 489 0 8 0 anonpl 16 1561382 0 1549467 501 436 65 81 0 62 8 amapchunkpl 152 75656 0 75553 190 184 6 18 0 158 1 amappl16 192 96424 0 95752 530 484 46 58 0 8 11 amappl15 184 2361 0 2359 7 6 1 1 0 8 0 amappl14 176 2032 0 2024 1 0 1 1 0 8 0 amappl13 168 4334 0 4334 3 3 0 1 0 8 0 amappl12 160 654 0 651 1 0 1 1 0 8 0 amappl11 152 2678 0 2666 1 0 1 1 0 8 0 amappl10 144 2343 0 2343 18 18 0 1 0 8 0 amappl9 136 3933 0 3930 1 0 1 1 0 8 0 amappl8 128 3462 0 3430 3 1 2 2 0 8 0 amappl7 120 2339 0 2333 1 0 1 1 0 8 0 amappl6 112 2655 0 2643 1 0 1 1 0 8 0 amappl5 104 1009 0 998 1 0 1 1 0 8 0 amappl4 96 16240 0 16216 1 0 1 1 0 8 0 amappl3 88 5201 0 5186 1 0 1 1 0 8 0 amappl2 80 140745 0 140678 4 2 2 3 0 8 0 amappl1 72 311848 0 311439 25 16 9 19 0 8 0 amappl 80 40471 0 40436 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 148 0 19 3 0 3 3 0 8 0 uaddrrnd 24 17549 0 17535 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 17549 0 17535 1 0 1 1 0 8 0 vmmpekpl 168 109828 0 109799 2 0 2 2 0 8 0 vmmpepl 168 2022487 0 2020759 556 465 91 102 0 357 10 vmsppl 272 17548 0 17535 7 6 1 2 0 8 0 pdppl 4096 35104 0 35070 8 3 5 6 0 8 0 pvpl 32 4506796 0 4491746 1227 1068 159 269 0 265 31 pmappl 200 17548 0 17535 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1289 0 630 25 5 20 21 0 8 0