panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 31215 62113 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(fffffd807eb67788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024741bb0,3,ffff8000216707e0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8075d38050,40287401,ffff800024741bb0,3,fffffd807f7b79c0,ffff8000216707e0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8067b8ca68,40287401,ffff800024741bb0,ffff8000216707e0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216707e0,ffff800024741cc0,ffff800024741d10) at sys_ioctl+0x4ac syscall(ffff800024741d90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdeb9314d890, 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(fffffd807eb67788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024741bb0,3,ffff8000216707e0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8075d38050,40287401,ffff800024741bb0,3,fffffd807f7b79c0,ffff8000216707e0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8067b8ca68,40287401,ffff800024741bb0,ffff8000216707e0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216707e0,ffff800024741cc0,ffff800024741d10) at sys_ioctl+0x4ac syscall(ffff800024741d90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdeb9314d890, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000247415f0 rbx 0xffff800024741600 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0x46c9569afa3fa425 r11 0xd832d8eca6b692d0 r12 0x3000000008 r13 0xffff8000247416a0 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000247415e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=31215 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=65, nice=20 forw=0xffffffffffffffff, list=0xffff800021670d20,0xffffffff827ebf10 process=0xffff80002165dbf8 user=0xffff80002473c000, 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 62113 391371 40439 0 2 0 syz-executor.1 *62113 31215 40439 0 7 0x4000000 syz-executor.1 33729 495469 12722 0 2 0x2 syz-executor.0 40439 117853 12722 0 2 0x482 syz-executor.1 12722 371664 94109 0 3 0x82 thrsleep syz-fuzzer 12722 427988 94109 0 2 0x4000482 syz-fuzzer 12722 461737 94109 0 3 0x4000082 thrsleep syz-fuzzer 12722 445956 94109 0 3 0x4000082 thrsleep syz-fuzzer 12722 63027 94109 0 3 0x4000082 thrsleep syz-fuzzer 12722 79307 94109 0 3 0x4000082 kqread syz-fuzzer 12722 502882 94109 0 3 0x4000082 thrsleep syz-fuzzer 12722 250774 94109 0 3 0x4000082 thrsleep syz-fuzzer 94109 73771 47569 0 3 0x10008a sigsusp ksh 47569 116430 49978 0 3 0x92 select sshd 65999 396829 1 0 3 0x100083 ttyin getty 49978 497960 1 0 3 0x80 select sshd 1792 120152 46611 73 2 0x100090 syslogd 46611 79976 1 0 3 0x100082 netio syslogd 69895 379027 1 77 3 0x100090 poll dhclient 72518 291251 1 0 3 0x80 poll dhclient 23501 84634 0 0 3 0x14200 bored smr 63387 299955 0 0 2 0x14200 zerothread 47944 372792 0 0 3 0x14200 aiodoned aiodoned 39547 444360 0 0 2 0x14600 update 71434 195590 0 0 3 0x14200 cleaner cleaner 45912 462357 0 0 3 0x14200 reaper reaper 13462 99204 0 0 3 0x14200 pgdaemon pagedaemon 10831 29195 0 0 3 0x14200 bored crynlk 42754 509756 0 0 3 0x14200 bored crypto 16419 80060 0 0 3 0x14200 bored viomb 52132 10057 0 0 3 0x40014200 acpi0 acpi0 65431 160952 0 0 2 0x14200 softnet 79917 436901 0 0 3 0x14200 bored systqmp 43376 454046 0 0 3 0x14200 bored systq 28936 68254 0 0 3 0x40014200 bored softclock 8273 329051 0 0 3 0x40014200 idle0 1 235232 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 6667K 78643K 10601 0 pcb 13 8K 8K 78643K 20 0 rtable 101 3K 3K 78643K 253 0 ifaddr 39 10K 10K 78643K 39 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 2K 78643K 31 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 1233 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 67 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 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 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 23K 23K 78643K 758 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 1876 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 14 0 8 1 0 1 1 0 8 0 rtpcb 120 19 0 17 1 0 1 1 0 8 0 rtentry 112 61 0 19 2 0 2 2 0 8 0 unpcb 120 49 0 41 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 440 0 440 2 1 1 1 0 8 1 tcpcb 736 20 0 6 2 0 2 2 0 8 0 inpcb 304 47 0 40 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 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 196 0 10 12 0 12 12 0 8 0 art_table 32 197 0 10 2 0 2 2 0 8 0 art_node 16 60 0 24 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1450 0 54 88 0 88 88 0 8 0 ffsino 240 1450 0 54 83 0 83 83 0 8 0 nchpl 144 1710 0 113 60 0 60 60 0 8 0 uvmvnodes 72 1505 0 0 28 0 28 28 0 8 0 vnodes 224 1505 0 0 89 0 89 89 0 8 0 namei 1024 4146 0 4146 2 1 1 1 0 8 1 scxspl 216 4689 0 4689 2 1 1 2 0 8 1 plimitpl 152 16 0 8 1 0 1 1 0 8 0 sigapl 424 254 0 225 4 0 4 4 0 8 0 futexpl 56 330 0 330 1 0 1 1 0 8 1 knotepl 112 62 0 42 1 0 1 1 0 8 0 kqueuepl 168 17 0 15 1 0 1 1 0 8 0 pipepl 304 69 0 58 1 0 1 1 0 8 0 fdescpl 432 239 0 225 2 0 2 2 0 8 0 filepl 120 1090 0 990 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 225 0 225 2 1 1 1 0 8 1 processpl 1016 254 0 225 5 0 5 5 0 8 1 procpl 672 295 0 258 4 0 4 4 0 8 0 sockpl 432 115 0 98 3 0 3 3 0 8 0 mcl4k 4096 8 0 8 1 1 0 1 0 8 0 mcl2k 2048 174037 0 173973 28 12 16 25 0 8 7 mtagpl 96 7 0 2 2 1 1 1 0 8 0 mbufpl 256 188731 0 188627 16 3 13 14 0 8 2 bufpl 280 3275 0 169 222 0 222 222 0 8 0 anonpl 24 40224 0 22251 112 2 110 110 0 188 1 amapchunkpl 152 1260 0 876 18 0 18 18 0 158 2 amappl16 200 984 0 229 40 0 40 40 0 8 0 amappl15 192 2 0 0 1 0 1 1 0 8 0 amappl14 184 21 0 18 1 0 1 1 0 8 0 amappl13 176 24 0 22 1 0 1 1 0 8 0 amappl12 168 8 0 3 1 0 1 1 0 8 0 amappl11 160 50 0 39 1 0 1 1 0 8 0 amappl10 152 24 0 19 1 0 1 1 0 8 0 amappl9 144 282 0 282 1 1 0 1 0 8 0 amappl8 136 115 0 89 1 0 1 1 0 8 0 amappl7 128 214 0 208 1 0 1 1 0 8 0 amappl6 120 82 0 72 1 0 1 1 0 8 0 amappl5 112 379 0 365 1 0 1 1 0 8 0 amappl4 104 238 0 214 1 0 1 1 0 8 0 amappl3 96 109 0 102 1 0 1 1 0 8 0 amappl2 88 1147 0 1084 3 1 2 3 0 8 0 amappl1 80 14639 0 14199 28 11 17 21 0 8 6 amappl 88 536 0 466 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 239 0 225 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 239 0 225 1 0 1 1 0 8 0 vmmpekpl 168 5884 0 5865 1 0 1 1 0 8 0 vmmpepl 168 37128 0 35262 117 8 109 109 0 357 27 vmsppl 272 238 0 225 2 0 2 2 0 8 1 rwobjpl 24 10044 0 8650 12 2 10 10 0 8 1 pdppl 4096 484 0 450 53 13 40 40 0 8 6 pvpl 32 136677 0 115801 173 0 173 173 0 265 2 pmappl 200 238 0 225 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 299 0 32 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(fffffd807eb67788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024741bb0,3,ffff8000216707e0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8075d38050,40287401,ffff800024741bb0,3,fffffd807f7b79c0,ffff8000216707e0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8067b8ca68,40287401,ffff800024741bb0,ffff8000216707e0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216707e0,ffff800024741cc0,ffff800024741d10) at sys_ioctl+0x4ac syscall(ffff800024741d90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdeb9314d890, 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(fffffd807eb67788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800024741bb0,3,ffff8000216707e0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd8075d38050,40287401,ffff800024741bb0,3,fffffd807f7b79c0,ffff8000216707e0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd8067b8ca68,40287401,ffff800024741bb0,ffff8000216707e0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000216707e0,ffff800024741cc0,ffff800024741d10) at sys_ioctl+0x4ac syscall(ffff800024741d90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdeb9314d890, count: -9