panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *335240 93776 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(fffffd803b0db5a8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000159d8c00,1,ffff8000ffff3650) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd803741a260,c0106477,ffff8000159d8c00,1,fffffd803f7c6840,ffff8000ffff3650) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802ff0a078,c0106477,ffff8000159d8c00,ffff8000ffff3650) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff3650,ffff8000159d8d18,ffff8000159d8d80) at sys_ioctl+0x5b8 syscall(ffff8000159d8de0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,32b29316010) at Xsyscall+0x128 end of kernel end trace frame: 0x32dc4522c80, 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(fffffd803b0db5a8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000159d8c00,1,ffff8000ffff3650) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd803741a260,c0106477,ffff8000159d8c00,1,fffffd803f7c6840,ffff8000ffff3650) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802ff0a078,c0106477,ffff8000159d8c00,ffff8000ffff3650) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff3650,ffff8000159d8d18,ffff8000159d8d80) at sys_ioctl+0x5b8 syscall(ffff8000159d8de0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,32b29316010) at Xsyscall+0x128 end of kernel end trace frame: 0x32dc4522c80, count: -9 ddb> show registers rdi 0xffffffff811134d7 db_enter+0x17 rsi 0x90b1 __ALIGN_SIZE+0x80b1 rbp 0xffff8000159d87c0 rbx 0xffff8000159d8870 rdx 0x90b2 __ALIGN_SIZE+0x80b2 rcx 0xffff8000149bd000 rax 0xffff8000149bd000 r8 0xffff8000159d8780 r9 0x1 r10 0xffff8000009a0080 r11 0xd99e731768fb17be r12 0x3000000008 r13 0xffff8000159d87d0 r14 0x100 r15 0x1 rip 0xffffffff811134d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159d87b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=335240 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2018,0xffff8000ffff2790 process=0xffff8000ffff70f0 user=0xffff8000159d3000, vmspace=0xfffffd803f014ee0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 48110 59775 96513 0 2 0 syz-executor.1 48110 57357 96513 0 3 0x4000080 fsleep syz-executor.1 93776 335620 83677 0 2 0 syz-executor.0 *93776 335240 83677 0 7 0x4000000 syz-executor.0 93776 43839 83677 0 2 0x4000000 syz-executor.0 96513 193316 73069 0 2 0x482 syz-executor.1 83677 324687 73069 0 2 0x482 syz-executor.0 99040 97911 0 0 3 0x14200 bored sosplice 73069 129004 36537 0 3 0x82 thrsleep syz-fuzzer 73069 411324 36537 0 3 0x4000082 thrsleep syz-fuzzer 73069 435240 36537 0 3 0x4000082 thrsleep syz-fuzzer 73069 357864 36537 0 3 0x4000082 kqread syz-fuzzer 73069 277020 36537 0 3 0x4000082 thrsleep syz-fuzzer 73069 322033 36537 0 3 0x4000082 thrsleep syz-fuzzer 73069 19303 36537 0 3 0x4000082 thrsleep syz-fuzzer 36537 339263 91342 0 3 0x10008a pause ksh 91342 69064 92085 0 3 0x92 select sshd 75628 136171 1 0 3 0x100083 ttyin getty 92085 409808 1 0 3 0x80 select sshd 66894 24050 6126 73 2 0x100090 syslogd 6126 92275 1 0 3 0x100082 netio syslogd 83747 479401 1 77 3 0x100090 poll dhclient 40333 236139 1 0 3 0x80 poll dhclient 56428 231658 0 0 2 0x14200 zerothread 79650 113344 0 0 3 0x14200 aiodoned aiodoned 38600 342704 0 0 3 0x14200 syncer update 59210 302953 0 0 3 0x14200 cleaner cleaner 17476 366556 0 0 3 0x14200 reaper reaper 92464 158529 0 0 3 0x14200 pgdaemon pagedaemon 18912 345984 0 0 3 0x14200 bored crynlk 9490 142640 0 0 3 0x14200 bored crypto 65291 209880 0 0 3 0x40014200 acpi0 acpi0 23312 166833 0 0 3 0x14200 bored softnet 96507 237903 0 0 3 0x14200 bored systqmp 25483 156068 0 0 3 0x14200 bored systq 32398 37060 0 0 3 0x40014200 bored softclock 45706 124852 0 0 3 0x40014200 idle0 74574 173626 0 0 3 0x14200 bored smr 1 503990 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 9533 6367K 14799K 78643K 14789 0 0 pcb 13 8K 8K 78643K 120 0 0 rtable 117 12K 12K 78643K 634 0 0 ifaddr 67 14K 15K 78643K 228 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 83 0 0 iov 0 0K 28K 78643K 421 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1208 76K 77K 78643K 2664 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 15 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 173 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1669 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 42 30K 54K 78643K 607 0 0 subproc 32 2K 2K 78643K 85 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 113 0 0 in_multi 33 2K 2K 78643K 97 0 0 ether_multi 1 0K 0K 78643K 3 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 66 291K 291K 78643K 66 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 95 21K 29K 78643K 4773 0 0 UVM aobj 65 3K 3K 78643K 76 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 60 0 0 NDP 15 0K 0K 78643K 65 0 0 temp 191 2728K 2797K 78643K 8387 0 0 kqueue 0 0K 0K 78643K 11 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 14 0 7 1 0 1 1 0 8 0 rtpcb 80 108 0 106 1 0 1 1 0 8 0 rtentry 112 82 0 37 2 0 2 2 0 8 0 unpcb 120 413 0 403 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1661 0 1661 1 1 0 1 0 8 0 tcpcb 544 237 0 233 1 0 1 1 0 8 0 inpcb 280 662 0 655 2 1 1 2 0 8 0 nd6 48 15 0 9 1 0 1 1 0 8 0 pkpcb 40 10 0 10 3 3 0 1 0 8 0 ppxss 1128 30 0 30 7 6 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 332 0 140 13 1 12 12 0 8 0 art_table 32 333 0 140 2 0 2 2 0 8 0 art_node 16 79 0 38 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 4 1 0 1 1 0 8 0 semapl 112 169 0 159 1 0 1 1 0 8 0 shmpl 112 74 0 11 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4117 0 2710 46 0 46 46 0 8 0 ffsino 240 4117 0 2710 84 0 84 84 0 8 0 nchpl 144 6707 0 5075 61 0 61 61 0 8 0 uvmvnodes 72 5142 0 0 94 0 94 94 0 8 0 vnodes 200 5142 0 0 271 0 271 271 0 8 0 namei 1024 19849 0 19849 2 1 1 1 0 8 1 scsiplug 64 4 0 4 3 2 1 1 0 8 1 scxspl 192 30997 0 30997 14 13 1 6 0 8 1 plimitpl 152 127 0 120 1 0 1 1 0 8 0 sigapl 432 1831 0 1817 2 0 2 2 0 8 0 futexpl 56 25842 0 25841 2 1 1 1 0 8 0 knotepl 112 381 0 362 1 0 1 1 0 8 0 kqueuepl 104 316 0 314 1 0 1 1 0 8 0 pipepl 112 922 0 903 1 0 1 1 0 8 0 fdescpl 424 1832 0 1817 2 0 2 2 0 8 0 filepl 120 10350 0 10253 5 1 4 4 0 8 0 lockfpl 104 516 0 516 4 3 1 1 0 8 1 lockfspl 48 177 0 177 4 3 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 1915 0 1908 1 0 1 1 0 8 0 zombiepl 144 1817 0 1817 1 0 1 1 0 8 1 processpl 864 1847 0 1817 4 0 4 4 0 8 0 procpl 632 3902 0 3863 4 0 4 4 0 8 0 sosppl 128 21 0 21 5 5 0 1 0 8 0 sockpl 384 1206 0 1187 4 1 3 3 0 8 1 mcl64k 65536 791 0 791 95 70 25 64 0 8 25 mcl16k 16384 6 0 6 5 5 0 1 0 8 0 mcl12k 12288 30 0 30 4 3 1 1 0 8 1 mcl9k 9216 29 0 29 9 8 1 1 0 8 1 mcl8k 8192 19 0 19 7 6 1 1 0 8 1 mcl4k 4096 84 0 82 3 2 1 1 0 8 0 mcl2k2 2112 2 0 2 2 2 0 1 0 8 0 mcl2k 2048 55997 0 55955 14 8 6 12 0 8 0 mtagpl 80 55 0 28 2 1 1 1 0 8 0 mbufpl 256 98369 0 98239 57 42 15 37 0 8 6 bufpl 256 14954 0 9224 359 0 359 359 0 8 0 anonpl 16 198856 0 187183 105 45 60 65 0 62 11 amapchunkpl 152 7922 0 7816 21 16 5 15 0 158 0 amappl16 192 10816 0 10167 87 49 38 46 0 8 4 amappl15 184 1 0 1 1 1 0 1 0 8 0 amappl14 176 68 0 64 1 0 1 1 0 8 0 amappl13 168 141 0 140 3 2 1 1 0 8 0 amappl12 160 573 0 572 2 1 1 1 0 8 0 amappl11 152 62 0 51 1 0 1 1 0 8 0 amappl10 144 531 0 528 1 0 1 1 0 8 0 amappl9 136 1032 0 1026 1 0 1 1 0 8 0 amappl8 128 587 0 569 1 0 1 1 0 8 0 amappl7 120 511 0 503 1 0 1 1 0 8 0 amappl6 112 51 0 44 1 0 1 1 0 8 0 amappl5 104 738 0 728 1 0 1 1 0 8 0 amappl4 96 1499 0 1473 1 0 1 1 0 8 0 amappl3 88 791 0 781 1 0 1 1 0 8 0 amappl2 80 13652 0 13578 3 1 2 3 0 8 0 amappl1 72 41681 0 41256 25 16 9 19 0 8 0 amappl 80 4192 0 4155 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 75 0 11 2 0 2 2 0 8 0 uaddrrnd 24 1832 0 1817 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1832 0 1817 1 0 1 1 0 8 0 vmmpekpl 168 14480 0 14458 2 0 2 2 0 8 0 vmmpepl 168 220794 0 219007 149 68 81 98 0 357 3 vmsppl 272 1831 0 1817 3 2 1 2 0 8 0 pdppl 4096 3670 0 3634 6 1 5 6 0 8 0 pvpl 32 592019 0 577139 294 122 172 262 0 265 50 pmappl 200 1831 0 1817 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 655 0 140 17 1 16 16 0 8 0