panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *100937 48628 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(fffffd80678fdc08) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002474cf20,3,ffff800021671ce0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e6c7050,40287401,ffff80002474cf20,3,fffffd807f7b7900,ffff800021671ce0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd80676dce28,40287401,ffff80002474cf20,ffff800021671ce0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671ce0,ffff80002474d030,ffff80002474d080) at sys_ioctl+0x4ac syscall(ffff80002474d100) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72c9a2db220, 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(fffffd80678fdc08) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002474cf20,3,ffff800021671ce0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e6c7050,40287401,ffff80002474cf20,3,fffffd807f7b7900,ffff800021671ce0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd80676dce28,40287401,ffff80002474cf20,ffff800021671ce0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671ce0,ffff80002474d030,ffff80002474d080) at sys_ioctl+0x4ac syscall(ffff80002474d100) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72c9a2db220, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002474c960 rbx 0xffff80002474c970 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff820e50f5 kprintf+0x155 r9 0x1 r10 0xa2744df3ebd7594c r11 0x19e3429a4b4dce61 r12 0x3000000008 r13 0xffff80002474ca10 r14 0x100 r15 0x1 rip 0xffffffff81ab85c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002474c950 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=100937 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=66, nice=20 forw=0xffffffffffffffff, list=0xffff800021671260,0xffff800021670a90 process=0xffff80002165dbf8 user=0xffff800024748000, vmspace=0xfffffd807effc110 estcpu=16, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 48628 510381 95084 0 2 0 syz-executor.1 48628 136559 95084 0 3 0x4000080 msgwait syz-executor.1 *48628 100937 95084 0 7 0x4000000 syz-executor.1 48628 257029 95084 0 3 0x4000080 fsleep syz-executor.1 95084 406345 64115 0 2 0x482 syz-executor.1 23057 396748 64115 0 3 0x82 piperd syz-executor.0 64115 219060 86338 0 3 0x82 thrsleep syz-fuzzer 64115 221551 86338 0 3 0x4000082 thrsleep syz-fuzzer 64115 133870 86338 0 3 0x4000082 kqread syz-fuzzer 64115 448101 86338 0 3 0x4000082 thrsleep syz-fuzzer 64115 290281 86338 0 3 0x4000082 thrsleep syz-fuzzer 64115 495299 86338 0 3 0x4000082 thrsleep syz-fuzzer 64115 227336 86338 0 3 0x4000082 thrsleep syz-fuzzer 86338 290871 50951 0 3 0x10008a sigsusp ksh 50951 488547 56368 0 3 0x92 select sshd 44088 44732 1 0 3 0x100083 ttyin getty 56368 119947 1 0 3 0x80 select sshd 62981 13878 95974 73 3 0x100090 kqread syslogd 95974 421575 1 0 3 0x100082 netio syslogd 52688 65303 1 77 3 0x100090 poll dhclient 79427 344405 1 0 3 0x80 poll dhclient 87198 232180 0 0 3 0x14200 bored smr 71915 202620 0 0 3 0x14200 pgzero zerothread 99883 337965 0 0 3 0x14200 aiodoned aiodoned 8281 516400 0 0 3 0x14200 syncer update 98647 131023 0 0 3 0x14200 cleaner cleaner 48551 185240 0 0 3 0x14200 reaper reaper 22268 451561 0 0 3 0x14200 pgdaemon pagedaemon 76970 402559 0 0 3 0x14200 bored crynlk 41667 422351 0 0 3 0x14200 bored crypto 31310 335232 0 0 3 0x14200 bored viomb 46584 50352 0 0 3 0x40014200 acpi0 acpi0 68994 232329 0 0 3 0x14200 bored softnet 50438 246919 0 0 3 0x14200 bored systqmp 9157 291568 0 0 3 0x14200 bored systq 74183 335896 0 0 3 0x40014200 bored softclock 68256 433768 0 0 3 0x40014200 idle0 1 462693 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 6342K 6859K 78643K 10617 0 pcb 13 8K 8K 78643K 22 0 rtable 105 3K 3K 78643K 190 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 1221 77K 77K 78643K 1241 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 94 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 4 0 in_multi 33 2K 2K 78643K 41 0 ether_multi 1 0K 0K 78643K 5 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 121 23K 23K 78643K 825 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 10 0 NDP 5 0K 0K 78643K 9 0 temp 61 3963K 4027K 78643K 1965 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 25 0 17 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 779 0 779 1 0 1 1 0 8 1 tcpcb 736 20 0 16 2 0 2 2 0 8 1 inpcb 304 61 0 53 2 0 2 2 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 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1489 0 92 88 0 88 88 0 8 0 ffsino 240 1489 0 92 83 0 83 83 0 8 0 nchpl 144 1765 0 168 60 0 60 60 0 8 0 uvmvnodes 72 1545 0 0 29 0 29 29 0 8 0 vnodes 224 1545 0 0 91 0 91 91 0 8 0 namei 1024 4282 0 4282 2 1 1 1 0 8 1 scxspl 216 5064 0 5064 9 2 7 8 0 8 7 plimitpl 152 16 0 7 1 0 1 1 0 8 0 sigapl 424 281 0 252 4 0 4 4 0 8 0 futexpl 56 513 0 512 1 0 1 1 0 8 0 knotepl 112 62 0 42 1 0 1 1 0 8 0 kqueuepl 168 49 0 47 1 0 1 1 0 8 0 pipepl 304 69 0 58 1 0 1 1 0 8 0 fdescpl 432 266 0 252 2 0 2 2 0 8 0 filepl 120 1148 0 1047 4 0 4 4 0 8 0 lockfpl 104 13 0 12 1 0 1 1 0 8 0 lockfspl 48 6 0 5 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 75 0 68 1 0 1 1 0 8 0 zombiepl 144 252 0 252 2 1 1 1 0 8 1 processpl 1016 281 0 252 5 0 5 5 0 8 1 procpl 672 352 0 314 4 0 4 4 0 8 0 sockpl 432 105 0 87 4 1 3 3 0 8 1 mcl64k 65536 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 2 0 2 1 0 1 1 0 8 1 mcl4k 4096 10 0 10 2 1 1 1 0 8 1 mcl2k 2048 170983 0 170910 39 21 18 28 0 8 7 mtagpl 96 2 0 2 1 1 0 1 0 8 0 mbufpl 256 185858 0 185695 18 2 16 16 0 8 0 bufpl 280 3304 0 169 224 0 224 224 0 8 0 anonpl 24 42652 0 23951 116 2 114 114 0 188 1 amapchunkpl 152 1432 0 1056 17 0 17 17 0 158 1 amappl16 200 1060 0 259 43 0 43 43 0 8 0 amappl15 192 44 0 40 1 0 1 1 0 8 0 amappl14 184 21 0 18 1 0 1 1 0 8 0 amappl13 176 27 0 24 1 0 1 1 0 8 0 amappl12 168 16 0 13 1 0 1 1 0 8 0 amappl11 160 50 0 37 1 0 1 1 0 8 0 amappl10 152 5 0 1 1 0 1 1 0 8 0 amappl9 144 294 0 292 2 1 1 1 0 8 0 amappl8 136 122 0 90 2 0 2 2 0 8 0 amappl7 128 245 0 240 1 0 1 1 0 8 0 amappl6 120 60 0 50 1 0 1 1 0 8 0 amappl5 112 437 0 420 1 0 1 1 0 8 0 amappl4 104 242 0 217 1 0 1 1 0 8 0 amappl3 96 110 0 102 1 0 1 1 0 8 0 amappl2 88 1357 0 1293 3 1 2 3 0 8 0 amappl1 80 15678 0 15213 28 16 12 21 0 8 1 amappl 88 598 0 527 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 266 0 252 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 266 0 252 1 0 1 1 0 8 0 vmmpekpl 168 5997 0 5976 2 0 2 2 0 8 0 vmmpepl 168 40590 0 38639 130 11 119 119 0 357 34 vmsppl 272 265 0 252 2 0 2 2 0 8 1 rwobjpl 24 10806 0 9328 13 3 10 10 0 8 0 pdppl 4096 538 0 504 55 15 40 40 0 8 6 pvpl 32 149667 0 127950 179 0 179 179 0 265 3 pmappl 200 265 0 252 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 316 0 42 9 0 9 9 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(fffffd80678fdc08) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002474cf20,3,ffff800021671ce0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e6c7050,40287401,ffff80002474cf20,3,fffffd807f7b7900,ffff800021671ce0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd80676dce28,40287401,ffff80002474cf20,ffff800021671ce0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671ce0,ffff80002474d030,ffff80002474d080) at sys_ioctl+0x4ac syscall(ffff80002474d100) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72c9a2db220, 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(fffffd80678fdc08) at vrele+0x187 sys/kern/vfs_subr.c:803 ptmioctl(5100,40287401,ffff80002474cf20,3,ffff800021671ce0) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225 VOP_IOCTL(fffffd806e6c7050,40287401,ffff80002474cf20,3,fffffd807f7b7900,ffff800021671ce0) at VOP_IOCTL+0x91 sys/kern/vfs_vops.c:297 vn_ioctl(fffffd80676dce28,40287401,ffff80002474cf20,ffff800021671ce0) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021671ce0,ffff80002474d030,ffff80002474d080) at sys_ioctl+0x4ac syscall(ffff80002474d100) at syscall+0x507 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72c9a2db220, count: -9