panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 91775 69743 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 vrele(fffffd8039105c68) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a045e0,1,ffff800014941b40) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374043f0,c0106477,ffff800015a045e0,1,fffffd803f7c6ae0,ffff800014941b40) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fa4c718,c0106477,ffff800015a045e0,ffff800014941b40) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800014941b40,ffff800015a046f8,ffff800015a04760) at sys_ioctl+0x5b8 syscall(ffff800015a047c0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,e6047764010) at Xsyscall+0x128 end of kernel end trace frame: 0xe62a452da40, 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() at panic+0x15c sys/kern/subr_prf.c:207 vrele(fffffd8039105c68) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a045e0,1,ffff800014941b40) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374043f0,c0106477,ffff800015a045e0,1,fffffd803f7c6ae0,ffff800014941b40) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fa4c718,c0106477,ffff800015a045e0,ffff800014941b40) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800014941b40,ffff800015a046f8,ffff800015a04760) at sys_ioctl+0x5b8 syscall(ffff800015a047c0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,e6047764010) at Xsyscall+0x128 end of kernel end trace frame: 0xe62a452da40, count: -9 ddb> show registers rdi 0xffffffff81bc2977 db_enter+0x17 rsi 0x79ee __ALIGN_SIZE+0x69ee rbp 0xffff800015a041a0 rbx 0xffff800015a04250 rdx 0x79ef __ALIGN_SIZE+0x69ef rcx 0xffff8000149ed000 rax 0xffff8000149ed000 r8 0xffff800015a04160 r9 0x1 r10 0xffff800000992b40 r11 0x26e007d14f029eb2 r12 0x3000000008 r13 0xffff800015a041b0 r14 0x100 r15 0x1 rip 0xffffffff81bc2978 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015a04190 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=91775 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff8000149409f8,0xffff800014940518 process=0xffff8000ffff7450 user=0xffff8000159ff000, vmspace=0xfffffd803f00cee0 estcpu=30, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 69743 20961 36028 0 2 0 syz-executor.1 *69743 91775 36028 0 7 0x4000000 syz-executor.1 69743 319274 36028 0 2 0x4000000 syz-executor.1 87875 243353 7781 0 2 0 syz-executor.0 87875 263755 7781 0 3 0x4000080 ttyout syz-executor.0 87875 449405 7781 0 3 0x4000080 fsleep syz-executor.0 52703 334292 1 0 3 0x100083 ttyin getty 77407 125708 0 0 3 0x14200 bored sosplice 7781 365519 54866 0 2 0x482 syz-executor.0 36028 234948 54866 0 2 0x482 syz-executor.1 54866 104158 35575 0 3 0x82 kqread syz-fuzzer 54866 165303 35575 0 3 0x4000082 thrsleep syz-fuzzer 54866 427783 35575 0 3 0x4000082 thrsleep syz-fuzzer 54866 54319 35575 0 3 0x4000082 thrsleep syz-fuzzer 54866 183008 35575 0 3 0x4000082 thrsleep syz-fuzzer 54866 111776 35575 0 3 0x4000082 thrsleep syz-fuzzer 54866 79574 35575 0 3 0x4000082 thrsleep syz-fuzzer 35575 421450 58798 0 3 0x10008a pause ksh 58798 237107 3071 0 3 0x92 select sshd 3071 84890 1 0 3 0x80 select sshd 35536 209298 74516 73 2 0x100090 syslogd 74516 330795 1 0 3 0x100082 netio syslogd 93392 66073 1 77 3 0x100090 poll dhclient 48679 344663 1 0 3 0x80 poll dhclient 7643 135312 0 0 2 0x14200 zerothread 3942 20599 0 0 3 0x14200 aiodoned aiodoned 46788 401721 0 0 3 0x14200 syncer update 23503 492269 0 0 3 0x14200 cleaner cleaner 16399 190514 0 0 3 0x14200 reaper reaper 31792 116063 0 0 3 0x14200 pgdaemon pagedaemon 72428 402250 0 0 3 0x14200 bored crynlk 98005 67802 0 0 3 0x14200 bored crypto 18738 443219 0 0 3 0x40014200 acpi0 acpi0 37909 406242 0 0 3 0x14200 bored softnet 56895 284522 0 0 3 0x14200 bored systqmp 18010 493016 0 0 3 0x14200 bored systq 76768 334665 0 0 3 0x40014200 bored softclock 51605 10316 0 0 3 0x40014200 idle0 68189 107179 0 0 3 0x14200 bored smr 1 8567 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 Kern Lim devbuf 9531 6365K 7070K 78643K 14958 0 0 pcb 13 8K 8K 78643K 113 0 0 rtable 111 3K 4K 78643K 454 0 0 ifaddr 64 14K 15K 78643K 199 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 83 0 0 iov 0 0K 24K 78643K 213 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 76K 77K 78643K 2710 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 23 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 180 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1558 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 42 30K 46K 78643K 498 0 0 subproc 32 2K 2K 78643K 36 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 124 0 0 in_multi 33 2K 2K 78643K 69 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 340 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 90 20K 30K 78643K 4506 0 0 UVM aobj 57 2K 2K 78643K 65 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 69 0 0 NDP 14 0K 0K 78643K 53 0 0 temp 185 2727K 2855K 78643K 7811 0 0 kqueue 0 0K 0K 78643K 18 0 0 SYN cache 2 16K 16K 78643K 2 0 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 80 53 0 51 1 0 1 1 0 8 0 rtentry 112 49 0 4 2 0 2 2 0 8 0 unpcb 120 585 0 575 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 204 0 204 1 1 0 1 0 8 0 tcpcb 544 255 0 251 1 0 1 1 0 8 0 inpcb 280 649 0 642 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 6 0 6 3 2 1 1 0 8 1 swfcl 56 3 0 0 1 0 1 1 0 8 0 ppxss 1128 31 0 31 6 5 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 45 0 5 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 10 2 1 1 1 0 8 0 semapl 112 178 0 168 1 0 1 1 0 8 0 shmpl 112 63 0 8 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3994 0 2589 46 0 46 46 0 8 0 ffsino 240 3994 0 2589 84 0 84 84 0 8 0 nchpl 144 6376 0 4742 62 1 61 62 0 8 0 uvmvnodes 72 4996 0 0 91 0 91 91 0 8 0 vnodes 200 4996 0 0 263 0 263 263 0 8 0 namei 1024 19761 0 19761 1 0 1 1 0 8 1 scsiplug 64 4 0 4 2 2 0 1 0 8 0 scxspl 192 17718 0 17718 13 12 1 7 0 8 1 plimitpl 152 171 0 164 1 0 1 1 0 8 0 sigapl 432 1732 0 1718 2 0 2 2 0 8 0 futexpl 56 26428 0 26427 2 1 1 1 0 8 0 knotepl 112 292 0 273 1 0 1 1 0 8 0 kqueuepl 104 337 0 335 1 0 1 1 0 8 0 pipepl 112 938 0 919 2 1 1 2 0 8 0 fdescpl 424 1733 0 1718 2 0 2 2 0 8 0 filepl 120 10595 0 10496 5 1 4 5 0 8 0 lockfpl 104 585 0 585 4 3 1 1 0 8 1 lockfspl 48 204 0 204 4 3 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 34 0 24 1 0 1 1 0 8 0 ucredpl 96 2320 0 2313 1 0 1 1 0 8 0 zombiepl 144 1718 0 1718 1 0 1 1 0 8 1 processpl 864 1748 0 1718 4 0 4 4 0 8 0 procpl 632 3752 0 3712 4 0 4 4 0 8 0 sosppl 128 26 0 26 4 3 1 1 0 8 1 sockpl 384 1303 0 1284 6 3 3 4 0 8 1 mcl64k 65536 64 0 64 5 4 1 1 0 8 1 mcl16k 16384 6 0 6 4 4 0 1 0 8 0 mcl12k 12288 36 0 36 6 5 1 1 0 8 1 mcl9k 9216 28 0 28 6 5 1 1 0 8 1 mcl8k 8192 28 0 28 5 4 1 1 0 8 1 mcl4k 4096 93 0 91 3 2 1 1 0 8 0 mcl2k2 2112 14 0 14 6 6 0 1 0 8 0 mcl2k 2048 57496 0 57457 11 5 6 10 0 8 0 mtagpl 80 44 0 11 2 1 1 1 0 8 0 mbufpl 256 97253 0 97120 15 5 10 10 0 8 0 bufpl 256 9667 0 4195 343 0 343 343 0 8 0 anonpl 16 163165 0 151385 114 57 57 64 0 62 8 amapchunkpl 152 7407 0 7299 24 19 5 12 0 158 0 amappl16 192 8990 0 8340 88 53 35 45 0 8 2 amappl15 184 1 0 1 1 1 0 1 0 8 0 amappl14 176 61 0 53 1 0 1 1 0 8 0 amappl13 168 7 0 7 1 1 0 1 0 8 0 amappl12 160 779 0 776 1 0 1 1 0 8 0 amappl11 152 50 0 38 1 0 1 1 0 8 0 amappl10 144 72 0 70 1 0 1 1 0 8 0 amappl9 136 1312 0 1307 1 0 1 1 0 8 0 amappl8 128 886 0 868 1 0 1 1 0 8 0 amappl7 120 32 0 28 1 0 1 1 0 8 0 amappl6 112 52 0 44 1 0 1 1 0 8 0 amappl5 104 912 0 901 1 0 1 1 0 8 0 amappl4 96 1977 0 1949 1 0 1 1 0 8 0 amappl3 88 235 0 225 1 0 1 1 0 8 0 amappl2 80 13293 0 13219 3 1 2 3 0 8 0 amappl1 72 38941 0 38502 26 17 9 19 0 8 0 amappl 80 4004 0 3966 1 0 1 1 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 64 0 8 1 0 1 1 0 8 0 uaddrrnd 24 1733 0 1718 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1733 0 1718 1 0 1 1 0 8 0 vmmpekpl 168 13110 0 13089 2 0 2 2 0 8 0 vmmpepl 168 205610 0 203798 129 49 80 89 0 357 1 vmsppl 272 1732 0 1718 2 1 1 2 0 8 0 pdppl 4096 3473 0 3436 6 1 5 6 0 8 0 pvpl 32 440486 0 425629 237 87 150 157 0 265 30 pmappl 200 1732 0 1718 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 498 0 28 14 0 14 14 0 8 0