panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *328080 46858 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8243627a) at panic+0x15e sys/kern/subr_prf.c:218 vrele(fffffd806761dcc8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff8000227371f0,3,ffff800021696fd0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806f01f590,40287401,ffff8000227371f0,3,fffffd807f7b7ae0,ffff800021696fd0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806769cea0,40287401,ffff8000227371f0,ffff800021696fd0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021696fd0,ffff800022737300,ffff800022737350) at sys_ioctl+0x4ac syscall(ffff8000227373d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf30f1705d30, count: 6 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 vrele: v_writecount != 0 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8243627a) at panic+0x15e sys/kern/subr_prf.c:218 vrele(fffffd806761dcc8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff8000227371f0,3,ffff800021696fd0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806f01f590,40287401,ffff8000227371f0,3,fffffd807f7b7ae0,ffff800021696fd0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806769cea0,40287401,ffff8000227371f0,ffff800021696fd0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021696fd0,ffff800022737300,ffff800022737350) at sys_ioctl+0x4ac syscall(ffff8000227373d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf30f1705d30, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800022736c30 rbx 0xffff800022736c40 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0x58e811b5d9e70cde r11 0x72e0234e25f4a20f r12 0x3000000008 r13 0xffff800022736ce0 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022736c20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=328080 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=59, nice=20 forw=0xffffffffffffffff, list=0xffff8000216977b0,0xffff800021671a50 process=0xffff8000216993f0 user=0xffff800022732000, vmspace=0xfffffd807effcdd0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 46858 151279 85748 0 2 0 syz-executor.0 *46858 328080 85748 0 7 0x4000000 syz-executor.0 46858 210529 85748 0 3 0x4000080 fsleep syz-executor.0 85748 142001 29327 0 2 0x482 syz-executor.0 48551 457578 29327 0 2 0x2 syz-executor.1 29327 229320 40988 0 3 0x82 thrsleep syz-fuzzer 29327 136164 40988 0 2 0x4000482 syz-fuzzer 29327 244921 40988 0 3 0x4000082 thrsleep syz-fuzzer 29327 291749 40988 0 3 0x4000082 thrsleep syz-fuzzer 29327 325882 40988 0 3 0x4000082 thrsleep syz-fuzzer 29327 96297 40988 0 3 0x4000082 thrsleep syz-fuzzer 29327 365302 40988 0 3 0x4000082 kqread syz-fuzzer 40988 277684 40486 0 3 0x10008a sigsusp ksh 40486 455615 10692 0 3 0x92 select sshd 9850 250453 1 0 3 0x100083 ttyin getty 10692 312777 1 0 3 0x80 select sshd 45163 390115 71701 73 2 0x100090 syslogd 71701 227698 1 0 3 0x100082 netio syslogd 61880 291422 1 77 3 0x100090 poll dhclient 39016 436497 1 0 3 0x80 poll dhclient 61430 230846 0 0 3 0x14200 bored smr 11167 521724 0 0 2 0x14200 zerothread 5814 143801 0 0 3 0x14200 aiodoned aiodoned 9147 295756 0 0 3 0x14200 syncer update 49735 69181 0 0 3 0x14200 cleaner cleaner 813 320432 0 0 3 0x14200 reaper reaper 59146 272993 0 0 3 0x14200 pgdaemon pagedaemon 65338 414043 0 0 3 0x14200 bored crynlk 53748 313642 0 0 3 0x14200 bored crypto 78650 95473 0 0 3 0x14200 bored viomb 25295 332626 0 0 3 0x40014200 acpi0 acpi0 2746 260403 0 0 3 0x14200 bored softnet 78023 347988 0 0 3 0x14200 bored systqmp 58914 456266 0 0 3 0x14200 bored systq 97964 418612 0 0 3 0x40014200 bored softclock 37389 165025 0 0 3 0x40014200 idle0 1 381690 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 devbuf 9465 6342K 6472K 78643K 10567 0 pcb 13 8K 8K 78643K 17 0 rtable 77 2K 3K 78643K 190 0 ifaddr 37 9K 10K 78643K 39 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 2K 78643K 18 0 mount 1 1K 1K 78643K 1 0 vnodes 1216 76K 76K 78643K 1224 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 0K 0K 78643K 2 0 sem 3 0K 0K 78643K 3 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 37 0 proc 47 38K 54K 78643K 364 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 24 1K 2K 78643K 33 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 31 148K 148K 78643K 31 0 exec 0 0K 2K 78643K 317 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 110 22K 23K 78643K 697 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 9 0K 0K 78643K 9 0 temp 60 3963K 4027K 78643K 1800 0 kqueue 3 4K 4K 78643K 3 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 0 1 0 1 1 0 8 0 rtpcb 120 19 0 17 1 0 1 1 0 8 0 rtentry 112 45 0 15 2 0 2 2 0 8 0 unpcb 120 23 0 15 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 538 0 538 2 1 1 1 0 8 1 tcpcb 736 10 0 6 1 0 1 1 0 8 0 inpcb 304 42 0 34 2 0 2 2 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 kcovpl 48 2 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 65 12 0 12 12 0 8 2 art_table 32 190 0 65 2 0 2 2 0 8 0 art_node 16 44 0 18 1 0 1 1 0 8 0 semupl 112 2 0 1 1 0 1 1 0 8 0 semapl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1419 0 23 88 0 88 88 0 8 0 ffsino 240 1419 0 23 83 0 83 83 0 8 0 nchpl 144 1639 0 41 60 0 60 60 0 8 0 uvmvnodes 72 1464 0 0 27 0 27 27 0 8 0 vnodes 224 1464 0 0 87 0 87 87 0 8 0 namei 1024 3991 0 3991 2 1 1 1 0 8 1 scxspl 216 4500 0 4500 2 1 1 2 0 8 1 plimitpl 152 16 0 7 1 0 1 1 0 8 0 sigapl 424 224 0 195 4 0 4 4 0 8 0 futexpl 56 84 0 83 1 0 1 1 0 8 0 knotepl 112 62 0 42 1 0 1 1 0 8 0 kqueuepl 168 5 0 3 1 0 1 1 0 8 0 pipepl 304 69 0 58 1 0 1 1 0 8 0 fdescpl 432 209 0 195 2 0 2 2 0 8 0 filepl 120 986 0 885 4 0 4 4 0 8 0 lockfpl 104 5 0 4 1 0 1 1 0 8 0 lockfspl 48 3 0 2 1 0 1 1 0 8 0 sessionpl 144 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 57 0 50 1 0 1 1 0 8 0 zombiepl 144 195 0 195 2 1 1 1 0 8 1 processpl 1016 224 0 195 5 0 5 5 0 8 1 procpl 672 234 0 197 4 0 4 4 0 8 0 sockpl 432 84 0 66 4 1 3 3 0 8 1 mcl4k 4096 8 0 8 1 1 0 1 0 8 0 mcl2k 2048 176505 0 176442 28 9 19 19 0 8 8 mtagpl 96 4 0 2 2 1 1 1 0 8 0 mbufpl 256 190271 0 190086 14 2 12 12 0 8 0 bufpl 280 3247 0 169 220 0 220 220 0 8 0 anonpl 24 39449 0 20893 115 2 113 113 0 188 0 amapchunkpl 152 1183 0 814 18 1 17 17 0 158 2 amappl16 200 915 0 112 43 0 43 43 0 8 0 amappl15 192 9 0 6 1 0 1 1 0 8 0 amappl14 184 22 0 18 1 0 1 1 0 8 0 amappl13 176 27 0 24 1 0 1 1 0 8 0 amappl12 168 9 0 6 2 1 1 1 0 8 0 amappl11 160 48 0 37 1 0 1 1 0 8 0 amappl10 152 15 0 11 1 0 1 1 0 8 0 amappl9 144 261 0 261 1 1 0 1 0 8 0 amappl8 136 114 0 85 2 0 2 2 0 8 0 amappl7 128 213 0 207 1 0 1 1 0 8 0 amappl6 120 62 0 53 1 0 1 1 0 8 0 amappl5 112 393 0 377 1 0 1 1 0 8 0 amappl4 104 238 0 216 1 0 1 1 0 8 0 amappl3 96 108 0 101 1 0 1 1 0 8 0 amappl2 88 906 0 843 3 1 2 3 0 8 0 amappl1 80 13691 0 13250 26 9 17 20 0 8 6 amappl 88 478 0 408 2 0 2 2 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 64 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 209 0 195 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 209 0 195 1 0 1 1 0 8 0 vmmpekpl 168 5798 0 5778 1 0 1 1 0 8 0 vmmpepl 168 33527 0 31620 120 7 113 113 0 357 29 vmsppl 272 208 0 195 2 0 2 2 0 8 1 rwobjpl 24 9290 0 7845 12 2 10 10 0 8 1 pdppl 4096 424 0 390 53 13 40 40 0 8 6 pvpl 32 129277 0 107826 178 0 178 178 0 265 1 pmappl 200 208 0 195 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 296 0 28 8 0 8 8 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8243627a) at panic+0x15e sys/kern/subr_prf.c:218 vrele(fffffd806761dcc8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff8000227371f0,3,ffff800021696fd0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806f01f590,40287401,ffff8000227371f0,3,fffffd807f7b7ae0,ffff800021696fd0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806769cea0,40287401,ffff8000227371f0,ffff800021696fd0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021696fd0,ffff800022737300,ffff800022737350) at sys_ioctl+0x4ac syscall(ffff8000227373d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf30f1705d30, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8243627a) at panic+0x15e sys/kern/subr_prf.c:218 vrele(fffffd806761dcc8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff8000227371f0,3,ffff800021696fd0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806f01f590,40287401,ffff8000227371f0,3,fffffd807f7b7ae0,ffff800021696fd0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806769cea0,40287401,ffff8000227371f0,ffff800021696fd0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021696fd0,ffff800022737300,ffff800022737350) at sys_ioctl+0x4ac syscall(ffff8000227373d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf30f1705d30, count: -9