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(fffffd8036194e88) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80383ac3d8,ffff8000ffff2780) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd80383ac3d8,ffff8000ffff2780) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80383ac3d8,ffff8000ffff2780) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2780) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2780,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2780,ffff80001492c260,ffff80001492c2d0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff80001492c330) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffef124) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffef0f0, 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(fffffd8036194e88) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd80383ac3d8,ffff8000ffff2780) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd80383ac3d8,ffff8000ffff2780) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd80383ac3d8,ffff8000ffff2780) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2780) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2780,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2780,ffff80001492c260,ffff80001492c2d0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff80001492c330) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffef124) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffef0f0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001492bf50 rbx 0xffff80001492c000 rdx 0x2 rcx 0 rax 0 r8 0xffff80001492bf10 r9 0x1 r10 0 r11 0x3a86c111f3672ff6 r12 0x3000000008 r13 0xffff80001492bf60 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001492bf40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=386616 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3650,0xffff8000ffff2028 process=0xffff8000ffff7450 user=0xffff800014927000, vmspace=0xfffffd803f013bb0 estcpu=36, cpticks=11, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 39058 501177 89153 0 2 0 syz-executor.1 39058 112528 89153 0 3 0x4000080 lockf syz-executor.1 39058 387068 89153 0 3 0x4000080 fsleep syz-executor.1 82686 261462 1 0 3 0x100083 ttyin getty 89153 522833 92519 0 2 0x482 syz-executor.1 35778 167378 0 0 3 0x14200 bored sosplice 16103 389311 92519 0 2 0x482 syz-executor.0 92519 480691 99272 0 3 0x82 kqread syz-fuzzer 92519 72597 99272 0 3 0x4000082 thrsleep syz-fuzzer 92519 9693 99272 0 3 0x4000082 thrsleep syz-fuzzer 92519 410194 99272 0 3 0x4000082 thrsleep syz-fuzzer 92519 5880 99272 0 3 0x4000082 thrsleep syz-fuzzer 92519 183872 99272 0 3 0x4000082 thrsleep syz-fuzzer 92519 199287 99272 0 3 0x4000082 thrsleep syz-fuzzer 99272 112840 18663 0 3 0x10008a pause ksh 18663 154592 84949 0 3 0x92 select sshd 84949 377033 1 0 3 0x80 select sshd 33468 182603 11641 73 2 0x100090 syslogd 11641 113601 1 0 3 0x100082 netio syslogd 41312 251302 1 77 3 0x100090 poll dhclient 67492 443340 1 0 3 0x80 poll dhclient 87225 340037 0 0 2 0x14200 zerothread 78108 70272 0 0 3 0x14200 aiodoned aiodoned 32276 265365 0 0 3 0x14200 syncer update 87435 318367 0 0 3 0x14200 cleaner cleaner 55987 491746 0 0 3 0x14200 reaper reaper 31084 276374 0 0 3 0x14200 pgdaemon pagedaemon 19055 221524 0 0 3 0x14200 bored crynlk 15404 522677 0 0 3 0x14200 bored crypto 44987 318529 0 0 3 0x40014200 acpi0 acpi0 25983 475997 0 0 3 0x14200 bored softnet 57492 194112 0 0 3 0x14200 bored systqmp 73113 435324 0 0 3 0x14200 bored systq 79701 454009 0 0 3 0x40014200 bored softclock 71678 308197 0 0 3 0x40014200 idle0 65310 78005 0 0 3 0x14200 bored smr 1 455878 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 9547 7006K 7642K 78643K 22382 0 0 pcb 13 8K 8K 78643K 351 0 0 rtable 115 4K 4K 78643K 863 0 0 ifaddr 71 16K 16K 78643K 381 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 219 0 0 iov 0 0K 28K 78643K 612 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 76K 77K 78643K 5175 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 53 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 462 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 4228 0 0 sigio 0 0K 0K 78643K 49 0 0 proc 42 30K 54K 78643K 821 0 0 subproc 32 2K 2K 78643K 57 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 446 0 0 in_multi 33 2K 2K 78643K 188 0 0 ether_multi 1 0K 0K 78643K 21 0 0 mrt 0 0K 0K 78643K 13 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 642 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 92 20K 30K 78643K 10724 0 0 UVM aobj 130 4K 4K 78643K 150 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 228 0 0 NDP 16 0K 0K 78643K 105 0 0 temp 198 2728K 3368K 78643K 16187 0 0 kqueue 0 0K 0K 78643K 36 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 11 0 3 1 0 1 1 0 8 0 rtpcb 80 201 0 199 1 0 1 1 0 8 0 rtentry 112 61 0 15 2 0 2 2 0 8 0 unpcb 120 1263 0 1253 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1069 0 1069 1 1 0 1 0 8 0 tcpcb 544 654 0 650 1 0 1 1 0 8 0 inpcb 280 1835 0 1825 3 2 1 2 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 10 0 10 4 4 0 1 0 8 0 swfcl 56 7 0 0 1 0 1 1 0 8 0 ppxss 1128 64 0 64 14 14 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 237 0 44 14 1 13 13 0 8 0 art_table 32 238 0 44 2 0 2 2 0 8 0 art_node 16 58 0 16 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 8 1 0 1 1 0 8 0 semupl 112 2 0 2 2 2 0 1 0 8 0 semapl 112 460 0 450 1 0 1 1 0 8 0 shmpl 112 148 0 20 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8111 0 6699 46 0 46 46 0 8 0 ffsino 240 8111 0 6699 84 0 84 84 0 8 0 nchpl 144 14215 0 12587 61 0 61 61 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 45461 0 45461 4 3 1 1 0 8 1 scsiplug 64 13 0 13 8 8 0 1 0 8 0 scxspl 192 44653 0 44653 16 14 2 7 0 8 2 plimitpl 152 364 0 357 1 0 1 1 0 8 0 sigapl 432 4398 0 4384 2 0 2 2 0 8 0 futexpl 56 71452 0 71451 3 2 1 1 0 8 0 knotepl 112 871 0 852 1 0 1 1 0 8 0 kqueuepl 104 1080 0 1078 1 0 1 1 0 8 0 pipepl 112 2366 0 2347 5 4 1 2 0 8 0 fdescpl 424 4399 0 4384 2 0 2 2 0 8 0 filepl 120 26088 0 25990 4 0 4 4 0 8 0 lockfpl 104 1563 0 1561 5 4 1 1 0 8 0 lockfspl 48 564 0 563 5 4 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 66 0 56 1 0 1 1 0 8 0 ucredpl 96 5318 0 5311 1 0 1 1 0 8 0 zombiepl 144 4385 0 4384 2 1 1 1 0 8 0 processpl 864 4414 0 4384 4 0 4 4 0 8 0 procpl 632 9858 0 9820 4 0 4 4 0 8 0 sosppl 128 37 0 37 13 13 0 1 0 8 0 sockpl 384 3349 0 3330 6 3 3 3 0 8 1 mcl64k 65536 1637 0 1637 135 134 1 33 0 8 1 mcl16k 16384 18 0 18 10 10 0 1 0 8 0 mcl12k 12288 75 0 75 14 13 1 1 0 8 1 mcl9k 9216 64 0 64 17 17 0 1 0 8 0 mcl8k 8192 76 0 76 15 15 0 1 0 8 0 mcl4k 4096 227 0 225 9 8 1 1 0 8 0 mcl2k2 2112 28 0 28 17 16 1 1 0 8 1 mcl2k 2048 61490 0 61440 19 12 7 13 0 8 0 mtagpl 80 146 0 75 3 1 2 2 0 8 0 mbufpl 256 119065 0 118837 92 76 16 30 0 8 0 bufpl 256 15957 0 11390 286 0 286 286 0 8 0 anonpl 16 381959 0 369859 206 140 66 66 0 62 16 amapchunkpl 152 17596 0 17486 40 28 12 12 0 158 7 amappl16 192 21542 0 20871 173 126 47 47 0 8 13 amappl15 184 2114 0 2112 1 0 1 1 0 8 0 amappl14 176 2168 0 2160 1 0 1 1 0 8 0 amappl13 168 603 0 602 2 1 1 1 0 8 0 amappl12 160 11 0 10 1 0 1 1 0 8 0 amappl11 152 55 0 44 1 0 1 1 0 8 0 amappl10 144 65 0 65 5 4 1 1 0 8 1 amappl9 136 2044 0 2039 1 0 1 1 0 8 0 amappl8 128 1611 0 1591 1 0 1 1 0 8 0 amappl7 120 33 0 29 1 0 1 1 0 8 0 amappl6 112 52 0 44 1 0 1 1 0 8 0 amappl5 104 194 0 184 1 0 1 1 0 8 0 amappl4 96 4660 0 4629 2 1 1 2 0 8 0 amappl3 88 327 0 316 1 0 1 1 0 8 0 amappl2 80 36800 0 36724 3 1 2 3 0 8 0 amappl1 72 83374 0 82938 26 17 9 19 0 8 0 amappl 80 10120 0 10081 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 149 0 20 3 0 3 3 0 8 0 uaddrrnd 24 4399 0 4384 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4399 0 4384 1 0 1 1 0 8 0 vmmpekpl 168 31332 0 31309 2 0 2 2 0 8 0 vmmpepl 168 506755 0 504920 202 111 91 97 0 357 11 vmsppl 272 4398 0 4384 2 1 1 2 0 8 0 pdppl 4096 8804 0 8768 6 1 5 6 0 8 0 pvpl 32 1010925 0 995734 356 195 161 163 0 265 33 pmappl 200 4398 0 4384 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 683 0 263 14 0 14 14 0 8 0