panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *202368 58780 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(fffffd806e7326a8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024937bc0,3,ffff800021670a80) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd807cc53210,40287401,ffff800024937bc0,3,fffffd807f7b7ae0,ffff800021670a80) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807eb9b630,40287401,ffff800024937bc0,ffff800021670a80) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670a80,ffff800024937cd0,ffff800024937d20) at sys_ioctl+0x4ac syscall(ffff800024937da0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6227c3eba00, 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(fffffd806e7326a8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024937bc0,3,ffff800021670a80) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd807cc53210,40287401,ffff800024937bc0,3,fffffd807f7b7ae0,ffff800021670a80) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807eb9b630,40287401,ffff800024937bc0,ffff800021670a80) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670a80,ffff800024937cd0,ffff800024937d20) at sys_ioctl+0x4ac syscall(ffff800024937da0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6227c3eba00, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800024937600 rbx 0xffff800024937610 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0x6ad02c71fc366018 r11 0x30bc0b05ff71a88 r12 0x3000000008 r13 0xffff8000249376b0 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000249375f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=202368 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021670540,0xffffffff827ebf10 process=0xffff800021699be0 user=0xffff800024932000, vmspace=0xfffffd807effcee0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 58780 170210 45422 0 2 0 syz-executor.0 *58780 202368 45422 0 7 0x4000000 syz-executor.0 89879 455560 98825 0 2 0x2 syz-executor.1 45422 449681 98825 0 2 0x482 syz-executor.0 98825 323528 13977 0 3 0x82 kqread syz-fuzzer 98825 246250 13977 0 2 0x4000482 syz-fuzzer 98825 383501 13977 0 3 0x4000082 thrsleep syz-fuzzer 98825 341939 13977 0 3 0x4000082 thrsleep syz-fuzzer 98825 430247 13977 0 3 0x4000082 thrsleep syz-fuzzer 98825 378314 13977 0 3 0x4000082 thrsleep syz-fuzzer 98825 31115 13977 0 3 0x4000082 thrsleep syz-fuzzer 13977 111628 27052 0 3 0x10008a sigsusp ksh 27052 340011 2427 0 3 0x92 select sshd 85471 240629 1 0 3 0x100083 ttyin getty 2427 417748 1 0 3 0x80 select sshd 91433 380135 89056 73 3 0x100090 kqread syslogd 89056 484354 1 0 3 0x100082 netio syslogd 89472 198380 1 77 3 0x100090 poll dhclient 33835 239252 1 0 3 0x80 poll dhclient 78519 30600 0 0 3 0x14200 bored smr 40341 233854 0 0 2 0x14200 zerothread 21734 265006 0 0 3 0x14200 aiodoned aiodoned 95018 137603 0 0 3 0x14200 syncer update 5576 472827 0 0 3 0x14200 cleaner cleaner 98916 477076 0 0 3 0x14200 reaper reaper 99148 224585 0 0 3 0x14200 pgdaemon pagedaemon 70104 230432 0 0 3 0x14200 bored crynlk 53903 115084 0 0 3 0x14200 bored crypto 63003 317237 0 0 3 0x14200 bored viomb 36945 31600 0 0 3 0x40014200 acpi0 acpi0 49470 470300 0 0 3 0x14200 bored softnet 97756 279197 0 0 3 0x14200 bored systqmp 23276 71132 0 0 3 0x14200 bored systq 66760 518486 0 0 2 0x40014200 softclock 85077 433584 0 0 3 0x40014200 idle0 1 343851 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 9467 6343K 6343K 78643K 10572 0 pcb 13 8K 8K 78643K 19 0 rtable 109 3K 3K 78643K 205 0 ifaddr 40 10K 10K 78643K 43 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 2K 78643K 15 0 iov 0 0K 16K 78643K 17 0 mount 1 1K 1K 78643K 1 0 vnodes 1220 77K 77K 78643K 1229 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 7 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 21K 78643K 103 0 proc 47 38K 54K 78643K 369 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 8 0 in_multi 37 2K 2K 78643K 49 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 43 201K 201K 78643K 43 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 110 22K 23K 78643K 848 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 5 0K 0K 78643K 13 0 temp 76 3967K 4031K 78643K 1971 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 21 0 19 1 0 1 1 0 8 0 rtentry 112 53 0 7 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 305 0 305 1 0 1 1 0 8 1 tcpcb 736 20 0 13 2 0 2 2 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 5 0 4 1 0 1 1 0 8 0 inpcb 304 74 0 67 2 0 2 2 0 8 1 nd6 48 10 0 3 1 0 1 1 0 8 0 pkpcb 40 4 0 4 1 0 1 1 0 8 1 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 49 0 8 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 10 1 0 1 1 0 8 1 semupl 112 4 0 4 1 0 1 1 0 8 1 semapl 112 5 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1507 0 111 88 0 88 88 0 8 0 ffsino 240 1507 0 111 83 0 83 83 0 8 0 nchpl 144 1813 0 216 60 0 60 60 0 8 0 uvmvnodes 72 1556 0 0 29 0 29 29 0 8 0 vnodes 224 1556 0 0 92 0 92 92 0 8 0 namei 1024 4380 0 4379 2 1 1 1 0 8 0 scxspl 216 5285 0 5285 10 2 8 8 0 8 8 plimitpl 152 15 0 7 1 0 1 1 0 8 0 sigapl 424 292 0 263 4 0 4 4 0 8 0 futexpl 56 828 0 828 1 0 1 1 0 8 1 knotepl 112 62 0 42 1 0 1 1 0 8 0 kqueuepl 168 71 0 69 1 0 1 1 0 8 0 pipepl 304 69 0 58 1 0 1 1 0 8 0 fdescpl 432 275 0 261 2 0 2 2 0 8 0 filepl 120 1219 0 1117 4 0 4 4 0 8 0 lockfpl 104 21 0 20 1 0 1 1 0 8 0 lockfspl 48 10 0 9 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 60 0 53 1 0 1 1 0 8 0 zombiepl 144 263 0 263 2 1 1 1 0 8 1 processpl 1016 292 0 263 4 0 4 4 0 8 0 procpl 672 378 0 342 4 0 4 4 0 8 0 sockpl 432 134 0 117 4 1 3 3 0 8 1 mcl12k 12288 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 15 0 15 2 1 1 1 0 8 1 mcl2k 2048 176844 0 176786 21 5 16 19 0 8 7 mtagpl 96 2 0 2 1 1 0 1 0 8 0 mbufpl 256 192303 0 192118 16 1 15 15 0 8 0 bufpl 280 3331 0 169 226 0 226 226 0 8 0 anonpl 24 43625 0 24651 117 2 115 115 0 188 0 amapchunkpl 152 1467 0 1106 17 1 16 16 0 158 1 amappl16 200 1108 0 274 45 0 45 45 0 8 1 amappl15 192 1 0 0 1 0 1 1 0 8 0 amappl14 184 22 0 18 1 0 1 1 0 8 0 amappl13 176 33 0 30 1 0 1 1 0 8 0 amappl12 168 51 0 44 2 1 1 1 0 8 0 amappl11 160 52 0 40 1 0 1 1 0 8 0 amappl10 152 48 0 42 1 0 1 1 0 8 0 amappl9 144 272 0 272 1 1 0 1 0 8 0 amappl8 136 118 0 89 2 0 2 2 0 8 0 amappl7 128 215 0 209 1 0 1 1 0 8 0 amappl6 120 96 0 86 1 0 1 1 0 8 0 amappl5 112 400 0 385 1 0 1 1 0 8 0 amappl4 104 272 0 249 1 0 1 1 0 8 0 amappl3 96 119 0 110 1 0 1 1 0 8 0 amappl2 88 1440 0 1377 3 1 2 3 0 8 0 amappl1 80 15969 0 15527 28 14 14 20 0 8 4 amappl 88 616 0 548 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 275 0 261 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 275 0 261 1 0 1 1 0 8 0 vmmpekpl 168 6038 0 6020 1 0 1 1 0 8 0 vmmpepl 168 41974 0 40012 126 12 114 114 0 357 28 vmsppl 272 274 0 261 2 0 2 2 0 8 1 rwobjpl 24 11127 0 9646 12 2 10 10 0 8 0 pdppl 4096 556 0 522 52 14 38 38 0 8 4 pvpl 32 160634 0 138735 185 0 185 185 0 265 7 pmappl 200 274 0 261 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 291 0 24 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(fffffd806e7326a8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024937bc0,3,ffff800021670a80) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd807cc53210,40287401,ffff800024937bc0,3,fffffd807f7b7ae0,ffff800021670a80) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807eb9b630,40287401,ffff800024937bc0,ffff800021670a80) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670a80,ffff800024937cd0,ffff800024937d20) at sys_ioctl+0x4ac syscall(ffff800024937da0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6227c3eba00, 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(fffffd806e7326a8) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024937bc0,3,ffff800021670a80) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd807cc53210,40287401,ffff800024937bc0,3,fffffd807f7b7ae0,ffff800021670a80) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd807eb9b630,40287401,ffff800024937bc0,ffff800021670a80) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021670a80,ffff800024937cd0,ffff800024937d20) at sys_ioctl+0x4ac syscall(ffff800024937da0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6227c3eba00, count: -9