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(fffffd80296b3cd0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802b4405a0,ffff8000ffff2ee8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802b4405a0,ffff8000ffff2ee8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802b4405a0,ffff8000ffff2ee8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2ee8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2ee8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2ee8,ffff800017bdd8f0,ffff800017bdd960) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800017bdd9c0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbbaa4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbba70, 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(fffffd80296b3cd0) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd802b4405a0,ffff8000ffff2ee8) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd802b4405a0,ffff8000ffff2ee8) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd802b4405a0,ffff8000ffff2ee8) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff8000ffff2ee8) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff8000ffff2ee8,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff8000ffff2ee8,ffff800017bdd8f0,ffff800017bdd960) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800017bdd9c0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffbbaa4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbba70, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800017bdd5e0 rbx 0xffff800017bdd690 rdx 0x2 rcx 0 rax 0 r8 0xffff800017bdd5a0 r9 0x1 r10 0 r11 0xaa830e345a1a4677 r12 0x3000000008 r13 0xffff800017bdd5f0 r14 0x100 r15 0x1 rip 0xffffffff81972198 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800017bdd5d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=45549 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2c70,0xffff8000ffff3660 process=0xffff8000ffff7450 user=0xffff800017bd8000, vmspace=0xfffffd803f014cc0 estcpu=31, cpticks=12, pctcpu=0.3 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 42255 191559 15809 0 2 0 syz-executor.0 42255 202967 15809 0 3 0x4000080 fsleep syz-executor.0 16370 190791 1 0 3 0x100083 ttyin getty 17124 510536 74014 0 2 0x482 syz-executor.1 15809 158727 74014 0 2 0x482 syz-executor.0 92665 313622 0 0 3 0x14200 bored sosplice 74014 16953 87248 0 3 0x82 thrsleep syz-fuzzer 74014 172355 87248 0 3 0x4000082 thrsleep syz-fuzzer 74014 160214 87248 0 3 0x4000082 thrsleep syz-fuzzer 74014 32646 87248 0 3 0x4000082 thrsleep syz-fuzzer 74014 488952 87248 0 3 0x4000082 thrsleep syz-fuzzer 74014 364692 87248 0 3 0x4000082 kqread syz-fuzzer 74014 159395 87248 0 3 0x4000082 thrsleep syz-fuzzer 87248 67008 76482 0 3 0x10008a pause ksh 76482 226054 22360 0 3 0x92 select sshd 22360 36220 1 0 3 0x80 select sshd 77166 135170 83990 73 2 0x100090 syslogd 83990 500519 1 0 3 0x100082 netio syslogd 45412 389560 1 77 3 0x100090 poll dhclient 63900 371376 1 0 3 0x80 poll dhclient 64393 138421 0 0 2 0x14200 zerothread 38200 12861 0 0 3 0x14200 aiodoned aiodoned 91174 521056 0 0 3 0x14200 syncer update 54885 28073 0 0 3 0x14200 cleaner cleaner 3047 194208 0 0 3 0x14200 reaper reaper 83256 418700 0 0 3 0x14200 pgdaemon pagedaemon 86453 465739 0 0 3 0x14200 bored crynlk 5382 270021 0 0 3 0x14200 bored crypto 22843 67855 0 0 3 0x40014200 acpi0 acpi0 27145 442645 0 0 3 0x14200 bored softnet 8256 234615 0 0 3 0x14200 bored systqmp 72571 31850 0 0 3 0x14200 bored systq 82928 100069 0 0 3 0x40014200 bored softclock 55247 232929 0 0 3 0x40014200 idle0 564 438556 0 0 3 0x14200 bored smr 1 406947 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 9554 6435K 14687K 78643K 23917 0 0 pcb 13 8K 8K 78643K 341 0 0 rtable 118 12K 12K 78643K 1218 0 0 ifaddr 71 18K 20K 78643K 550 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 288 0 0 iov 0 0K 32K 78643K 606 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1219 76K 77K 78643K 5893 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 62 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 468 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 4845 0 0 sigio 1 0K 0K 78643K 86 0 0 proc 43 30K 54K 78643K 903 0 0 subproc 32 2K 2K 78643K 74 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 418 0 0 in_multi 33 2K 2K 78643K 191 0 0 ether_multi 1 0K 0K 78643K 25 0 0 mrt 0 0K 0K 78643K 19 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 703 0 0 pfkey data 0 0K 4K 78643K 4 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 29K 78643K 12219 0 0 UVM aobj 130 6K 6K 78643K 146 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 251 0 0 NDP 16 0K 0K 78643K 150 0 0 temp 198 2728K 3368K 78643K 18401 0 0 kqueue 0 0K 0K 78643K 52 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 6 1 0 1 1 0 8 0 rtpcb 80 241 0 239 1 0 1 1 0 8 0 rtentry 112 77 0 32 2 0 2 2 0 8 0 unpcb 120 1539 0 1529 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1714 0 1714 2 2 0 1 0 8 0 tcpcb 544 716 0 712 1 0 1 1 0 8 0 inpcb 280 1996 0 1989 2 1 1 2 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 pkpcb 40 32 0 32 11 10 1 1 0 8 1 ppxss 1128 101 0 101 15 14 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 281 0 90 13 1 12 12 0 8 0 art_table 32 282 0 90 2 0 2 2 0 8 0 art_node 16 69 0 29 1 0 1 1 0 8 0 sysvmsgpl 40 34 0 23 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 466 0 456 1 0 1 1 0 8 0 shmpl 112 144 0 16 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9281 0 7873 46 0 46 46 0 8 0 ffsino 240 9281 0 7873 84 0 84 84 0 8 0 nchpl 144 16121 0 14496 61 0 61 61 0 8 0 uvmvnodes 72 6619 0 0 121 0 121 121 0 8 0 vnodes 200 6619 0 0 349 0 349 349 0 8 0 namei 1024 51302 0 51302 2 1 1 1 0 8 1 scsiplug 64 7 0 7 5 5 0 1 0 8 0 scxspl 192 51032 0 51032 30 29 1 6 0 8 1 plimitpl 152 417 0 410 1 0 1 1 0 8 0 sigapl 432 5017 0 5003 2 0 2 2 0 8 0 futexpl 56 81073 0 81072 2 1 1 1 0 8 0 knotepl 112 1047 0 1028 1 0 1 1 0 8 0 kqueuepl 104 1227 0 1225 1 0 1 1 0 8 0 pipepl 112 2792 0 2773 8 7 1 2 0 8 0 fdescpl 424 5018 0 5003 2 0 2 2 0 8 0 filepl 120 30489 0 30393 5 1 4 5 0 8 0 lockfpl 104 1741 0 1741 3 2 1 1 0 8 1 lockfspl 48 601 0 601 3 2 1 1 0 8 1 sessionpl 112 26 0 16 1 0 1 1 0 8 0 pgrppl 48 56 0 46 1 0 1 1 0 8 0 ucredpl 96 6674 0 6667 1 0 1 1 0 8 0 zombiepl 144 5004 0 5003 2 1 1 1 0 8 0 processpl 864 5033 0 5003 4 0 4 4 0 8 0 procpl 632 11195 0 11158 4 0 4 4 0 8 0 sosppl 128 44 0 44 10 10 0 1 0 8 0 sockpl 384 3848 0 3829 5 2 3 4 0 8 1 mcl64k 65536 2452 0 2452 221 181 40 129 0 8 40 mcl16k 16384 26 0 26 13 13 0 1 0 8 0 mcl12k 12288 96 0 96 7 6 1 1 0 8 1 mcl9k 9216 76 0 76 10 9 1 1 0 8 1 mcl8k 8192 70 0 70 12 11 1 1 0 8 1 mcl4k 4096 262 0 262 3 2 1 1 0 8 1 mcl2k2 2112 37 0 37 15 14 1 1 0 8 1 mcl2k 2048 61451 0 61408 18 12 6 12 0 8 0 mtagpl 80 120 0 92 3 2 1 2 0 8 0 mbufpl 256 124334 0 124214 127 117 10 72 0 8 0 bufpl 256 23517 0 16898 414 0 414 414 0 8 0 anonpl 16 471545 0 459666 164 114 50 65 0 62 1 amapchunkpl 152 20395 0 20284 37 30 7 14 0 158 1 amappl16 192 28378 0 27718 180 146 34 46 0 8 0 amappl15 184 2210 0 2208 2 1 1 1 0 8 0 amappl14 176 66 0 60 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 10 0 9 1 0 1 1 0 8 0 amappl11 152 2640 0 2627 1 0 1 1 0 8 0 amappl10 144 73 0 71 2 1 1 1 0 8 0 amappl9 136 590 0 587 1 0 1 1 0 8 0 amappl8 128 153 0 135 1 0 1 1 0 8 0 amappl7 120 58 0 52 1 0 1 1 0 8 0 amappl6 112 2625 0 2616 1 0 1 1 0 8 0 amappl5 104 194 0 183 1 0 1 1 0 8 0 amappl4 96 5298 0 5270 1 0 1 1 0 8 0 amappl3 88 360 0 350 1 0 1 1 0 8 0 amappl2 80 41840 0 41765 4 2 2 3 0 8 0 amappl1 72 94165 0 93739 25 15 10 19 0 8 0 amappl 80 11511 0 11472 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 145 0 16 3 0 3 3 0 8 0 uaddrrnd 24 5018 0 5003 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5018 0 5003 1 0 1 1 0 8 0 vmmpekpl 168 35749 0 35725 2 0 2 2 0 8 0 vmmpepl 168 585736 0 583924 192 111 81 96 0 357 2 vmsppl 272 5017 0 5003 2 1 1 2 0 8 0 pdppl 4096 10042 0 10006 6 1 5 6 0 8 0 pvpl 32 1266448 0 1251386 304 160 144 210 0 265 19 pmappl 200 5017 0 5003 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 922 0 342 21 2 19 21 0 8 1