panic: vput: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 404348 84030 0 0x14000 0x200 1 reaper 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(fffffd8066250c38) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd806e8e1c80,ffff800020b28290) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd806e8e1c80,ffff800020b28290) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd806e8e1c80,ffff800020b28290) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28290) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28290,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28290,ffff800020b23d70,ffff800020b23de0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020b23e50) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020b23e50) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe0294) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0260, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic vput: v_writecount != 0 ddb{0}> 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(fffffd8066250c38) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd806e8e1c80,ffff800020b28290) at vn_closefile+0x15b sys/kern/vfs_vnops.c:583 fdrop(fffffd806e8e1c80,ffff800020b28290) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd806e8e1c80,ffff800020b28290) at closef+0x11d sys/kern/kern_descrip.c:1253 fdfree(ffff800020b28290) at fdfree+0xf8 sys/kern/kern_descrip.c:1185 exit1(ffff800020b28290,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800020b28290,ffff800020b23d70,ffff800020b23de0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800020b23e50) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020b23e50) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,1,0,1,0,7f7ffffe0294) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0260, count: -11 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020b23a60 rbx 0xffff800020b23b10 rdx 0xffff800020b28290 rcx 0 rax 0 r8 0xffffffff81c83d13 kprintf+0x173 r9 0x1 r10 0x25 r11 0x22609646b2872b61 r12 0x3000000008 r13 0xffff800020b23a70 r14 0x100 r15 0x1 rip 0xffffffff81a69fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b23a50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=170336 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff800020b29650,0xffffffff82362638 process=0xffff800020b7ca80 user=0xffff800020b1e000, vmspace=0xfffffd807f00b2e0 estcpu=34, cpticks=10, pctcpu=0.0 user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 133 151038 1 0 3 0x100083 ttyin getty 51856 382211 0 0 3 0x14200 bored sosplice 60834 207643 41020 0 2 0x482 syz-executor.1 87694 356534 41020 0 2 0x482 syz-executor.0 41020 203891 26471 0 3 0x82 thrsleep syz-fuzzer 41020 461472 26471 0 2 0x4000482 syz-fuzzer 41020 163294 26471 0 3 0x4000082 thrsleep syz-fuzzer 41020 291802 26471 0 3 0x4000082 thrsleep syz-fuzzer 41020 292795 26471 0 3 0x4000082 thrsleep syz-fuzzer 41020 472021 26471 0 3 0x4000082 thrsleep syz-fuzzer 41020 43817 26471 0 3 0x4000082 thrsleep syz-fuzzer 41020 66250 26471 0 3 0x4000082 kqread syz-fuzzer 41020 370869 26471 0 3 0x4000082 thrsleep syz-fuzzer 41020 367231 26471 0 3 0x4000082 thrsleep syz-fuzzer 26471 460904 38962 0 3 0x10008a pause ksh 38962 310652 65270 0 3 0x92 select sshd 65270 270958 1 0 3 0x80 select sshd 72593 359057 19696 74 3 0x100092 bpf pflogd 19696 299555 1 0 3 0x80 netio pflogd 28567 37934 61970 73 2 0x100090 syslogd 61970 230465 1 0 3 0x100082 netio syslogd 25460 252582 1 77 3 0x100090 poll dhclient 70838 165529 1 0 3 0x80 poll dhclient 22086 129948 0 0 3 0x14200 pgzero zerothread 75835 331415 0 0 3 0x14200 aiodoned aiodoned 5235 388749 0 0 3 0x14200 syncer update 47127 454388 0 0 3 0x14200 cleaner cleaner 84030 404348 0 0 7 0x14200 reaper 70261 140520 0 0 3 0x14200 pgdaemon pagedaemon 29809 459691 0 0 3 0x14200 bored crynlk 92158 161883 0 0 3 0x14200 bored crypto 81381 67672 0 0 3 0x40014200 acpi0 acpi0 91951 359096 0 0 3 0x40014200 idle1 70568 504793 0 0 3 0x14200 bored softnet 31183 106176 0 0 3 0x14200 bored systqmp 66273 254171 0 0 3 0x14200 bored systq 98194 471374 0 0 3 0x40014200 bored softclock 95592 161562 0 0 3 0x40014200 idle0 73885 510614 0 0 2 0x14200 smr 1 164589 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9532 6417K 7184K 78643K 12458 0 0 pcb 13 8K 8K 78643K 50 0 0 rtable 113 4K 4K 78643K 304 0 0 ifaddr 62 13K 13K 78643K 103 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1516 0 0 iov 0 0K 16K 78643K 92 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1212 76K 77K 78643K 1864 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 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 98 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 738 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 53 50K 83K 78643K 502 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 86 0 0 in_multi 33 2K 2K 78643K 62 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 263 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 99 21K 25K 78643K 3313 0 0 UVM aobj 50 2K 2K 78643K 54 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 33 0 0 NDP 13 0K 0K 78643K 27 0 0 temp 176 2746K 2814K 78643K 5496 0 0 kqueue 0 0K 0K 78643K 5 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> 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 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 31 0 29 1 0 1 1 0 8 0 rtentry 112 47 0 2 2 0 2 2 0 8 0 unpcb 120 251 0 237 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7760 0 7760 3 3 0 2 0 8 0 tcpcb 544 117 0 113 1 0 1 1 0 8 0 inpcb 280 345 0 338 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 1 1 1 0 8 1 ppxss 1128 8 0 8 2 2 0 1 0 8 0 pffrag 232 2 0 2 1 1 0 1 0 482 0 pffrnode 88 2 0 2 1 1 0 1 0 8 0 pffrent 40 8 0 8 1 1 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 29 0 11 1 0 1 1 0 8 0 pfstkey 112 29 0 11 1 0 1 1 0 8 0 pfstate 328 29 0 11 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 212 0 23 14 2 12 14 0 8 0 art_table 32 213 0 23 2 0 2 2 0 8 0 art_node 16 46 0 5 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 6 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 96 0 86 1 0 1 1 0 8 0 shmpl 112 52 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2588 0 1172 47 0 47 47 0 8 0 ffsino 272 2588 0 1172 96 0 96 96 0 8 0 nchpl 144 3773 0 2120 62 0 62 62 0 8 0 uvmvnodes 72 3062 0 0 56 0 56 56 0 8 0 vnodes 200 3062 0 0 162 0 162 162 0 8 0 namei 1024 11233 0 11233 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 11025 0 11025 17 14 3 6 0 8 3 plimitpl 152 109 0 101 1 0 1 1 0 8 0 sigapl 432 939 0 924 3 1 2 3 0 8 0 futexpl 56 9252 0 9252 1 0 1 1 0 8 1 knotepl 112 147 0 128 1 0 1 1 0 8 0 kqueuepl 104 170 0 168 1 0 1 1 0 8 0 pipepl 112 686 0 667 3 2 1 2 0 8 0 fdescpl 488 940 0 924 3 0 3 3 0 8 0 filepl 152 5522 0 5420 7 2 5 6 0 8 0 lockfpl 104 211 0 211 2 1 1 1 0 8 1 lockfspl 48 81 0 81 2 1 1 1 0 8 1 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 26 0 15 1 0 1 1 0 8 0 ucredpl 96 979 0 970 1 0 1 1 0 8 0 zombiepl 144 925 0 923 3 2 1 1 0 8 0 processpl 896 956 0 923 4 0 4 4 0 8 0 procpl 632 2513 0 2470 7 2 5 5 0 8 1 srpgc 64 1 0 1 1 1 0 1 0 8 0 sosppl 128 10 0 10 2 2 0 1 0 8 0 sockpl 384 639 0 616 4 1 3 3 0 8 0 mcl64k 65536 6 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 249 0 0 30 0 30 30 0 8 0 mtagpl 80 6 0 0 1 0 1 1 0 8 0 mbufpl 256 289 0 0 17 0 17 17 0 8 0 bufpl 256 7447 0 1168 393 0 393 393 0 8 0 anonpl 16 102080 0 90411 82 18 64 64 0 125 14 amapchunkpl 152 5353 0 5237 14 8 6 10 0 158 0 amappl16 192 5114 0 4474 59 19 40 45 0 8 7 amappl14 176 51 0 47 1 0 1 1 0 8 0 amappl13 168 7 0 6 1 0 1 1 0 8 0 amappl12 160 13 0 12 2 1 1 1 0 8 0 amappl11 152 56 0 41 1 0 1 1 0 8 0 amappl10 144 416 0 411 1 0 1 1 0 8 0 amappl9 136 600 0 596 1 0 1 1 0 8 0 amappl8 128 151 0 132 1 0 1 1 0 8 0 amappl7 120 377 0 373 1 0 1 1 0 8 0 amappl6 112 69 0 59 1 0 1 1 0 8 0 amappl5 104 139 0 125 1 0 1 1 0 8 0 amappl4 96 1217 0 1187 2 1 1 2 0 8 0 amappl3 88 214 0 204 1 0 1 1 0 8 0 amappl2 80 6613 0 6542 4 2 2 3 0 8 0 amappl1 72 30080 0 29633 26 16 10 20 0 8 0 amappl 80 2781 0 2741 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 53 0 4 1 0 1 1 0 8 0 uaddrrnd 24 940 0 924 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 940 0 924 1 0 1 1 0 8 0 vmmpekpl 168 10830 0 10801 2 0 2 2 0 8 0 vmmpepl 168 119455 0 117680 141 49 92 96 0 357 12 vmsppl 368 939 0 924 2 0 2 2 0 8 0 pdppl 4096 1888 0 1848 6 0 6 6 0 8 0 pvpl 32 294999 0 280141 193 39 154 158 0 265 31 pmappl 232 939 0 924 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 573 0 6 17 0 17 17 0 8 0