panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *262715 55339 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(fffffd802b71b028) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000159c5ed0,1,ffff8000149b4290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037412648,c0106477,ffff8000159c5ed0,1,fffffd803f7c6ba0,ffff8000149b4290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f7d74c0,c0106477,ffff8000159c5ed0,ffff8000149b4290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000149b4290,ffff8000159c5fe8,ffff8000159c6050) at sys_ioctl+0x5b8 syscall(ffff8000159c60b0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,5b41a8e0010) at Xsyscall+0x128 end of kernel end trace frame: 0x5b68bbc5d50, 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(fffffd802b71b028) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000159c5ed0,1,ffff8000149b4290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037412648,c0106477,ffff8000159c5ed0,1,fffffd803f7c6ba0,ffff8000149b4290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f7d74c0,c0106477,ffff8000159c5ed0,ffff8000149b4290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000149b4290,ffff8000159c5fe8,ffff8000159c6050) at sys_ioctl+0x5b8 syscall(ffff8000159c60b0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,5b41a8e0010) at Xsyscall+0x128 end of kernel end trace frame: 0x5b68bbc5d50, count: -9 ddb> show registers rdi 0xffffffff81972197 db_enter+0x17 rsi 0x7a54 __ALIGN_SIZE+0x6a54 rbp 0xffff8000159c5a90 rbx 0xffff8000159c5b40 rdx 0x7a55 __ALIGN_SIZE+0x6a55 rcx 0xffff8000149c1000 rax 0xffff8000149c1000 r8 0xffff8000159c5a50 r9 0x1 r10 0xffff800000992b40 r11 0xe4655cd34db506c5 r12 0x3000000008 r13 0xffff8000159c5aa0 r14 0x100 r15 0x1 rip 0xffffffff81972198 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000159c5a80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=262715 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff8000149b5160,0xffff8000149b53e8 process=0xffff8000ffff6d90 user=0xffff8000159c1000, 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 55339 159876 6795 0 2 0 syz-executor.1 *55339 262715 6795 0 7 0x4000000 syz-executor.1 55339 330936 6795 0 2 0x4000000 syz-executor.1 33947 204235 0 0 3 0x14200 bored sosplice 75118 441245 89129 0 2 0x2 syz-executor.0 6795 89315 89129 0 2 0x482 syz-executor.1 89129 12779 41089 0 3 0x82 thrsleep syz-fuzzer 89129 441194 41089 0 2 0x4000482 syz-fuzzer 89129 302691 41089 0 3 0x4000082 thrsleep syz-fuzzer 89129 439077 41089 0 3 0x4000082 thrsleep syz-fuzzer 89129 83422 41089 0 3 0x4000082 thrsleep syz-fuzzer 89129 483770 41089 0 3 0x4000082 kqread syz-fuzzer 89129 104790 41089 0 3 0x4000082 thrsleep syz-fuzzer 41089 399946 39745 0 3 0x10008a pause ksh 39745 200384 68531 0 3 0x92 select sshd 88367 248485 1 0 3 0x100083 ttyin getty 68531 30202 1 0 3 0x80 select sshd 83108 111197 22405 73 2 0x100090 syslogd 22405 249021 1 0 3 0x100082 netio syslogd 9826 418715 1 77 3 0x100090 poll dhclient 71335 136222 1 0 3 0x80 poll dhclient 8075 445507 0 0 2 0x14200 zerothread 53623 83235 0 0 3 0x14200 aiodoned aiodoned 16008 396513 0 0 3 0x14200 syncer update 76296 373069 0 0 3 0x14200 cleaner cleaner 49727 251187 0 0 3 0x14200 reaper reaper 62659 219658 0 0 3 0x14200 pgdaemon pagedaemon 79792 438912 0 0 3 0x14200 bored crynlk 60061 15210 0 0 3 0x14200 bored crypto 27816 66258 0 0 3 0x40014200 acpi0 acpi0 62035 203241 0 0 3 0x14200 bored softnet 43569 35739 0 0 3 0x14200 bored systqmp 26349 40907 0 0 3 0x14200 bored systq 5048 514628 0 0 3 0x40014200 bored softclock 79199 97219 0 0 3 0x40014200 idle0 65441 357019 0 0 3 0x14200 bored smr 1 12238 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 9507 6350K 6977K 78643K 13534 0 0 pcb 13 8K 8K 78643K 91 0 0 rtable 116 4K 4K 78643K 401 0 0 ifaddr 58 13K 14K 78643K 144 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 73 0 0 iov 0 0K 32K 78643K 131 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1216 76K 77K 78643K 2337 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 20 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 96 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 1178 0 0 sigio 1 0K 0K 78643K 8 0 0 proc 42 30K 54K 78643K 443 0 0 subproc 32 2K 2K 78643K 38 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 123 0 0 in_multi 33 2K 2K 78643K 91 0 0 ether_multi 1 0K 0K 78643K 13 0 0 mrt 0 0K 0K 78643K 6 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 290 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 87 20K 22K 78643K 3653 0 0 UVM aobj 58 2K 2K 78643K 60 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 47 0 0 NDP 12 0K 0K 78643K 38 0 0 temp 170 2723K 2850K 78643K 6515 0 0 kqueue 0 0K 0K 78643K 1 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 69 0 67 1 0 1 1 0 8 0 rtentry 112 49 0 4 2 0 2 2 0 8 0 unpcb 120 629 0 619 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 848 0 848 1 1 0 1 0 8 0 tcpcb 544 227 0 223 1 0 1 1 0 8 0 inpcb 280 509 0 502 2 1 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 14 0 14 4 3 1 1 0 8 1 ppxss 1128 18 0 18 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 45 0 5 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 8 1 0 1 1 0 8 0 semapl 112 92 0 82 1 0 1 1 0 8 0 shmpl 112 58 0 2 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3536 0 2129 46 0 46 46 0 8 0 ffsino 240 3536 0 2129 84 0 84 84 0 8 0 nchpl 144 5297 0 3655 61 0 61 61 0 8 0 uvmvnodes 72 4210 0 0 77 0 77 77 0 8 0 vnodes 200 4210 0 0 222 0 222 222 0 8 0 namei 1024 16012 0 16012 2 1 1 1 0 8 1 scsiplug 64 4 0 4 2 1 1 1 0 8 1 scxspl 192 14218 0 14218 11 8 3 6 0 8 3 plimitpl 152 97 0 90 1 0 1 1 0 8 0 sigapl 432 1349 0 1336 2 0 2 2 0 8 0 futexpl 56 18528 0 18528 1 0 1 1 0 8 1 knotepl 112 242 0 223 1 0 1 1 0 8 0 kqueuepl 104 211 0 209 1 0 1 1 0 8 0 pipepl 112 770 0 751 2 1 1 1 0 8 0 fdescpl 424 1350 0 1336 2 0 2 2 0 8 0 filepl 120 7996 0 7899 4 0 4 4 0 8 1 lockfpl 104 345 0 345 2 1 1 1 0 8 1 lockfspl 48 119 0 119 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 1516 0 1509 1 0 1 1 0 8 0 zombiepl 144 1336 0 1336 2 1 1 1 0 8 1 processpl 864 1365 0 1336 4 0 4 4 0 8 0 procpl 632 2944 0 2907 4 0 4 4 0 8 0 sosppl 128 20 0 20 4 4 0 1 0 8 0 sockpl 384 1226 0 1207 3 0 3 3 0 8 1 mcl64k 65536 262 0 262 31 30 1 29 0 8 1 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 19 0 19 4 3 1 1 0 8 1 mcl9k 9216 23 0 23 5 4 1 1 0 8 1 mcl8k 8192 13 0 13 6 6 0 1 0 8 0 mcl4k 4096 55 0 55 5 4 1 1 0 8 1 mcl2k2 2112 8 0 8 4 4 0 1 0 8 0 mcl2k 2048 55608 0 55566 16 10 6 12 0 8 0 mtagpl 80 12 0 8 2 1 1 1 0 8 0 mbufpl 256 93169 0 93090 25 17 8 20 0 8 0 bufpl 256 12013 0 5397 414 0 414 414 0 8 0 anonpl 16 142839 0 131101 95 44 51 66 0 62 1 amapchunkpl 152 5727 0 5613 19 14 5 15 0 158 0 amappl16 192 8231 0 7593 96 63 33 46 0 8 1 amappl14 176 53 0 46 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 610 0 607 1 0 1 1 0 8 0 amappl11 152 56 0 45 1 0 1 1 0 8 0 amappl10 144 69 0 68 2 1 1 1 0 8 0 amappl9 136 555 0 551 1 0 1 1 0 8 0 amappl8 128 125 0 111 1 0 1 1 0 8 0 amappl7 120 28 0 25 1 0 1 1 0 8 0 amappl6 112 60 0 54 1 0 1 1 0 8 0 amappl5 104 744 0 734 1 0 1 1 0 8 0 amappl4 96 1570 0 1544 1 0 1 1 0 8 0 amappl3 88 213 0 202 1 0 1 1 0 8 0 amappl2 80 10010 0 9943 4 2 2 3 0 8 0 amappl1 72 32857 0 32442 26 17 9 19 0 8 0 amappl 80 3178 0 3140 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 59 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1350 0 1336 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1350 0 1336 1 0 1 1 0 8 0 vmmpekpl 168 11741 0 11715 2 0 2 2 0 8 0 vmmpepl 168 161517 0 159843 132 53 79 96 0 357 6 vmsppl 272 1349 0 1336 2 1 1 2 0 8 0 pdppl 4096 2706 0 2672 6 1 5 6 0 8 0 pvpl 32 406323 0 391569 225 69 156 200 0 265 35 pmappl 200 1349 0 1336 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 613 0 75 16 0 16 16 0 8 0