panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *506461 56858 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(fffffd807c774788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022737d00,3,ffff800021671260) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806ef5d3d0,40287401,ffff800022737d00,3,fffffd807f7b79c0,ffff800021671260) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806783bc48,40287401,ffff800022737d00,ffff800021671260) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671260,ffff800022737e10,ffff800022737e60) at sys_ioctl+0x4ac syscall(ffff800022737ee0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3542fdb09c0, 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(fffffd807c774788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022737d00,3,ffff800021671260) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806ef5d3d0,40287401,ffff800022737d00,3,fffffd807f7b79c0,ffff800021671260) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806783bc48,40287401,ffff800022737d00,ffff800021671260) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671260,ffff800022737e10,ffff800022737e60) at sys_ioctl+0x4ac syscall(ffff800022737ee0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3542fdb09c0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800022737740 rbx 0xffff800022737750 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0x3fb8b4e8b463dcaa r11 0xd9fb4e1f5eb0ddb r12 0x3000000008 r13 0xffff8000227377f0 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022737730 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=506461 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800021697510,0xffffffff827ebf10 process=0xffff80002165d010 user=0xffff800022732000, 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 56858 474078 50169 0 2 0 syz-executor.0 *56858 506461 50169 0 7 0x4000000 syz-executor.0 88524 25102 52862 0 2 0x2 syz-executor.1 50169 132910 52862 0 2 0x2 syz-executor.0 52862 236923 75307 0 3 0x82 thrsleep syz-fuzzer 52862 250768 75307 0 2 0x4000482 syz-fuzzer 52862 144019 75307 0 3 0x4000082 thrsleep syz-fuzzer 52862 160167 75307 0 3 0x4000082 thrsleep syz-fuzzer 52862 287752 75307 0 3 0x4000082 thrsleep syz-fuzzer 52862 294428 75307 0 3 0x4000082 thrsleep syz-fuzzer 52862 502823 75307 0 3 0x4000082 kqread syz-fuzzer 75307 61148 2340 0 3 0x10008a sigsusp ksh 2340 143111 16222 0 3 0x92 select sshd 53237 451023 1 0 3 0x100083 ttyin getty 16222 129459 1 0 3 0x80 select sshd 76121 94050 65731 73 3 0x100090 kqread syslogd 65731 290617 1 0 3 0x100082 netio syslogd 42215 408292 1 77 3 0x100090 poll dhclient 24788 506697 1 0 3 0x80 poll dhclient 77405 297027 0 0 3 0x14200 bored smr 49970 349966 0 0 2 0x14200 zerothread 43962 479949 0 0 3 0x14200 aiodoned aiodoned 25016 463541 0 0 3 0x14200 syncer update 40071 345821 0 0 3 0x14200 cleaner cleaner 52180 81205 0 0 3 0x14200 reaper reaper 41907 140854 0 0 3 0x14200 pgdaemon pagedaemon 8401 207958 0 0 3 0x14200 bored crynlk 2790 265912 0 0 3 0x14200 bored crypto 70148 114178 0 0 3 0x14200 bored viomb 54842 104692 0 0 3 0x40014200 acpi0 acpi0 70834 241886 0 0 2 0x14200 softnet 30328 359895 0 0 3 0x14200 bored systqmp 62165 164405 0 0 3 0x14200 bored systq 87561 237253 0 0 3 0x40014200 bored softclock 45084 433235 0 0 3 0x40014200 idle0 1 187893 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 9466 6342K 6600K 78643K 10576 0 pcb 13 8K 8K 78643K 13 0 rtable 105 3K 3K 78643K 189 0 ifaddr 39 10K 10K 78643K 39 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 2K 78643K 15 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 1225 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 45 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 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 117 23K 24K 78643K 717 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 1818 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 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 943 0 943 2 1 1 1 0 8 1 tcpcb 736 10 0 5 1 0 1 1 0 8 0 inpcb 304 32 0 24 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 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 1427 0 31 88 0 88 88 0 8 0 ffsino 240 1427 0 31 83 0 83 83 0 8 0 nchpl 144 1655 0 58 60 0 60 60 0 8 0 uvmvnodes 72 1474 0 0 27 0 27 27 0 8 0 vnodes 224 1474 0 0 87 0 87 87 0 8 0 namei 1024 4025 0 4024 2 1 1 1 0 8 0 scxspl 216 4747 0 4747 9 1 8 8 0 8 8 plimitpl 152 16 0 8 1 0 1 1 0 8 0 sigapl 424 232 0 203 4 0 4 4 0 8 0 futexpl 56 82 0 82 1 0 1 1 0 8 1 knotepl 112 62 0 42 1 0 1 1 0 8 0 kqueuepl 168 12 0 10 1 0 1 1 0 8 0 pipepl 304 69 0 58 1 0 1 1 0 8 0 fdescpl 432 217 0 203 2 0 2 2 0 8 0 filepl 120 992 0 891 4 0 4 4 0 8 0 lockfpl 104 9 0 8 1 0 1 1 0 8 0 lockfspl 48 5 0 4 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 203 0 203 2 1 1 1 0 8 1 processpl 1016 232 0 203 5 0 5 5 0 8 1 procpl 672 249 0 213 4 0 4 4 0 8 0 sockpl 432 74 0 56 3 0 3 3 0 8 0 mcl4k 4096 8 0 8 1 1 0 1 0 8 0 mcl2k 2048 163112 0 163031 77 59 18 38 0 8 7 mtagpl 96 6 0 2 2 1 1 1 0 8 0 mbufpl 256 177432 0 177285 29 15 14 20 0 8 3 bufpl 280 3254 0 169 221 0 221 221 0 8 0 anonpl 24 39009 0 21081 111 2 109 109 0 188 1 amapchunkpl 152 1267 0 889 18 1 17 17 0 158 2 amappl16 200 875 0 117 40 0 40 40 0 8 0 amappl15 192 1 0 0 1 0 1 1 0 8 0 amappl14 184 30 0 23 1 0 1 1 0 8 0 amappl13 176 26 0 22 1 0 1 1 0 8 0 amappl12 168 11 0 10 2 1 1 1 0 8 0 amappl11 160 45 0 34 1 0 1 1 0 8 0 amappl10 152 3 0 0 1 0 1 1 0 8 0 amappl9 144 285 0 284 2 1 1 1 0 8 0 amappl8 136 117 0 86 2 0 2 2 0 8 0 amappl7 128 227 0 221 1 0 1 1 0 8 0 amappl6 120 62 0 55 1 0 1 1 0 8 0 amappl5 112 363 0 349 1 0 1 1 0 8 0 amappl4 104 239 0 215 1 0 1 1 0 8 0 amappl3 96 108 0 101 1 0 1 1 0 8 0 amappl2 88 983 0 917 3 1 2 3 0 8 0 amappl1 80 14185 0 13730 29 17 12 21 0 8 2 amappl 88 496 0 422 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 217 0 203 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 217 0 203 1 0 1 1 0 8 0 vmmpekpl 168 5813 0 5794 1 0 1 1 0 8 0 vmmpepl 168 34573 0 32676 122 11 111 111 0 357 28 vmsppl 272 216 0 203 2 0 2 2 0 8 1 rwobjpl 24 9519 0 8099 14 4 10 10 0 8 1 pdppl 4096 440 0 406 58 18 40 40 0 8 6 pvpl 32 132172 0 111370 173 2 171 171 0 265 1 pmappl 200 216 0 203 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 365 0 96 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(fffffd807c774788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022737d00,3,ffff800021671260) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806ef5d3d0,40287401,ffff800022737d00,3,fffffd807f7b79c0,ffff800021671260) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806783bc48,40287401,ffff800022737d00,ffff800021671260) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671260,ffff800022737e10,ffff800022737e60) at sys_ioctl+0x4ac syscall(ffff800022737ee0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3542fdb09c0, 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(fffffd807c774788) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff800022737d00,3,ffff800021671260) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806ef5d3d0,40287401,ffff800022737d00,3,fffffd807f7b79c0,ffff800021671260) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd806783bc48,40287401,ffff800022737d00,ffff800021671260) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671260,ffff800022737e10,ffff800022737e60) at sys_ioctl+0x4ac syscall(ffff800022737ee0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3542fdb09c0, count: -9