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(fffffd8038b49100) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f8f3100,ffff800014941160) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f8f3100,ffff800014941160) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f8f3100,ffff800014941160) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941160) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941160,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941160,ffff8000149a0640,ffff8000149a06b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149a0710) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffc42a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4270, 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(fffffd8038b49100) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802f8f3100,ffff800014941160) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802f8f3100,ffff800014941160) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802f8f3100,ffff800014941160) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941160) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941160,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941160,ffff8000149a0640,ffff8000149a06b0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000149a0710) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffc42a4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4270, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149a0330 rbx 0xffff8000149a03e0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149a02f0 r9 0x1 r10 0 r11 0x456d6e4ef22bccff r12 0x3000000008 r13 0xffff8000149a0340 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149a0320 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=447456 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014940780,0xffff800014940518 process=0xffff8000ffff70f0 user=0xffff80001499b000, vmspace=0xfffffd803f00caa0 estcpu=36, cpticks=20, pctcpu=0.0 user=0, sys=3, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 92409 332624 33071 0 2 0 syz-executor.0 92409 468307 33071 0 2 0x4000000 syz-executor.0 81318 373208 91284 0 2 0x482 syz-executor.1 33734 467877 1 0 3 0x100083 ttyin getty 76933 414029 0 0 3 0x14200 bored sosplice 33071 403736 91284 0 2 0x482 syz-executor.0 91284 360186 34853 0 3 0x82 thrsleep syz-fuzzer 91284 155014 34853 0 3 0x4000082 thrsleep syz-fuzzer 91284 427623 34853 0 3 0x4000082 kqread syz-fuzzer 91284 317456 34853 0 3 0x4000082 thrsleep syz-fuzzer 91284 17317 34853 0 3 0x4000082 thrsleep syz-fuzzer 91284 325442 34853 0 3 0x4000082 thrsleep syz-fuzzer 91284 449144 34853 0 3 0x4000082 thrsleep syz-fuzzer 34853 111593 28269 0 3 0x10008a pause ksh 28269 442243 61953 0 3 0x92 select sshd 61953 498434 1 0 3 0x80 select sshd 3102 298803 69650 73 2 0x100090 syslogd 69650 298654 1 0 3 0x100082 netio syslogd 79027 515642 1 77 3 0x100090 poll dhclient 77787 56217 1 0 3 0x80 poll dhclient 3519 365946 0 0 2 0x14200 zerothread 39341 403946 0 0 3 0x14200 aiodoned aiodoned 97732 341818 0 0 3 0x14200 syncer update 80441 45072 0 0 3 0x14200 cleaner cleaner 83813 127741 0 0 3 0x14200 reaper reaper 97637 398261 0 0 3 0x14200 pgdaemon pagedaemon 99977 28104 0 0 3 0x14200 bored crynlk 94495 194510 0 0 3 0x14200 bored crypto 74868 200441 0 0 3 0x40014200 acpi0 acpi0 71298 444105 0 0 3 0x14200 bored softnet 17972 4173 0 0 3 0x14200 bored systqmp 90128 502648 0 0 3 0x14200 bored systq 93516 429304 0 0 2 0x40014200 softclock 3453 138993 0 0 3 0x40014200 idle0 30474 461210 0 0 3 0x14200 bored smr 1 409258 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 9514 6413K 6907K 78643K 13281 0 0 pcb 13 8K 8K 78643K 83 0 0 rtable 108 3K 4K 78643K 376 0 0 ifaddr 57 12K 13K 78643K 130 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 88 0 0 iov 0 0K 16K 78643K 117 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1208 76K 77K 78643K 2193 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 10 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 115 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1048 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 42 30K 54K 78643K 534 0 0 subproc 32 2K 2K 78643K 51 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 112 0 0 in_multi 33 2K 2K 78643K 71 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 312 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 89 20K 29K 78643K 3294 0 0 UVM aobj 33 2K 2K 78643K 41 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 71 0 0 NDP 12 0K 0K 78643K 36 0 0 temp 169 2723K 2792K 78643K 6318 0 0 kqueue 0 0K 0K 78643K 6 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 8 0 2 1 0 1 1 0 8 0 rtpcb 80 65 0 63 1 0 1 1 0 8 0 rtentry 112 56 0 12 2 0 2 2 0 8 0 unpcb 120 381 0 371 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 155 0 155 1 1 0 1 0 8 0 tcpcb 544 170 0 166 1 0 1 1 0 8 0 inpcb 280 456 0 447 1 0 1 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 16 0 16 3 2 1 1 0 8 1 ppxss 1128 14 0 14 6 5 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 236 0 44 12 0 12 12 0 8 0 art_table 32 237 0 44 2 0 2 2 0 8 0 art_node 16 55 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 10 1 0 1 1 0 8 0 semapl 112 113 0 103 1 0 1 1 0 8 0 shmpl 112 39 0 8 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3088 0 1675 46 0 46 46 0 8 0 ffsino 240 3088 0 1675 84 0 84 84 0 8 0 nchpl 144 4704 0 3075 62 0 62 62 0 8 0 uvmvnodes 72 3795 0 0 69 0 69 69 0 8 0 vnodes 200 3795 0 0 200 0 200 200 0 8 0 namei 1024 14229 0 14228 2 1 1 1 0 8 0 scsiplug 64 2 0 2 1 0 1 1 0 8 1 scxspl 192 13321 0 13321 10 8 2 6 0 8 2 plimitpl 152 93 0 86 1 0 1 1 0 8 0 sigapl 432 1217 0 1203 2 0 2 2 0 8 0 futexpl 56 16530 0 16530 3 2 1 1 0 8 1 knotepl 112 231 0 212 1 0 1 1 0 8 0 kqueuepl 104 220 0 218 1 0 1 1 0 8 0 pipepl 112 766 0 747 2 1 1 2 0 8 0 fdescpl 424 1218 0 1203 2 0 2 2 0 8 0 filepl 120 7067 0 6970 5 1 4 5 0 8 0 lockfpl 104 319 0 319 5 4 1 1 0 8 1 lockfspl 48 118 0 118 5 4 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 25 0 15 1 0 1 1 0 8 0 ucredpl 96 1319 0 1312 1 0 1 1 0 8 0 zombiepl 144 1204 0 1203 3 2 1 1 0 8 0 processpl 864 1233 0 1203 4 0 4 4 0 8 0 procpl 632 2540 0 2503 4 0 4 4 0 8 0 sosppl 128 18 0 18 4 4 0 1 0 8 0 sockpl 384 922 0 903 6 3 3 3 0 8 1 mcl64k 65536 27 0 27 5 4 1 1 0 8 1 mcl16k 16384 2 0 2 2 1 1 1 0 8 1 mcl12k 12288 12 0 12 7 6 1 1 0 8 1 mcl9k 9216 8 0 8 6 6 0 1 0 8 0 mcl8k 8192 13 0 13 6 5 1 1 0 8 1 mcl4k 4096 63 0 63 5 4 1 1 0 8 1 mcl2k2 2112 8 0 8 4 4 0 1 0 8 0 mcl2k 2048 55883 0 55838 17 10 7 12 0 8 0 mtagpl 80 36 0 25 2 1 1 1 0 8 0 mbufpl 256 93079 0 92979 12 2 10 10 0 8 0 bufpl 256 9110 0 3454 354 0 354 354 0 8 0 anonpl 16 131768 0 120018 104 45 59 64 0 62 11 amapchunkpl 152 5556 0 5446 29 21 8 14 0 158 3 amappl16 192 6600 0 5946 73 34 39 44 0 8 6 amappl15 184 1 0 1 1 1 0 1 0 8 0 amappl14 176 55 0 49 1 0 1 1 0 8 0 amappl13 168 634 0 629 1 0 1 1 0 8 0 amappl12 160 377 0 376 1 0 1 1 0 8 0 amappl11 152 53 0 42 1 0 1 1 0 8 0 amappl10 144 69 0 69 1 1 0 1 0 8 0 amappl9 136 571 0 568 1 0 1 1 0 8 0 amappl8 128 134 0 119 1 0 1 1 0 8 0 amappl7 120 34 0 31 1 0 1 1 0 8 0 amappl6 112 51 0 45 1 0 1 1 0 8 0 amappl5 104 527 0 516 1 0 1 1 0 8 0 amappl4 96 1452 0 1421 1 0 1 1 0 8 0 amappl3 88 200 0 190 1 0 1 1 0 8 0 amappl2 80 9575 0 9494 3 1 2 3 0 8 0 amappl1 72 30273 0 29862 26 17 9 19 0 8 0 amappl 80 2791 0 2752 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 40 0 8 1 0 1 1 0 8 0 uaddrrnd 24 1218 0 1203 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1218 0 1203 1 0 1 1 0 8 0 vmmpekpl 168 11849 0 11826 2 0 2 2 0 8 0 vmmpepl 168 147139 0 145355 121 39 82 94 0 357 4 vmsppl 272 1217 0 1203 2 1 1 2 0 8 0 pdppl 4096 2443 0 2406 6 1 5 6 0 8 0 pvpl 32 388704 0 373787 288 67 221 256 0 265 100 pmappl 200 1217 0 1203 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 514 0 31 14 0 14 14 0 8 0