panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *177596 89299 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(fffffd8039eb8370) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149ba5f0,1,ffff8000149418c8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037406260,c0106477,ffff8000149ba5f0,1,fffffd803f7c67e0,ffff8000149418c8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f873cb8,c0106477,ffff8000149ba5f0,ffff8000149418c8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000149418c8,ffff8000149ba708,ffff8000149ba770) at sys_ioctl+0x5b8 syscall(ffff8000149ba7d0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,23f0e946010) at Xsyscall+0x128 end of kernel end trace frame: 0x241f8524b40, 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(fffffd8039eb8370) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149ba5f0,1,ffff8000149418c8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037406260,c0106477,ffff8000149ba5f0,1,fffffd803f7c67e0,ffff8000149418c8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f873cb8,c0106477,ffff8000149ba5f0,ffff8000149418c8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000149418c8,ffff8000149ba708,ffff8000149ba770) at sys_ioctl+0x5b8 syscall(ffff8000149ba7d0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,23f0e946010) at Xsyscall+0x128 end of kernel end trace frame: 0x241f8524b40, count: -9 ddb> show registers rdi 0xffffffff81bc2977 db_enter+0x17 rsi 0x7988 __ALIGN_SIZE+0x6988 rbp 0xffff8000149ba1b0 rbx 0xffff8000149ba260 rdx 0x7989 __ALIGN_SIZE+0x6989 rcx 0xffff8000149c3000 rax 0xffff8000149c3000 r8 0xffff8000149ba170 r9 0x1 r10 0xffff800000992f40 r11 0x238a5144091a680e r12 0x3000000008 r13 0xffff8000149ba1c0 r14 0x100 r15 0x1 rip 0xffffffff81bc2978 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ba1a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=177596 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014940508,0xffff800014940790 process=0xffff8000ffff6d90 user=0xffff8000149b5000, vmspace=0xfffffd803f00ccc0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 72781 75328 2103 0 2 0 syz-executor.0 72781 79920 2103 0 3 0x4000080 fsleep syz-executor.0 89299 2257 82993 0 2 0 syz-executor.1 *89299 177596 82993 0 7 0x4000000 syz-executor.1 89299 294001 82993 0 2 0x4000000 syz-executor.1 96902 61906 0 0 3 0x14200 bored sosplice 2103 18167 50869 0 2 0x482 syz-executor.0 82993 14916 50869 0 2 0x482 syz-executor.1 50869 205808 29712 0 3 0x82 thrsleep syz-fuzzer 50869 487940 29712 0 3 0x4000082 thrsleep syz-fuzzer 50869 70987 29712 0 3 0x4000082 kqread syz-fuzzer 50869 462510 29712 0 3 0x4000082 thrsleep syz-fuzzer 50869 463949 29712 0 3 0x4000082 thrsleep syz-fuzzer 50869 462549 29712 0 3 0x4000082 thrsleep syz-fuzzer 50869 243456 29712 0 3 0x4000082 thrsleep syz-fuzzer 29712 418897 62786 0 3 0x10008a pause ksh 62786 291000 5334 0 3 0x92 select sshd 19196 140026 1 0 3 0x100083 ttyin getty 5334 371712 1 0 3 0x80 select sshd 27389 71155 32403 73 2 0x100090 syslogd 32403 82012 1 0 3 0x100082 netio syslogd 96362 403896 1 77 3 0x100090 poll dhclient 19779 150672 1 0 3 0x80 poll dhclient 96259 147662 0 0 2 0x14200 zerothread 8433 6181 0 0 3 0x14200 aiodoned aiodoned 46289 366684 0 0 3 0x14200 syncer update 80863 202834 0 0 3 0x14200 cleaner cleaner 15247 310697 0 0 3 0x14200 reaper reaper 31366 189331 0 0 3 0x14200 pgdaemon pagedaemon 22173 354425 0 0 3 0x14200 bored crynlk 9541 304793 0 0 3 0x14200 bored crypto 31917 279023 0 0 3 0x40014200 acpi0 acpi0 10590 333203 0 0 3 0x14200 bored softnet 31208 491548 0 0 3 0x14200 bored systqmp 40358 484307 0 0 3 0x14200 bored systq 69757 323487 0 0 3 0x40014200 bored softclock 90012 248136 0 0 3 0x40014200 idle0 25155 399971 0 0 3 0x14200 bored smr 1 280336 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 9485 6328K 6848K 78643K 11800 0 0 pcb 13 8K 8K 78643K 33 0 0 rtable 88 3K 4K 78643K 278 0 0 ifaddr 43 11K 12K 78643K 87 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 31 0 0 iov 0 0K 24K 78643K 76 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1208 76K 76K 78643K 1598 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 9 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 42 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 494 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 41 30K 54K 78643K 370 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 45 0 0 in_multi 22 1K 2K 78643K 50 0 0 ether_multi 1 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 242 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 84 20K 21K 78643K 1946 0 0 UVM aobj 30 2K 3K 78643K 39 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 20 0 0 NDP 8 0K 0K 78643K 23 0 0 temp 142 2722K 2842K 78643K 4511 0 0 kqueue 0 0K 0K 78643K 4 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 2 1 0 1 1 0 8 0 rtpcb 80 33 0 31 1 0 1 1 0 8 0 rtentry 112 47 0 14 2 0 2 2 0 8 0 unpcb 120 211 0 199 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1271 0 1271 1 1 0 1 0 8 0 tcpcb 544 70 0 66 1 0 1 1 0 8 0 inpcb 280 198 0 191 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 8 0 8 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 44 12 0 12 12 0 8 1 art_table 32 189 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 6 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 38 0 28 1 0 1 1 0 8 0 shmpl 112 37 0 9 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2176 0 764 46 0 46 46 0 8 0 ffsino 240 2176 0 764 84 0 84 84 0 8 0 nchpl 144 3046 0 1401 62 0 62 62 0 8 0 uvmvnodes 72 2480 0 0 46 0 46 46 0 8 0 vnodes 200 2480 0 0 131 0 131 131 0 8 0 namei 1024 8404 0 8404 1 0 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 8430 0 8430 7 6 1 6 0 8 1 plimitpl 152 36 0 29 1 0 1 1 0 8 0 sigapl 432 665 0 651 2 0 2 2 0 8 0 futexpl 56 7558 0 7557 1 0 1 1 0 8 0 knotepl 112 124 0 105 1 0 1 1 0 8 0 kqueuepl 104 110 0 108 1 0 1 1 0 8 0 pipepl 112 368 0 347 3 2 1 2 0 8 0 fdescpl 424 666 0 651 2 0 2 2 0 8 0 filepl 120 3520 0 3419 4 0 4 4 0 8 0 lockfpl 104 186 0 186 2 1 1 1 0 8 1 lockfspl 48 52 0 52 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 507 0 500 1 0 1 1 0 8 0 zombiepl 144 651 0 651 2 1 1 1 0 8 1 processpl 864 681 0 651 4 0 4 4 0 8 0 procpl 632 1276 0 1237 4 0 4 4 0 8 0 sosppl 128 7 0 7 2 2 0 1 0 8 0 sockpl 384 448 0 427 3 0 3 3 0 8 0 mcl64k 65536 275 0 275 33 26 7 33 0 8 7 mcl16k 16384 2 0 2 2 1 1 1 0 8 1 mcl12k 12288 11 0 11 3 2 1 1 0 8 1 mcl9k 9216 10 0 10 1 1 0 1 0 8 0 mcl8k 8192 5 0 5 3 2 1 1 0 8 1 mcl4k 4096 34 0 34 2 1 1 1 0 8 1 mcl2k2 2112 4 0 4 2 2 0 1 0 8 0 mcl2k 2048 55050 0 55007 14 8 6 12 0 8 0 mtagpl 80 20 0 10 2 1 1 1 0 8 0 mbufpl 256 89995 0 89909 26 17 9 23 0 8 0 bufpl 256 6640 0 2136 282 0 282 282 0 8 0 anonpl 16 64824 0 53306 64 16 48 62 0 62 1 amapchunkpl 152 2542 0 2436 8 3 5 7 0 158 0 amappl16 192 3038 0 2404 44 11 33 44 0 8 0 amappl15 184 8 0 7 1 0 1 1 0 8 0 amappl14 176 52 0 46 1 0 1 1 0 8 0 amappl13 168 7 0 6 1 0 1 1 0 8 0 amappl12 160 16 0 14 1 0 1 1 0 8 0 amappl11 152 50 0 39 1 0 1 1 0 8 0 amappl10 144 521 0 515 1 0 1 1 0 8 0 amappl9 136 553 0 550 1 0 1 1 0 8 0 amappl8 128 124 0 108 1 0 1 1 0 8 0 amappl7 120 481 0 475 1 0 1 1 0 8 0 amappl6 112 50 0 45 1 0 1 1 0 8 0 amappl5 104 144 0 134 1 0 1 1 0 8 0 amappl4 96 872 0 844 1 0 1 1 0 8 0 amappl3 88 191 0 180 1 0 1 1 0 8 0 amappl2 80 4386 0 4311 4 2 2 3 0 8 0 amappl1 72 20599 0 20172 26 17 9 19 0 8 0 amappl 80 1495 0 1458 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 38 0 9 1 0 1 1 0 8 0 uaddrrnd 24 666 0 651 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 666 0 651 1 0 1 1 0 8 0 vmmpekpl 168 8201 0 8177 2 0 2 2 0 8 0 vmmpepl 168 82734 0 80958 110 31 79 96 0 357 1 vmsppl 272 665 0 651 2 1 1 2 0 8 0 pdppl 4096 1339 0 1302 6 1 5 6 0 8 0 pvpl 32 207046 0 192490 156 19 137 153 0 265 18 pmappl 200 665 0 651 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 474 0 59 14 0 14 14 0 8 1