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(fffffd803bcd6bb8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803bab33d8,ffff8000ffff2508) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803bab33d8,ffff8000ffff2508) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803bab33d8,ffff8000ffff2508) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2508) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2508,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2508,ffff800015a0b440,ffff800015a0b4b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800015a0b510) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffce174) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffce140, 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(fffffd803bcd6bb8) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd803bab33d8,ffff8000ffff2508) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd803bab33d8,ffff8000ffff2508) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd803bab33d8,ffff8000ffff2508) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2508) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2508,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2508,ffff800015a0b440,ffff800015a0b4b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800015a0b510) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffce174) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffce140, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800015a0b130 rbx 0xffff800015a0b1e0 rdx 0x2 rcx 0 rax 0 r8 0xffff800015a0b0f0 r9 0x1 r10 0 r11 0xddbc70a22fcf7b89 r12 0x3000000008 r13 0xffff800015a0b140 r14 0x100 r15 0x1 rip 0xffffffff81126a98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015a0b120 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=212550 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3650,0xffffffff82298b28 process=0xffff8000ffff66d0 user=0xffff800015a06000, vmspace=0xfffffd803f014000 estcpu=36, cpticks=16, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 87176 461088 0 0 3 0x14200 bored sosplice 55053 145677 1 0 3 0x100083 ttyin getty 74357 446977 86451 0 2 0x482 syz-executor.1 75925 293267 86451 0 2 0x482 syz-executor.0 86451 58163 77678 0 3 0x82 thrsleep syz-fuzzer 86451 389733 77678 0 3 0x4000082 thrsleep syz-fuzzer 86451 386171 77678 0 2 0x4000482 syz-fuzzer 86451 193081 77678 0 3 0x4000082 thrsleep syz-fuzzer 86451 310403 77678 0 3 0x4000082 thrsleep syz-fuzzer 86451 285501 77678 0 3 0x4000082 kqread syz-fuzzer 86451 131772 77678 0 3 0x4000082 thrsleep syz-fuzzer 77678 129328 90878 0 3 0x10008a pause ksh 90878 255931 96865 0 3 0x92 select sshd 96865 458976 1 0 3 0x80 select sshd 25425 424629 68473 73 2 0x100090 syslogd 68473 292423 1 0 3 0x100082 netio syslogd 79577 95212 1 77 3 0x100090 poll dhclient 99560 187823 1 0 3 0x80 poll dhclient 65847 372310 0 0 2 0x14200 zerothread 23987 154941 0 0 3 0x14200 aiodoned aiodoned 9879 406726 0 0 3 0x14200 syncer update 99134 414412 0 0 3 0x14200 cleaner cleaner 55098 284875 0 0 3 0x14200 reaper reaper 37275 444814 0 0 3 0x14200 pgdaemon pagedaemon 60497 77163 0 0 3 0x14200 bored crynlk 27511 58690 0 0 3 0x14200 bored crypto 29146 1647 0 0 3 0x40014200 acpi0 acpi0 53252 362802 0 0 3 0x14200 bored softnet 91447 505970 0 0 3 0x14200 bored systqmp 42720 165892 0 0 3 0x14200 bored systq 29592 61899 0 0 3 0x40014200 bored softclock 68203 334358 0 0 3 0x40014200 idle0 29173 475095 0 0 3 0x14200 bored smr 1 431504 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 9500 6466K 14516K 78643K 13154 0 0 pcb 13 8K 8K 78643K 119 0 0 rtable 113 4K 4K 78643K 370 0 0 ifaddr 52 12K 13K 78643K 131 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 65 0 0 iov 0 0K 16K 78643K 114 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 77K 78643K 2127 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 13 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 92 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 1009 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 41 30K 54K 78643K 440 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 104 0 0 in_multi 33 2K 2K 78643K 85 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 274 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 91 21K 36K 78643K 3197 0 0 UVM aobj 57 2K 2K 78643K 58 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 64 0 0 NDP 10 0K 0K 78643K 36 0 0 temp 156 2723K 2791K 78643K 6114 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 48 0 46 1 0 1 1 0 8 0 rtentry 112 46 0 1 2 0 2 2 0 8 0 unpcb 120 363 0 353 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 491 0 491 2 2 0 1 0 8 0 tcpcb 544 203 0 199 1 0 1 1 0 8 0 inpcb 280 535 0 526 2 1 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 ppxss 1128 10 0 10 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 190 0 0 12 0 12 12 0 8 0 art_table 32 191 0 0 2 0 2 2 0 8 0 art_node 16 45 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 90 0 80 1 0 1 1 0 8 0 shmpl 112 56 0 1 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3007 0 1595 46 0 46 46 0 8 0 ffsino 240 3007 0 1595 84 0 84 84 0 8 0 nchpl 144 4643 0 3013 62 0 62 62 0 8 0 uvmvnodes 72 3668 0 0 67 0 67 67 0 8 0 vnodes 200 3668 0 0 194 0 194 194 0 8 0 namei 1024 13354 0 13354 2 1 1 1 0 8 1 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 13053 0 13053 13 12 1 6 0 8 1 plimitpl 152 85 0 78 1 0 1 1 0 8 0 sigapl 432 1181 0 1168 2 0 2 2 0 8 0 futexpl 56 16418 0 16418 1 0 1 1 0 8 1 knotepl 112 260 0 241 1 0 1 1 0 8 0 kqueuepl 104 251 0 249 1 0 1 1 0 8 0 pipepl 112 786 0 767 5 4 1 2 0 8 0 fdescpl 424 1182 0 1168 2 0 2 2 0 8 0 filepl 120 6924 0 6829 4 0 4 4 0 8 0 lockfpl 104 310 0 310 2 1 1 1 0 8 1 lockfspl 48 120 0 120 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 24 0 14 1 0 1 1 0 8 0 ucredpl 96 1223 0 1216 1 0 1 1 0 8 0 zombiepl 144 1169 0 1167 2 1 1 1 0 8 0 processpl 864 1197 0 1167 4 0 4 4 0 8 0 procpl 632 2469 0 2433 4 0 4 4 0 8 0 sosppl 128 9 0 9 3 2 1 1 0 8 1 sockpl 384 964 0 945 3 0 3 3 0 8 1 mcl64k 65536 535 0 535 33 32 1 32 0 8 1 mcl16k 16384 4 0 4 3 3 0 1 0 8 0 mcl12k 12288 22 0 22 2 1 1 1 0 8 1 mcl9k 9216 15 0 15 4 3 1 1 0 8 1 mcl8k 8192 22 0 22 3 2 1 1 0 8 1 mcl4k 4096 42 0 42 4 3 1 1 0 8 1 mcl2k2 2112 9 0 9 3 3 0 1 0 8 0 mcl2k 2048 55910 0 55864 15 8 7 12 0 8 0 mtagpl 80 18 0 9 2 1 1 1 0 8 0 mbufpl 256 93341 0 93263 27 21 6 22 0 8 0 bufpl 256 7966 0 3460 282 0 282 282 0 8 0 anonpl 16 122711 0 111198 81 18 63 63 0 62 15 amapchunkpl 152 5374 0 5269 23 15 8 18 0 158 3 amappl16 192 6449 0 5810 71 31 40 45 0 8 7 amappl15 184 484 0 482 1 0 1 1 0 8 0 amappl14 176 53 0 47 1 0 1 1 0 8 0 amappl13 168 7 0 6 1 0 1 1 0 8 0 amappl12 160 14 0 12 1 0 1 1 0 8 0 amappl11 152 48 0 37 1 0 1 1 0 8 0 amappl10 144 555 0 553 1 0 1 1 0 8 0 amappl9 136 554 0 550 1 0 1 1 0 8 0 amappl8 128 122 0 108 1 0 1 1 0 8 0 amappl7 120 529 0 525 1 0 1 1 0 8 0 amappl6 112 50 0 45 1 0 1 1 0 8 0 amappl5 104 153 0 141 1 0 1 1 0 8 0 amappl4 96 1415 0 1389 1 0 1 1 0 8 0 amappl3 88 211 0 201 1 0 1 1 0 8 0 amappl2 80 9157 0 9090 4 2 2 3 0 8 0 amappl1 72 29264 0 28861 26 17 9 19 0 8 0 amappl 80 2711 0 2675 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 57 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1182 0 1168 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1182 0 1168 1 0 1 1 0 8 0 vmmpekpl 168 11039 0 11012 2 0 2 2 0 8 0 vmmpepl 168 143386 0 141719 125 40 85 89 0 357 10 vmsppl 272 1181 0 1168 2 1 1 2 0 8 0 pdppl 4096 2370 0 2336 6 1 5 6 0 8 0 pvpl 32 331060 0 316558 179 23 156 156 0 265 37 pmappl 200 1181 0 1168 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 480 0 74 13 0 13 13 0 8 0