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(fffffd802b0e7640) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802ff854b0,ffff8000ffff29f8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802ff854b0,ffff8000ffff29f8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802ff854b0,ffff8000ffff29f8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff29f8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff29f8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff29f8,ffff8000149966d0,ffff800014996740) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149967a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffc68b4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc6880, 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(fffffd802b0e7640) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802ff854b0,ffff8000ffff29f8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802ff854b0,ffff8000ffff29f8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802ff854b0,ffff8000ffff29f8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff29f8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff29f8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff29f8,ffff8000149966d0,ffff800014996740) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149967a0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffc68b4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc6880, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149963c0 rbx 0xffff800014996470 rdx 0x2 rcx 0 rax 0 r8 0xffff800014996380 r9 0x1 r10 0 r11 0xda9643c358927e74 r12 0x3000000008 r13 0xffff8000149963d0 r14 0x100 r15 0x1 rip 0xffffffff811134d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149963b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=80869 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3b40,0xffffffff822b8940 process=0xffff8000ffff6a30 user=0xffff800014991000, vmspace=0xfffffd803f014440 estcpu=36, cpticks=16, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 90445 275536 94950 0 2 0x480 syz-executor.1 90445 217513 94950 0 3 0x4000080 kqread syz-executor.1 45439 138437 1 0 3 0x100083 ttyin getty 94950 252613 32498 0 2 0x482 syz-executor.1 10120 459573 0 0 3 0x14200 bored sosplice 25973 459855 32498 0 2 0x482 syz-executor.0 32498 518763 96885 0 3 0x82 thrsleep syz-fuzzer 32498 443729 96885 0 3 0x4000082 thrsleep syz-fuzzer 32498 239427 96885 0 3 0x4000082 kqread syz-fuzzer 32498 468698 96885 0 3 0x4000082 thrsleep syz-fuzzer 32498 228559 96885 0 3 0x4000082 thrsleep syz-fuzzer 32498 57007 96885 0 3 0x4000082 thrsleep syz-fuzzer 32498 45543 96885 0 3 0x4000082 thrsleep syz-fuzzer 96885 243846 76738 0 3 0x10008a pause ksh 76738 197 60744 0 3 0x92 select sshd 60744 481595 1 0 3 0x80 select sshd 26257 360181 44475 73 2 0x100090 syslogd 44475 479701 1 0 3 0x100082 netio syslogd 65111 97426 1 77 3 0x100090 poll dhclient 44518 241161 1 0 3 0x80 poll dhclient 99137 77643 0 0 2 0x14200 zerothread 43815 355592 0 0 3 0x14200 aiodoned aiodoned 50110 89297 0 0 3 0x14200 syncer update 90966 16027 0 0 3 0x14200 cleaner cleaner 3175 54861 0 0 3 0x14200 reaper reaper 22964 366757 0 0 3 0x14200 pgdaemon pagedaemon 37304 382661 0 0 3 0x14200 bored crynlk 28388 193751 0 0 3 0x14200 bored crypto 89141 94772 0 0 3 0x40014200 acpi0 acpi0 15051 171862 0 0 3 0x14200 bored softnet 74217 365141 0 0 3 0x14200 bored systqmp 32707 434761 0 0 3 0x14200 bored systq 60344 26141 0 0 3 0x40014200 bored softclock 75940 458649 0 0 3 0x40014200 idle0 17320 313505 0 0 3 0x14200 bored smr 1 105484 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 9570 6392K 14746K 78643K 37273 0 0 pcb 13 8K 8K 78643K 659 0 0 rtable 126 12K 13K 78643K 1853 0 0 ifaddr 77 18K 20K 78643K 908 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 497 0 0 iov 0 0K 32K 78643K 1162 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 77K 78643K 10427 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 130 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 1050 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 9742 0 0 sigio 4 0K 0K 78643K 132 0 0 proc 43 30K 54K 78643K 1221 0 0 subproc 32 2K 2K 78643K 69 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 829 0 0 in_multi 33 2K 2K 78643K 359 0 0 ether_multi 1 0K 0K 78643K 60 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 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 1082 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 94 21K 36K 78643K 23526 0 0 UVM aobj 130 4K 4K 78643K 160 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 377 0 0 NDP 18 0K 0K 78643K 243 0 0 temp 213 2728K 2856K 78643K 33308 0 0 kqueue 0 0K 0K 78643K 72 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 12 0 4 1 0 1 1 0 8 0 rtpcb 80 415 0 413 1 0 1 1 0 8 0 rtentry 112 74 0 27 2 0 2 2 0 8 0 unpcb 120 3124 0 3114 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 702 0 702 1 1 0 1 0 8 0 tcpcb 544 1408 0 1404 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 3837 0 3824 13 11 2 2 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 50 0 50 20 20 0 1 0 8 0 ppxss 1128 181 0 181 19 18 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 237 0 45 12 0 12 12 0 8 0 art_table 32 238 0 45 2 0 2 2 0 8 0 art_node 16 60 0 18 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 6 1 0 1 1 0 8 0 semapl 112 1048 0 1038 1 0 1 1 0 8 0 shmpl 112 158 0 30 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 17149 0 15739 46 0 46 46 0 8 0 ffsino 240 17149 0 15739 84 0 84 84 0 8 0 nchpl 144 30772 0 29152 64 2 62 62 0 8 0 uvmvnodes 72 7766 0 0 142 0 142 142 0 8 0 vnodes 200 7766 0 0 409 0 409 409 0 8 0 namei 1024 100771 0 100771 3 2 1 1 0 8 1 scsiplug 64 21 0 21 12 12 0 1 0 8 0 scxspl 192 98346 0 98346 45 44 1 6 0 8 1 plimitpl 152 877 0 870 1 0 1 1 0 8 0 sigapl 432 9912 0 9898 2 0 2 2 0 8 0 futexpl 56 161711 0 161711 1 0 1 1 0 8 1 knotepl 112 2006 0 1987 2 1 1 2 0 8 0 kqueuepl 104 2376 0 2373 1 0 1 1 0 8 0 pipepl 112 5558 0 5539 12 10 2 2 0 8 1 fdescpl 424 9913 0 9898 2 0 2 2 0 8 0 filepl 120 60468 0 60372 9 5 4 5 0 8 0 lockfpl 104 3595 0 3595 3 2 1 1 0 8 1 lockfspl 48 1198 0 1198 3 2 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 127 0 117 1 0 1 1 0 8 0 ucredpl 96 13459 0 13452 1 0 1 1 0 8 0 zombiepl 144 9899 0 9898 3 2 1 1 0 8 0 processpl 864 9928 0 9898 4 0 4 4 0 8 0 procpl 632 22392 0 22355 4 0 4 4 0 8 0 sosppl 128 117 0 117 27 26 1 1 0 8 1 sockpl 384 7508 0 7489 7 4 3 4 0 8 1 mcl64k 65536 1790 0 1790 213 192 21 65 0 8 21 mcl16k 16384 34 0 34 21 21 0 1 0 8 0 mcl12k 12288 182 0 182 22 21 1 1 0 8 1 mcl9k 9216 136 0 136 27 26 1 1 0 8 1 mcl8k 8192 157 0 157 24 23 1 1 0 8 1 mcl4k 4096 461 0 461 11 10 1 1 0 8 1 mcl2k2 2112 57 0 57 24 24 0 1 0 8 0 mcl2k 2048 68894 0 68850 17 11 6 11 0 8 0 mtagpl 80 241 0 166 3 1 2 2 0 8 0 mbufpl 256 157602 0 157380 114 99 15 43 0 8 0 bufpl 256 35079 0 27318 486 0 486 486 0 8 0 anonpl 16 852465 0 840732 306 250 56 66 0 62 6 amapchunkpl 152 42121 0 42013 125 119 6 18 0 158 0 amappl16 192 58214 0 57566 322 288 34 46 0 8 1 amappl15 184 5 0 4 1 0 1 1 0 8 0 amappl14 176 59 0 52 1 0 1 1 0 8 0 amappl13 168 1945 0 1945 2 2 0 1 0 8 0 amappl12 160 20 0 18 1 0 1 1 0 8 0 amappl11 152 56 0 45 1 0 1 1 0 8 0 amappl10 144 2917 0 2915 4 3 1 1 0 8 0 amappl9 136 573 0 570 1 0 1 1 0 8 0 amappl8 128 140 0 121 1 0 1 1 0 8 0 amappl7 120 2875 0 2871 1 0 1 1 0 8 0 amappl6 112 65 0 54 1 0 1 1 0 8 0 amappl5 104 209 0 199 1 0 1 1 0 8 0 amappl4 96 10190 0 10163 1 0 1 1 0 8 0 amappl3 88 515 0 503 1 0 1 1 0 8 0 amappl2 80 78714 0 78639 4 2 2 3 0 8 0 amappl1 72 180270 0 179846 26 17 9 19 0 8 0 amappl 80 22758 0 22720 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 159 0 30 3 0 3 3 0 8 0 uaddrrnd 24 9913 0 9898 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9913 0 9898 1 0 1 1 0 8 0 vmmpekpl 168 54448 0 54421 2 0 2 2 0 8 0 vmmpepl 168 1132048 0 1130253 287 208 79 95 0 357 0 vmsppl 272 9912 0 9898 2 1 1 2 0 8 0 pdppl 4096 19832 0 19796 6 1 5 6 0 8 0 pvpl 32 2498428 0 2483505 633 484 149 244 0 265 27 pmappl 200 9912 0 9898 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1000 0 362 25 5 20 21 0 8 0