panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *372369 77639 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(fffffd80645febf0) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002170aff0,3,ffff8000216977b0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e715130,40287401,ffff80002170aff0,3,fffffd807f7b79c0,ffff8000216977b0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8069a9cc48,40287401,ffff80002170aff0,ffff8000216977b0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216977b0,ffff80002170b100,ffff80002170b150) at sys_ioctl+0x4ac syscall(ffff80002170b1d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xddaeab39d0, 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(fffffd80645febf0) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002170aff0,3,ffff8000216977b0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e715130,40287401,ffff80002170aff0,3,fffffd807f7b79c0,ffff8000216977b0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8069a9cc48,40287401,ffff80002170aff0,ffff8000216977b0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216977b0,ffff80002170b100,ffff80002170b150) at sys_ioctl+0x4ac syscall(ffff80002170b1d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xddaeab39d0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002170aa30 rbx 0xffff80002170aa40 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0x282bbff76555d25c r11 0x8d84884eb3ce6eb7 r12 0x3000000008 r13 0xffff80002170aae0 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002170aa20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=372369 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffffcd28,0xffffffff827ebf10 process=0xffff80002165dff0 user=0xffff800021706000, vmspace=0xfffffd807effcbb0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 77639 437590 74425 0 2 0 syz-executor.0 *77639 372369 74425 0 7 0x4000000 syz-executor.0 41356 460073 5610 0 2 0x482 syz-executor.1 74425 263665 5610 0 2 0x482 syz-executor.0 5610 490167 16644 0 3 0x82 thrsleep syz-fuzzer 5610 55760 16644 0 3 0x4000082 thrsleep syz-fuzzer 5610 422672 16644 0 3 0x4000082 kqread syz-fuzzer 5610 113037 16644 0 3 0x4000082 thrsleep syz-fuzzer 5610 470300 16644 0 3 0x4000082 thrsleep syz-fuzzer 5610 433959 16644 0 3 0x4000082 thrsleep syz-fuzzer 5610 363401 16644 0 3 0x4000082 thrsleep syz-fuzzer 16644 503706 88468 0 3 0x10008a sigsusp ksh 88468 450457 39042 0 3 0x92 select sshd 11135 223683 1 0 3 0x100083 ttyin getty 39042 311098 1 0 3 0x80 select sshd 1553 302645 22098 73 3 0x100090 kqread syslogd 22098 374379 1 0 3 0x100082 netio syslogd 98440 268121 1 77 3 0x100090 poll dhclient 95435 54658 1 0 3 0x80 poll dhclient 73103 521612 0 0 3 0x14200 bored smr 64878 422414 0 0 2 0x14200 zerothread 38722 494219 0 0 3 0x14200 aiodoned aiodoned 37701 307816 0 0 3 0x14200 syncer update 39299 226138 0 0 3 0x14200 cleaner cleaner 67948 441268 0 0 3 0x14200 reaper reaper 60222 96224 0 0 3 0x14200 pgdaemon pagedaemon 90130 469783 0 0 3 0x14200 bored crynlk 76940 170704 0 0 3 0x14200 bored crypto 51142 45769 0 0 3 0x14200 bored viomb 7321 468153 0 0 3 0x40014200 acpi0 acpi0 50374 439342 0 0 3 0x14200 bored softnet 98926 194043 0 0 3 0x14200 bored systqmp 97437 335668 0 0 3 0x14200 bored systq 87173 257964 0 0 3 0x40014200 bored softclock 76653 172802 0 0 3 0x40014200 idle0 1 353788 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 6338K 6476K 78643K 10579 0 pcb 13 8K 8K 78643K 13 0 rtable 105 3K 3K 78643K 205 0 ifaddr 39 10K 10K 78643K 56 0 counters 21 16K 16K 78643K 25 0 ioctlops 0 0K 2K 78643K 15 0 mount 1 1K 1K 78643K 1 0 vnodes 1218 77K 77K 78643K 1228 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 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 58 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 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 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 115 23K 24K 78643K 743 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 13 0 temp 61 3963K 4027K 78643K 1851 0 kqueue 4 6K 8K 78643K 9 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 23 0 15 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 374 0 374 2 1 1 1 0 8 1 tcpcb 736 10 0 6 1 0 1 1 0 8 0 inpcb 304 32 0 25 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 ppxss 1128 4 0 4 1 0 1 1 0 8 1 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 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1449 0 53 88 0 88 88 0 8 0 ffsino 240 1449 0 53 83 0 83 83 0 8 0 nchpl 144 1691 0 93 60 0 60 60 0 8 0 uvmvnodes 72 1494 0 0 28 0 28 28 0 8 0 vnodes 224 1494 0 0 88 0 88 88 0 8 0 namei 1024 4096 0 4096 2 1 1 1 0 8 1 scxspl 216 4845 0 4845 9 8 1 8 0 8 1 plimitpl 152 16 0 8 1 0 1 1 0 8 0 sigapl 424 245 0 216 4 0 4 4 0 8 0 futexpl 56 147 0 147 1 0 1 1 0 8 1 knotepl 112 68 0 48 1 0 1 1 0 8 0 kqueuepl 168 21 0 18 1 0 1 1 0 8 0 pipepl 304 71 0 60 2 1 1 1 0 8 0 fdescpl 432 230 0 216 2 0 2 2 0 8 0 filepl 120 1024 0 923 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 216 0 215 2 1 1 1 0 8 0 processpl 1016 245 0 215 5 0 5 5 0 8 1 procpl 672 275 0 238 4 0 4 4 0 8 0 sockpl 432 74 0 57 4 1 3 3 0 8 1 mcl4k 4096 8 0 8 1 1 0 1 0 8 0 mcl2k 2048 172519 0 172465 39 24 15 24 0 8 8 mtagpl 96 2 0 2 1 1 0 1 0 8 0 mbufpl 256 188015 0 187939 18 8 10 14 0 8 2 bufpl 280 3264 0 169 222 0 222 222 0 8 0 anonpl 24 39323 0 21865 109 3 106 106 0 188 0 amapchunkpl 152 1386 0 1006 20 0 20 20 0 158 5 amappl16 200 895 0 165 39 0 39 39 0 8 0 amappl15 192 1 0 0 1 0 1 1 0 8 0 amappl14 184 35 0 30 1 0 1 1 0 8 0 amappl13 176 44 0 39 2 1 1 1 0 8 0 amappl12 168 6 0 4 2 1 1 1 0 8 0 amappl11 160 46 0 35 1 0 1 1 0 8 0 amappl10 152 5 0 1 1 0 1 1 0 8 0 amappl9 144 123 0 122 1 0 1 1 0 8 0 amappl8 136 120 0 87 2 0 2 2 0 8 0 amappl7 128 214 0 210 1 0 1 1 0 8 0 amappl6 120 60 0 53 1 0 1 1 0 8 0 amappl5 112 674 0 659 1 0 1 1 0 8 0 amappl4 104 239 0 215 1 0 1 1 0 8 0 amappl3 96 137 0 126 1 0 1 1 0 8 0 amappl2 88 1076 0 1014 4 2 2 3 0 8 0 amappl1 80 14524 0 14086 28 16 12 20 0 8 1 amappl 88 521 0 448 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 230 0 216 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 230 0 216 1 0 1 1 0 8 0 vmmpekpl 168 5885 0 5863 2 0 2 2 0 8 0 vmmpepl 168 36256 0 34404 133 22 111 111 0 357 30 vmsppl 272 229 0 216 2 0 2 2 0 8 1 rwobjpl 24 9961 0 8585 15 5 10 10 0 8 1 pdppl 4096 466 0 432 58 18 40 40 0 8 6 pvpl 32 135084 0 114720 173 4 169 169 0 265 2 pmappl 200 229 0 216 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 316 0 54 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(fffffd80645febf0) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002170aff0,3,ffff8000216977b0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e715130,40287401,ffff80002170aff0,3,fffffd807f7b79c0,ffff8000216977b0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8069a9cc48,40287401,ffff80002170aff0,ffff8000216977b0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216977b0,ffff80002170b100,ffff80002170b150) at sys_ioctl+0x4ac syscall(ffff80002170b1d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xddaeab39d0, 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(fffffd80645febf0) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002170aff0,3,ffff8000216977b0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e715130,40287401,ffff80002170aff0,3,fffffd807f7b79c0,ffff8000216977b0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8069a9cc48,40287401,ffff80002170aff0,ffff8000216977b0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216977b0,ffff80002170b100,ffff80002170b150) at sys_ioctl+0x4ac syscall(ffff80002170b1d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xddaeab39d0, count: -9