panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *353474 5582 0 0 0x4000000 0 syz-executor.0 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(fffffd80045393d8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015df4550,1,ffff8000ffff2290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037403580,c0106477,ffff800015df4550,1,fffffd803f7c6ba0,ffff8000ffff2290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f81ee20,c0106477,ffff800015df4550,ffff8000ffff2290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2290,ffff800015df4668,ffff800015df46d0) at sys_ioctl+0x5b8 syscall(ffff800015df4730) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,a2b7c586010) at Xsyscall+0x128 end of kernel end trace frame: 0xa2dbd772b20, 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(fffffd80045393d8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015df4550,1,ffff8000ffff2290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037403580,c0106477,ffff800015df4550,1,fffffd803f7c6ba0,ffff8000ffff2290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f81ee20,c0106477,ffff800015df4550,ffff8000ffff2290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2290,ffff800015df4668,ffff800015df46d0) at sys_ioctl+0x5b8 syscall(ffff800015df4730) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,a2b7c586010) at Xsyscall+0x128 end of kernel end trace frame: 0xa2dbd772b20, count: -9 ddb> show registers rdi 0xffffffff818b9067 db_enter+0x17 rsi 0x69a3 __ALIGN_SIZE+0x59a3 rbp 0xffff800015df4110 rbx 0xffff800015df41c0 rdx 0x69a4 __ALIGN_SIZE+0x59a4 rcx 0xffff8000149e9000 rax 0xffff8000149e9000 r8 0xffff800015df40d0 r9 0x1 r10 0xffff80000005cfc0 r11 0xfe1817a5326e6b5f r12 0x3000000008 r13 0xffff800015df4120 r14 0x100 r15 0x1 rip 0xffffffff818b9068 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015df4100 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=353474 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2508,0xffff8000ffff33e8 process=0xffff8000ffff6010 user=0xffff800015def000, vmspace=0xfffffd803f00cbb0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 5582 283679 20290 0 2 0 syz-executor.0 * 5582 353474 20290 0 7 0x4000000 syz-executor.0 5582 301268 20290 0 2 0x4000000 syz-executor.0 22769 264321 1 0 3 0x100083 ttyin getty 68087 211793 0 0 3 0x14200 bored sosplice 920 199052 40824 0 2 0x2 syz-executor.1 20290 231252 40824 0 2 0x482 syz-executor.0 40824 270523 10592 0 3 0x82 thrsleep syz-fuzzer 40824 293852 10592 0 2 0x4000482 syz-fuzzer 40824 55404 10592 0 3 0x4000082 kqread syz-fuzzer 40824 25435 10592 0 3 0x4000082 thrsleep syz-fuzzer 40824 152935 10592 0 3 0x4000082 thrsleep syz-fuzzer 40824 97022 10592 0 3 0x4000082 thrsleep syz-fuzzer 40824 167865 10592 0 3 0x4000082 thrsleep syz-fuzzer 10592 458894 83196 0 3 0x10008a pause ksh 83196 266945 95874 0 3 0x92 select sshd 95874 6165 1 0 3 0x80 select sshd 80846 167521 35070 73 2 0x100090 syslogd 35070 98663 1 0 3 0x100082 netio syslogd 813 176865 1 77 3 0x100090 poll dhclient 33028 414073 1 0 3 0x80 poll dhclient 19055 84814 0 0 2 0x14200 zerothread 52167 226894 0 0 3 0x14200 aiodoned aiodoned 49668 37624 0 0 3 0x14200 syncer update 92549 421344 0 0 3 0x14200 cleaner cleaner 24685 222487 0 0 3 0x14200 reaper reaper 26246 111599 0 0 3 0x14200 pgdaemon pagedaemon 82570 23375 0 0 3 0x14200 bored crynlk 5174 104114 0 0 3 0x14200 bored crypto 32012 496437 0 0 3 0x40014200 acpi0 acpi0 82735 513555 0 0 3 0x14200 bored softnet 44398 370386 0 0 3 0x14200 bored systqmp 16280 382729 0 0 3 0x14200 bored systq 49251 177610 0 0 3 0x40014200 bored softclock 14544 354894 0 0 3 0x40014200 idle0 85517 193312 0 0 3 0x14200 bored smr 1 383158 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 9511 6347K 6990K 78643K 14843 0 0 pcb 13 8K 8K 78643K 147 0 0 rtable 111 4K 4K 78643K 380 0 0 ifaddr 57 12K 13K 78643K 128 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 95 0 0 iov 0 0K 24K 78643K 194 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1212 76K 77K 78643K 2723 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 20 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 147 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 1580 0 0 sigio 1 0K 0K 78643K 22 0 0 proc 42 30K 54K 78643K 494 0 0 subproc 32 2K 2K 78643K 34 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 142 0 0 in_multi 33 2K 2K 78643K 62 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 310 0 0 pfkey data 0 0K 0K 78643K 4 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 82 20K 30K 78643K 4540 0 0 UVM aobj 58 2K 3K 78643K 68 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 89 0 0 NDP 12 0K 0K 78643K 35 0 0 temp 171 2727K 2802K 78643K 7863 0 0 kqueue 0 0K 0K 78643K 20 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 83 0 81 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 645 0 635 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 3510 0 3510 1 1 0 1 0 8 0 tcpcb 544 260 0 256 1 0 1 1 0 8 0 inpcb 280 700 0 693 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 12 0 12 7 6 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 sysvmsgpl 40 20 0 2 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 145 0 135 1 0 1 1 0 8 0 shmpl 112 66 0 10 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3962 0 2550 46 0 46 46 0 8 0 ffsino 240 3962 0 2550 84 0 84 84 0 8 0 nchpl 144 6337 0 4693 62 0 62 62 0 8 0 uvmvnodes 72 5012 0 0 92 0 92 92 0 8 0 vnodes 200 5012 0 0 264 0 264 264 0 8 0 namei 1024 19323 0 19323 2 1 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 19493 0 19493 13 10 3 6 0 8 3 plimitpl 152 148 0 141 1 0 1 1 0 8 0 sigapl 432 1753 0 1740 2 0 2 2 0 8 0 futexpl 56 26005 0 26005 1 0 1 1 0 8 1 knotepl 112 400 0 381 1 0 1 1 0 8 0 kqueuepl 104 417 0 415 1 0 1 1 0 8 0 pipepl 112 1082 0 1063 5 3 2 2 0 8 1 fdescpl 424 1754 0 1740 2 0 2 2 0 8 0 filepl 120 10882 0 10784 8 3 5 5 0 8 1 lockfpl 104 554 0 554 3 2 1 1 0 8 1 lockfspl 48 182 0 182 3 2 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 37 0 27 1 0 1 1 0 8 0 ucredpl 96 2210 0 2203 1 0 1 1 0 8 0 zombiepl 144 1740 0 1740 2 1 1 1 0 8 1 processpl 864 1769 0 1740 4 0 4 4 0 8 0 procpl 632 3785 0 3748 4 0 4 4 0 8 0 sosppl 128 23 0 23 5 5 0 1 0 8 0 sockpl 384 1454 0 1435 6 2 4 4 0 8 2 mcl64k 65536 70 0 70 4 4 0 1 0 8 0 mcl16k 16384 7 0 7 4 4 0 1 0 8 0 mcl12k 12288 29 0 29 7 6 1 1 0 8 1 mcl9k 9216 19 0 19 5 4 1 1 0 8 1 mcl8k 8192 17 0 17 5 4 1 1 0 8 1 mcl4k 4096 73 0 73 2 1 1 1 0 8 1 mcl2k2 2112 15 0 15 6 6 0 1 0 8 0 mcl2k 2048 55369 0 55322 22 15 7 19 0 8 0 mtagpl 80 40 0 23 3 2 1 1 0 8 0 mbufpl 256 95769 0 95650 14 5 9 11 0 8 0 bufpl 256 9736 0 5172 286 0 286 286 0 8 0 anonpl 16 156898 0 144947 106 42 64 64 0 62 15 amapchunkpl 152 7290 0 7185 16 10 6 10 0 158 1 amappl16 192 8829 0 8172 76 35 41 45 0 8 8 amappl14 176 809 0 803 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 14 0 11 1 0 1 1 0 8 0 amappl11 152 51 0 39 1 0 1 1 0 8 0 amappl10 144 853 0 850 1 0 1 1 0 8 0 amappl9 136 546 0 543 1 0 1 1 0 8 0 amappl8 128 137 0 121 1 0 1 1 0 8 0 amappl7 120 819 0 814 1 0 1 1 0 8 0 amappl6 112 51 0 46 1 0 1 1 0 8 0 amappl5 104 166 0 156 1 0 1 1 0 8 0 amappl4 96 1986 0 1958 2 1 1 2 0 8 0 amappl3 88 960 0 950 1 0 1 1 0 8 0 amappl2 80 13206 0 13140 3 1 2 3 0 8 0 amappl1 72 38911 0 38497 25 15 10 19 0 8 0 amappl 80 4044 0 4008 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 67 0 10 1 0 1 1 0 8 0 uaddrrnd 24 1754 0 1740 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1754 0 1740 1 0 1 1 0 8 0 vmmpekpl 168 13764 0 13743 2 0 2 2 0 8 0 vmmpepl 168 207093 0 205396 133 44 89 91 0 357 14 vmsppl 272 1753 0 1740 2 1 1 2 0 8 0 pdppl 4096 3515 0 3480 6 1 5 6 0 8 0 pvpl 32 437295 0 422364 237 71 166 166 0 265 45 pmappl 200 1753 0 1740 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 450 0 38 13 0 13 13 0 8 0