panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *221738 99324 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(fffffd806ec12328) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002172dc20,3,ffff800021670d20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8076505050,40287401,ffff80002172dc20,3,fffffd807f7b7a20,ffff800021670d20) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806cdfb270,40287401,ffff80002172dc20,ffff800021670d20) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670d20,ffff80002172dd30,ffff80002172dd80) at sys_ioctl+0x4ac syscall(ffff80002172de00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ca58248c30, 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(fffffd806ec12328) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002172dc20,3,ffff800021670d20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8076505050,40287401,ffff80002172dc20,3,fffffd807f7b7a20,ffff800021670d20) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806cdfb270,40287401,ffff80002172dc20,ffff800021670d20) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670d20,ffff80002172dd30,ffff80002172dd80) at sys_ioctl+0x4ac syscall(ffff80002172de00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ca58248c30, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002172d660 rbx 0xffff80002172d670 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0x9471d1c20434d0f7 r11 0xd6ec73de35866178 r12 0x3000000008 r13 0xffff80002172d710 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002172d650 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=221738 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=65, nice=20 forw=0xffffffffffffffff, list=0xffff800021671260,0xffff800021670010 process=0xffff80002165d408 user=0xffff800021728000, vmspace=0xfffffd807effc550 estcpu=30, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 7504 463013 24319 0 2 0 syz-executor.1 7504 75394 24319 0 3 0x4000080 fsleep syz-executor.1 99324 112028 48178 0 2 0 syz-executor.0 *99324 221738 48178 0 7 0x4000000 syz-executor.0 41560 196188 0 0 3 0x14200 bored sosplice 24319 477768 45561 0 2 0x482 syz-executor.1 48178 521551 45561 0 2 0x482 syz-executor.0 45561 180660 11259 0 3 0x82 thrsleep syz-fuzzer 45561 444602 11259 0 2 0x4000482 syz-fuzzer 45561 281816 11259 0 3 0x4000082 thrsleep syz-fuzzer 45561 377986 11259 0 3 0x4000082 thrsleep syz-fuzzer 45561 513919 11259 0 3 0x4000082 thrsleep syz-fuzzer 45561 150969 11259 0 3 0x4000082 kqread syz-fuzzer 45561 485592 11259 0 3 0x4000082 thrsleep syz-fuzzer 11259 247075 59209 0 3 0x10008a sigsusp ksh 59209 204584 79077 0 3 0x92 select sshd 21897 336777 1 0 3 0x100083 ttyin getty 79077 293202 1 0 3 0x80 select sshd 6854 236789 88460 73 3 0x100090 kqread syslogd 88460 211675 1 0 3 0x100082 netio syslogd 95020 207754 1 77 3 0x100090 poll dhclient 28334 292852 1 0 3 0x80 poll dhclient 49277 507719 0 0 2 0x14200 smr 26521 185563 0 0 2 0x14200 zerothread 2094 446898 0 0 3 0x14200 aiodoned aiodoned 72339 245538 0 0 3 0x14200 syncer update 4765 92452 0 0 3 0x14200 cleaner cleaner 1126 498098 0 0 3 0x14200 reaper reaper 40051 287469 0 0 3 0x14200 pgdaemon pagedaemon 2759 131783 0 0 3 0x14200 bored crynlk 2115 265025 0 0 3 0x14200 bored crypto 28432 80740 0 0 3 0x14200 bored viomb 74974 385946 0 0 3 0x40014200 acpi0 acpi0 95201 88914 0 0 3 0x14200 bored softnet 25621 253619 0 0 3 0x14200 bored systqmp 72180 269258 0 0 3 0x14200 bored systq 31161 248132 0 0 3 0x40014200 bored softclock 71491 164473 0 0 3 0x40014200 idle0 1 73517 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 9502 6607K 6607K 78643K 10657 0 pcb 13 8K 8K 78643K 19 0 rtable 104 3K 3K 78643K 201 0 ifaddr 48 11K 11K 78643K 53 0 counters 21 16K 16K 78643K 22 0 ioctlops 0 0K 2K 78643K 17 0 iov 0 0K 2K 78643K 2 0 mount 1 1K 1K 78643K 1 0 vnodes 1218 77K 77K 78643K 1245 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 4 0K 0K 78643K 10 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 6 17K 25K 78643K 95 0 proc 48 38K 63K 78643K 365 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 2 0 in_multi 33 2K 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 37 175K 175K 78643K 37 0 exec 0 0K 2K 78643K 319 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 111 22K 23K 78643K 825 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 4 0 NDP 7 0K 0K 78643K 12 0 temp 85 3967K 4031K 78643K 5033 0 kqueue 3 4K 8K 78643K 6 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 25 0 23 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 43 0 35 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 573 0 573 2 1 1 1 0 8 1 tcpcb 736 16 0 12 1 0 1 1 0 8 0 inpcb 304 55 0 48 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 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1487 0 91 88 0 88 88 0 8 0 ffsino 240 1487 0 91 83 0 83 83 0 8 0 nchpl 144 1766 0 168 60 0 60 60 0 8 0 uvmvnodes 72 1547 0 0 29 0 29 29 0 8 0 vnodes 224 1547 0 0 91 0 91 91 0 8 0 namei 1024 4301 0 4301 2 1 1 1 0 8 1 scxspl 216 5097 0 5097 9 7 2 8 0 8 2 plimitpl 152 16 0 8 1 0 1 1 0 8 0 sigapl 424 283 0 252 4 0 4 4 0 8 0 futexpl 56 621 0 620 1 0 1 1 0 8 0 knotepl 112 66 0 46 1 0 1 1 0 8 0 kqueuepl 168 61 0 59 1 0 1 1 0 8 0 pipepl 304 69 0 58 1 0 1 1 0 8 0 fdescpl 432 267 0 252 2 0 2 2 0 8 0 filepl 120 1192 0 1090 4 0 4 4 0 8 0 lockfpl 104 19 0 18 1 0 1 1 0 8 0 lockfspl 48 6 0 5 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 83 0 76 1 0 1 1 0 8 0 zombiepl 144 252 0 252 2 1 1 1 0 8 1 processpl 1016 283 0 252 5 0 5 5 0 8 1 procpl 672 363 0 324 4 0 4 4 0 8 0 sosppl 168 2 0 2 1 0 1 1 0 8 1 sockpl 432 123 0 106 5 1 4 4 0 8 2 mcl64k 65536 3 0 3 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 14 0 14 2 1 1 1 0 8 1 mcl2k 2048 175105 0 175042 52 36 16 31 0 8 7 mtagpl 96 8 0 2 2 1 1 1 0 8 0 mbufpl 256 191530 0 191427 20 10 10 17 0 8 1 bufpl 280 3346 0 173 227 0 227 227 0 8 0 anonpl 24 42192 0 24155 112 2 110 110 0 188 1 amapchunkpl 152 1487 0 1130 17 1 16 16 0 158 1 amappl16 200 1036 0 252 42 0 42 42 0 8 0 amappl15 192 1 0 0 1 0 1 1 0 8 0 amappl14 184 57 0 50 1 0 1 1 0 8 0 amappl13 176 24 0 22 1 0 1 1 0 8 0 amappl12 168 9 0 6 2 1 1 1 0 8 0 amappl11 160 90 0 77 1 0 1 1 0 8 0 amappl10 152 3 0 0 1 0 1 1 0 8 0 amappl9 144 165 0 164 2 1 1 1 0 8 0 amappl8 136 117 0 85 2 0 2 2 0 8 0 amappl7 128 216 0 210 1 0 1 1 0 8 0 amappl6 120 58 0 50 1 0 1 1 0 8 0 amappl5 112 610 0 594 1 0 1 1 0 8 0 amappl4 104 302 0 275 1 0 1 1 0 8 0 amappl3 96 115 0 105 1 0 1 1 0 8 0 amappl2 88 1400 0 1325 3 1 2 3 0 8 0 amappl1 80 15548 0 15075 30 18 12 21 0 8 2 amappl 88 600 0 532 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 267 0 252 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 267 0 252 1 0 1 1 0 8 0 vmmpekpl 168 6002 0 5980 2 0 2 2 0 8 0 vmmpepl 168 41085 0 39051 126 14 112 112 0 357 23 vmsppl 272 266 0 252 2 0 2 2 0 8 1 rwobjpl 24 10934 0 9474 13 3 10 10 0 8 1 pdppl 4096 540 0 504 58 18 40 40 0 8 4 pvpl 32 145321 0 124305 175 2 173 173 0 265 2 pmappl 200 266 0 252 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 334 0 68 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(fffffd806ec12328) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002172dc20,3,ffff800021670d20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8076505050,40287401,ffff80002172dc20,3,fffffd807f7b7a20,ffff800021670d20) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806cdfb270,40287401,ffff80002172dc20,ffff800021670d20) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670d20,ffff80002172dd30,ffff80002172dd80) at sys_ioctl+0x4ac syscall(ffff80002172de00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ca58248c30, 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(fffffd806ec12328) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002172dc20,3,ffff800021670d20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8076505050,40287401,ffff80002172dc20,3,fffffd807f7b7a20,ffff800021670d20) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806cdfb270,40287401,ffff80002172dc20,ffff800021670d20) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670d20,ffff80002172dd30,ffff80002172dd80) at sys_ioctl+0x4ac syscall(ffff80002172de00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ca58248c30, count: -9