panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *427715 30107 0 0 0x4000000 0 syz-executor.1 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(fffffd806d598b20) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022731ac0,3,ffff800021697a50) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8078e5d050,40287401,ffff800022731ac0,3,fffffd807f7b7660,ffff800021697a50) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807e1576a8,40287401,ffff800022731ac0,ffff800021697a50) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021697a50,ffff800022731bd0,ffff800022731c20) at sys_ioctl+0x4ac syscall(ffff800022731ca0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdf3e11fa6f0, 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(fffffd806d598b20) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022731ac0,3,ffff800021697a50) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8078e5d050,40287401,ffff800022731ac0,3,fffffd807f7b7660,ffff800021697a50) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807e1576a8,40287401,ffff800022731ac0,ffff800021697a50) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021697a50,ffff800022731bd0,ffff800022731c20) at sys_ioctl+0x4ac syscall(ffff800022731ca0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdf3e11fa6f0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800022731500 rbx 0xffff800022731510 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0x53835c7934b2953f r11 0x2ea021da8649a8e6 r12 0x3000000008 r13 0xffff8000227315b0 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000227314f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=427715 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021696fd0,0xffffffff827ebf10 process=0xffff80002165dff0 user=0xffff80002272c000, vmspace=0xfffffd807effc770 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 30107 357401 39191 0 2 0 syz-executor.1 *30107 427715 39191 0 7 0x4000000 syz-executor.1 18759 307174 14480 0 2 0x2 syz-executor.0 39191 36942 14480 0 2 0x482 syz-executor.1 14480 324821 75242 0 3 0x82 kqread syz-fuzzer 14480 210544 75242 0 2 0x4000482 syz-fuzzer 14480 330340 75242 0 3 0x4000082 thrsleep syz-fuzzer 14480 98780 75242 0 3 0x4000082 thrsleep syz-fuzzer 14480 409367 75242 0 3 0x4000082 thrsleep syz-fuzzer 14480 367386 75242 0 3 0x4000082 thrsleep syz-fuzzer 75242 71822 92055 0 3 0x10008a sigsusp ksh 92055 143417 98166 0 3 0x92 select sshd 25350 124480 1 0 3 0x100083 ttyin getty 98166 332041 1 0 3 0x80 select sshd 33662 195741 91646 73 3 0x100090 kqread syslogd 91646 147691 1 0 3 0x100082 netio syslogd 80739 504255 1 77 3 0x100090 poll dhclient 57840 217446 1 0 3 0x80 poll dhclient 53453 343484 0 0 3 0x14200 bored smr 55545 162474 0 0 2 0x14200 zerothread 24981 81134 0 0 3 0x14200 aiodoned aiodoned 90321 215580 0 0 3 0x14200 syncer update 16257 273827 0 0 3 0x14200 cleaner cleaner 7392 289319 0 0 3 0x14200 reaper reaper 91300 369223 0 0 3 0x14200 pgdaemon pagedaemon 70254 380933 0 0 3 0x14200 bored crynlk 91469 160744 0 0 3 0x14200 bored crypto 58012 257059 0 0 3 0x14200 bored viomb 95439 504314 0 0 3 0x40014200 acpi0 acpi0 5242 226106 0 0 3 0x14200 bored softnet 81075 473160 0 0 3 0x14200 bored systqmp 36768 504423 0 0 3 0x14200 bored systq 35726 33454 0 0 3 0x40014200 bored softclock 64661 508093 0 0 3 0x40014200 idle0 1 390562 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 9476 6472K 6794K 78643K 10623 0 pcb 13 8K 8K 78643K 17 0 rtable 110 4K 5K 78643K 196 0 ifaddr 40 10K 10K 78643K 40 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 4K 78643K 17 0 iov 0 0K 0K 78643K 2 0 mount 1 1K 1K 78643K 1 0 vnodes 1215 76K 77K 78643K 1239 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 7 0K 0K 78643K 10 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 84 0 proc 47 38K 63K 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 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 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 115 25K 25K 78643K 795 0 UVM aobj 5 2K 2K 78643K 5 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 9 0K 0K 78643K 9 0 temp 61 3965K 4029K 78643K 1920 0 kqueue 3 4K 8K 78643K 5 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 1 2 0 2 2 0 8 0 unpcb 120 35 0 27 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 952 0 952 2 1 1 1 0 8 1 tcpcb 736 12 0 5 1 0 1 1 0 8 0 inpcb 304 40 0 32 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 kcovpl 48 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 3 0 1 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfrule 1360 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 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 semapl 112 5 0 0 1 0 1 1 0 8 0 shmpl 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 1471 0 77 88 0 88 88 0 8 0 ffsino 240 1471 0 77 83 0 83 83 0 8 0 nchpl 144 1742 0 145 60 0 60 60 0 8 0 uvmvnodes 72 1529 0 0 28 0 28 28 0 8 0 vnodes 224 1529 0 0 90 0 90 90 0 8 0 namei 1024 4211 0 4210 2 1 1 1 0 8 0 pfiaddrpl 120 2 0 0 1 0 1 1 0 8 0 scxspl 216 4981 0 4981 9 1 8 8 0 8 8 plimitpl 152 16 0 8 1 0 1 1 0 8 0 sigapl 424 271 0 242 4 0 4 4 0 8 0 futexpl 56 387 0 387 1 0 1 1 0 8 1 knotepl 112 64 0 44 1 0 1 1 0 8 0 kqueuepl 168 40 0 37 1 0 1 1 0 8 0 pipepl 304 71 0 60 1 0 1 1 0 8 0 fdescpl 432 256 0 242 2 0 2 2 0 8 0 filepl 120 1103 0 1002 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 242 0 242 2 1 1 1 0 8 1 processpl 1016 271 0 242 5 0 5 5 0 8 1 procpl 672 326 0 291 4 0 4 4 0 8 1 sockpl 432 94 0 76 4 0 4 4 0 8 1 mcl4k 4096 12 0 12 2 1 1 1 0 8 1 mcl2k 2048 168690 0 168621 27 9 18 20 0 8 8 mtagpl 96 13 0 2 2 1 1 1 0 8 0 mbufpl 256 183494 0 183324 15 2 13 13 0 8 0 bufpl 280 3292 0 169 224 0 224 224 0 8 0 anonpl 24 42388 0 23509 117 2 115 115 0 188 1 amapchunkpl 152 1338 0 975 17 0 17 17 0 158 3 amappl16 200 1053 0 225 44 0 44 44 0 8 0 amappl15 192 2 0 0 1 0 1 1 0 8 0 amappl14 184 52 0 47 1 0 1 1 0 8 0 amappl13 176 25 0 23 1 0 1 1 0 8 0 amappl12 168 40 0 35 1 0 1 1 0 8 0 amappl11 160 49 0 38 1 0 1 1 0 8 0 amappl10 152 3 0 0 1 0 1 1 0 8 0 amappl9 144 267 0 266 2 1 1 1 0 8 0 amappl8 136 112 0 83 2 0 2 2 0 8 0 amappl7 128 213 0 208 1 0 1 1 0 8 0 amappl6 120 61 0 51 1 0 1 1 0 8 0 amappl5 112 401 0 387 1 0 1 1 0 8 0 amappl4 104 298 0 271 1 0 1 1 0 8 0 amappl3 96 107 0 100 1 0 1 1 0 8 0 amappl2 88 1305 0 1243 3 1 2 3 0 8 0 amappl1 80 15043 0 14605 26 11 15 20 0 8 4 amappl 88 572 0 500 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 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 256 0 242 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 256 0 242 1 0 1 1 0 8 0 vmmpekpl 168 5938 0 5917 2 0 2 2 0 8 0 vmmpepl 168 39458 0 37516 127 7 120 120 0 357 35 vmsppl 272 255 0 242 2 0 2 2 0 8 1 rwobjpl 24 10501 0 9035 13 3 10 10 0 8 1 pdppl 4096 518 0 484 55 15 40 40 0 8 6 pvpl 32 144396 0 122628 180 0 180 180 0 265 2 pmappl 200 255 0 242 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 300 0 30 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(fffffd806d598b20) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022731ac0,3,ffff800021697a50) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8078e5d050,40287401,ffff800022731ac0,3,fffffd807f7b7660,ffff800021697a50) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807e1576a8,40287401,ffff800022731ac0,ffff800021697a50) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021697a50,ffff800022731bd0,ffff800022731c20) at sys_ioctl+0x4ac syscall(ffff800022731ca0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdf3e11fa6f0, 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(fffffd806d598b20) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022731ac0,3,ffff800021697a50) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8078e5d050,40287401,ffff800022731ac0,3,fffffd807f7b7660,ffff800021697a50) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807e1576a8,40287401,ffff800022731ac0,ffff800021697a50) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021697a50,ffff800022731bd0,ffff800022731c20) at sys_ioctl+0x4ac syscall(ffff800022731ca0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdf3e11fa6f0, count: -9