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(fffffd802b040178) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8030717718,ffff800014941b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd8030717718,ffff800014941b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8030717718,ffff800014941b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941b40,ffff8000159dfee0,ffff8000159dff50) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159dffb0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffe0cd4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0ca0, 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(fffffd802b040178) at vput+0x187 sys/kern/vfs_subr.c:759 vn_closefile(fffffd8030717718,ffff800014941b40) at vn_closefile+0x15b sys/kern/vfs_vnops.c:584 fdrop(fffffd8030717718,ffff800014941b40) at fdrop+0xc9 sys/kern/kern_descrip.c:1269 closef(fffffd8030717718,ffff800014941b40) at closef+0x118 sys/kern/kern_descrip.c:1253 fdfree(ffff800014941b40) at fdfree+0xf7 sys/kern/kern_descrip.c:1185 exit1(ffff800014941b40,0,1) at exit1+0x32f sys/kern/kern_exit.c:196 sys_exit(ffff800014941b40,ffff8000159dfee0,ffff8000159dff50) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff8000159dffb0) at syscall+0x508 Xsyscall(6,1,0,1,0,7f7ffffe0cd4) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe0ca0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000159dfbd0 rbx 0xffff8000159dfc80 rdx 0x2 rcx 0 rax 0 r8 0xffff8000159dfb90 r9 0x1 r10 0 r11 0xec431a089de1263c r12 0x3000000008 r13 0xffff8000159dfbe0 r14 0x100 r15 0x1 rip 0xffffffff818b9068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159dfbc0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=46963 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff89e8,0xffffffff822d6d20 process=0xffff8000ffff6370 user=0xffff8000159db000, vmspace=0xfffffd803f00cdd0 estcpu=36, cpticks=16, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 839 45205 39720 0 2 0x482 syz-executor.0 98202 364231 39720 0 2 0x2 syz-executor.1 56595 442237 0 0 3 0x14200 bored sosplice 39720 387619 34028 0 3 0x82 kqread syz-fuzzer 39720 379635 34028 0 2 0x4000482 syz-fuzzer 39720 101397 34028 0 3 0x4000082 thrsleep syz-fuzzer 39720 269434 34028 0 3 0x4000082 thrsleep syz-fuzzer 39720 513717 34028 0 3 0x4000082 thrsleep syz-fuzzer 39720 163521 34028 0 3 0x4000082 thrsleep syz-fuzzer 39720 292116 34028 0 3 0x4000082 thrsleep syz-fuzzer 34028 341002 91458 0 3 0x10008a pause ksh 91458 472914 67565 0 3 0x92 select sshd 98175 263642 1 0 3 0x100083 ttyin getty 67565 47361 1 0 3 0x80 select sshd 41229 450899 76522 73 2 0x100090 syslogd 76522 291646 1 0 3 0x100082 netio syslogd 18923 518683 1 77 3 0x100090 poll dhclient 93967 425741 1 0 3 0x80 poll dhclient 75696 282192 0 0 2 0x14200 zerothread 99470 128664 0 0 3 0x14200 aiodoned aiodoned 52086 158219 0 0 3 0x14200 syncer update 67409 44000 0 0 3 0x14200 cleaner cleaner 55820 284415 0 0 3 0x14200 reaper reaper 50794 461549 0 0 3 0x14200 pgdaemon pagedaemon 87419 340310 0 0 3 0x14200 bored crynlk 56509 383635 0 0 3 0x14200 bored crypto 96014 77936 0 0 3 0x40014200 acpi0 acpi0 85780 120921 0 0 3 0x14200 bored softnet 24622 514947 0 0 3 0x14200 bored systqmp 59029 236329 0 0 3 0x14200 bored systq 96955 70706 0 0 3 0x40014200 bored softclock 18077 270531 0 0 3 0x40014200 idle0 96910 390335 0 0 3 0x14200 bored smr 1 479573 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 9555 6497K 7508K 78643K 23070 0 0 pcb 13 8K 8K 78643K 338 0 0 rtable 120 12K 12K 78643K 1151 0 0 ifaddr 67 15K 16K 78643K 453 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 243 0 0 iov 0 0K 28K 78643K 578 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1208 76K 77K 78643K 5703 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 48 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 475 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 4690 0 0 sigio 2 0K 0K 78643K 70 0 0 proc 42 30K 54K 78643K 1002 0 0 subproc 32 2K 2K 78643K 136 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 518 0 0 in_multi 33 2K 2K 78643K 210 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 653 0 0 pfkey data 0 0K 4K 78643K 2 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 102 21K 31K 78643K 12163 0 0 UVM aobj 130 4K 4K 78643K 144 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 192 0 0 NDP 15 0K 0K 78643K 130 0 0 temp 191 2728K 3352K 78643K 18047 0 0 kqueue 0 0K 0K 78643K 42 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 20 0 13 1 0 1 1 0 8 0 rtpcb 80 222 0 220 1 0 1 1 0 8 0 rtentry 112 121 0 75 3 1 2 2 0 8 0 unpcb 120 1603 0 1593 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 454 0 454 1 1 0 1 0 8 0 tcpcb 544 697 0 693 1 0 1 1 0 8 0 inpcb 280 1953 0 1942 4 3 1 2 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 48 4 0 4 1 1 0 1 0 8 0 nd6 48 24 0 18 1 0 1 1 0 8 0 pkpcb 40 24 0 24 8 7 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 70 0 70 17 17 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 472 0 276 16 3 13 13 0 8 0 art_table 32 473 0 276 2 0 2 2 0 8 0 art_node 16 113 0 72 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 6 1 0 1 1 0 8 0 semapl 112 473 0 463 1 0 1 1 0 8 0 shmpl 112 142 0 14 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8928 0 7527 46 0 46 46 0 8 0 ffsino 240 8928 0 7527 84 0 84 84 0 8 0 nchpl 144 15544 0 13915 61 0 61 61 0 8 0 uvmvnodes 72 6825 0 0 125 0 125 125 0 8 0 vnodes 200 6825 0 0 360 0 360 360 0 8 0 namei 1024 50417 0 50417 3 2 1 1 0 8 1 scsiplug 64 9 0 9 5 5 0 1 0 8 0 scxspl 192 56112 0 56112 30 27 3 6 0 8 3 plimitpl 152 435 0 428 1 0 1 1 0 8 0 sigapl 432 4843 0 4830 2 0 2 2 0 8 0 futexpl 56 76939 0 76939 4 3 1 1 0 8 1 knotepl 112 1028 0 1009 2 1 1 2 0 8 0 kqueuepl 104 1073 0 1071 1 0 1 1 0 8 0 pipepl 112 2696 0 2677 6 5 1 2 0 8 0 fdescpl 424 4844 0 4830 2 0 2 2 0 8 0 filepl 120 29327 0 29232 7 3 4 4 0 8 0 lockfpl 104 1758 0 1758 6 5 1 1 0 8 1 lockfspl 48 590 0 590 6 5 1 1 0 8 1 sessionpl 112 23 0 13 1 0 1 1 0 8 0 pgrppl 48 51 0 41 1 0 1 1 0 8 0 ucredpl 96 6556 0 6549 1 0 1 1 0 8 0 zombiepl 144 4831 0 4830 1 0 1 1 0 8 0 processpl 864 4859 0 4830 4 0 4 4 0 8 0 procpl 632 11071 0 11036 4 0 4 4 0 8 0 sosppl 128 30 0 30 11 11 0 1 0 8 0 sockpl 384 3837 0 3818 10 7 3 4 0 8 1 mcl64k 65536 346 0 346 42 41 1 29 0 8 1 mcl16k 16384 20 0 20 15 15 0 1 0 8 0 mcl12k 12288 95 0 95 17 16 1 1 0 8 1 mcl9k 9216 70 0 70 20 20 0 1 0 8 0 mcl8k 8192 71 0 71 21 21 0 1 0 8 0 mcl4k 4096 241 0 240 11 10 1 1 0 8 0 mcl2k2 2112 24 0 24 12 12 0 1 0 8 0 mcl2k 2048 62347 0 62299 15 8 7 12 0 8 0 mtagpl 80 114 0 95 2 1 1 1 0 8 0 mbufpl 256 120787 0 120680 33 24 9 21 0 8 0 bufpl 256 19618 0 12776 428 0 428 428 0 8 0 anonpl 16 418969 0 407102 185 120 65 66 0 62 14 amapchunkpl 152 21032 0 20927 58 50 8 15 0 158 3 amappl16 192 24461 0 23805 155 114 41 45 0 8 7 amappl15 184 454 0 454 1 1 0 1 0 8 0 amappl14 176 381 0 375 1 0 1 1 0 8 0 amappl13 168 7 0 7 1 1 0 1 0 8 0 amappl12 160 545 0 542 1 0 1 1 0 8 0 amappl11 152 1827 0 1815 1 0 1 1 0 8 0 amappl10 144 1804 0 1803 1 0 1 1 0 8 0 amappl9 136 605 0 601 1 0 1 1 0 8 0 amappl8 128 193 0 169 1 0 1 1 0 8 0 amappl7 120 1785 0 1780 1 0 1 1 0 8 0 amappl6 112 1814 0 1808 1 0 1 1 0 8 0 amappl5 104 811 0 800 1 0 1 1 0 8 0 amappl4 96 4919 0 4890 2 1 1 2 0 8 0 amappl3 88 824 0 814 1 0 1 1 0 8 0 amappl2 80 38016 0 37949 3 1 2 3 0 8 0 amappl1 72 93660 0 93240 25 15 10 19 0 8 0 amappl 80 11416 0 11380 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 143 0 14 3 0 3 3 0 8 0 uaddrrnd 24 4844 0 4830 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4844 0 4830 1 0 1 1 0 8 0 vmmpekpl 168 35541 0 35522 2 0 2 2 0 8 0 vmmpepl 168 567287 0 565575 228 141 87 98 0 357 7 vmsppl 272 4843 0 4830 4 3 1 2 0 8 0 pdppl 4096 9695 0 9660 6 1 5 6 0 8 0 pvpl 32 1272482 0 1257510 441 281 160 264 0 265 35 pmappl 200 4843 0 4830 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 685 0 130 18 2 16 18 0 8 0