panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *395301 54443 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(fffffd802f9e4820) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149da240,1,ffff800014941160) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374097d8,c0106477,ffff8000149da240,1,fffffd803f7c6ae0,ffff800014941160) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803e7af708,c0106477,ffff8000149da240,ffff800014941160) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800014941160,ffff8000149da358,ffff8000149da3c0) at sys_ioctl+0x5b8 syscall(ffff8000149da420) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,8408d6f5010) at Xsyscall+0x128 end of kernel end trace frame: 0x842a0fc4060, 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(fffffd802f9e4820) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149da240,1,ffff800014941160) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374097d8,c0106477,ffff8000149da240,1,fffffd803f7c6ae0,ffff800014941160) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803e7af708,c0106477,ffff8000149da240,ffff800014941160) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800014941160,ffff8000149da358,ffff8000149da3c0) at sys_ioctl+0x5b8 syscall(ffff8000149da420) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,8408d6f5010) at Xsyscall+0x128 end of kernel end trace frame: 0x842a0fc4060, count: -9 ddb> show registers rdi 0xffffffff8198adc7 db_enter+0x17 rsi 0x7b3e __ALIGN_SIZE+0x6b3e rbp 0xffff8000149d9e00 rbx 0xffff8000149d9eb0 rdx 0x7b3f __ALIGN_SIZE+0x6b3f rcx 0xffff8000149e3000 rax 0xffff8000149e3000 r8 0xffff8000149d9dc0 r9 0x1 r10 0xffff800000996200 r11 0x3bbe6f50a7899425 r12 0x3000000008 r13 0xffff8000149d9e10 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149d9df0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=395301 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014940ee8,0xffff8000149418d8 process=0xffff8000ffff7450 user=0xffff8000149d5000, vmspace=0xfffffd803f00caa0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 32938 382336 26101 0 2 0 syz-executor.0 32938 382814 26101 0 3 0x4000080 fsleep syz-executor.0 54443 104273 28455 0 2 0 syz-executor.1 *54443 395301 28455 0 7 0x4000000 syz-executor.1 54443 230065 28455 0 2 0x4000000 syz-executor.1 26101 255803 32514 0 2 0x482 syz-executor.0 28455 310304 32514 0 2 0x482 syz-executor.1 32514 489450 21826 0 3 0x82 thrsleep syz-fuzzer 32514 63517 21826 0 3 0x4000082 thrsleep syz-fuzzer 32514 14699 21826 0 3 0x4000082 kqread syz-fuzzer 32514 466246 21826 0 3 0x4000082 thrsleep syz-fuzzer 32514 484905 21826 0 3 0x4000082 thrsleep syz-fuzzer 32514 102505 21826 0 3 0x4000082 thrsleep syz-fuzzer 32514 284691 21826 0 3 0x4000082 thrsleep syz-fuzzer 21826 115266 61369 0 3 0x10008a pause ksh 61369 105783 10529 0 3 0x92 select sshd 35679 194715 1 0 3 0x100083 ttyin getty 10529 485168 1 0 3 0x80 select sshd 64573 340377 56027 73 2 0x100090 syslogd 56027 250406 1 0 3 0x100082 netio syslogd 32961 115776 1 77 3 0x100090 poll dhclient 95740 469127 1 0 3 0x80 poll dhclient 93085 309151 0 0 2 0x14200 zerothread 94728 330879 0 0 3 0x14200 aiodoned aiodoned 30062 146560 0 0 3 0x14200 syncer update 22335 500117 0 0 3 0x14200 cleaner cleaner 9618 215967 0 0 3 0x14200 reaper reaper 10077 377475 0 0 3 0x14200 pgdaemon pagedaemon 14933 336245 0 0 3 0x14200 bored crynlk 47528 10373 0 0 3 0x14200 bored crypto 47260 323028 0 0 3 0x40014200 acpi0 acpi0 82865 147472 0 0 3 0x14200 bored softnet 76157 200717 0 0 3 0x14200 bored systqmp 57552 499925 0 0 3 0x14200 bored systq 59210 215624 0 0 3 0x40014200 bored softclock 49734 513071 0 0 3 0x40014200 idle0 72530 379424 0 0 3 0x14200 bored smr 1 143258 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 9452 6380K 6573K 78643K 10655 0 0 pcb 13 8K 8K 78643K 19 0 0 rtable 105 3K 3K 78643K 202 0 0 ifaddr 38 10K 10K 78643K 41 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 15 0 0 iov 0 0K 12K 78643K 2 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1219 77K 77K 78643K 1254 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 4 0K 0K 78643K 8 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 71 0 0 proc 41 30K 54K 78643K 345 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 in_multi 33 2K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 30 132K 132K 78643K 30 0 0 exec 0 0K 1K 78643K 190 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 21K 78643K 976 0 0 UVM aobj 3 2K 2K 78643K 3 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 8 0 0 NDP 6 0K 0K 78643K 11 0 0 temp 90 2713K 2777K 78643K 3155 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 21 0 19 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 37 0 27 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 413 0 413 1 0 1 1 0 8 1 tcpcb 544 12 0 8 1 0 1 1 0 8 0 inpcb 280 44 0 37 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 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 2 0 2 1 0 1 1 0 8 1 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 6 0 4 1 0 1 1 0 8 0 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1493 0 73 46 0 46 46 0 8 0 ffsino 240 1493 0 73 84 0 84 84 0 8 0 nchpl 144 1799 0 158 61 0 61 61 0 8 0 uvmvnodes 72 1564 0 0 29 0 29 29 0 8 0 vnodes 200 1564 0 0 83 0 83 83 0 8 0 namei 1024 4398 0 4398 1 0 1 1 0 8 1 scxspl 192 4207 0 4207 2 1 1 2 0 8 1 plimitpl 152 16 0 9 1 0 1 1 0 8 0 sigapl 432 242 0 228 2 0 2 2 0 8 0 futexpl 56 616 0 615 1 0 1 1 0 8 0 knotepl 112 56 0 37 1 0 1 1 0 8 0 kqueuepl 104 6 0 4 1 0 1 1 0 8 0 pipepl 112 162 0 143 1 0 1 1 0 8 0 fdescpl 424 243 0 228 2 0 2 2 0 8 0 filepl 120 1181 0 1084 4 0 4 4 0 8 1 lockfpl 104 23 0 23 2 1 1 1 0 8 1 lockfspl 48 8 0 8 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 53 0 46 1 0 1 1 0 8 0 zombiepl 144 228 0 228 1 0 1 1 0 8 1 processpl 864 257 0 228 4 0 4 4 0 8 0 procpl 632 312 0 274 4 0 4 4 0 8 0 sockpl 384 102 0 83 3 0 3 3 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 10 0 10 1 0 1 1 0 8 1 mcl2k 2048 54776 0 54737 15 2 13 14 0 8 7 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 86120 0 86048 12 3 9 9 0 8 0 bufpl 256 5653 0 1217 278 0 278 278 0 8 0 anonpl 16 33699 0 22745 46 2 44 44 0 62 0 amapchunkpl 152 1022 0 916 6 0 6 6 0 158 1 amappl16 192 841 0 239 31 0 31 31 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 60 0 53 1 0 1 1 0 8 0 amappl13 168 7 0 6 1 0 1 1 0 8 0 amappl12 160 10 0 9 1 0 1 1 0 8 0 amappl11 152 75 0 61 1 0 1 1 0 8 0 amappl10 144 61 0 60 1 0 1 1 0 8 0 amappl9 136 577 0 572 1 0 1 1 0 8 0 amappl8 128 145 0 129 1 0 1 1 0 8 0 amappl7 120 31 0 27 1 0 1 1 0 8 0 amappl6 112 67 0 60 1 0 1 1 0 8 0 amappl5 104 137 0 128 1 0 1 1 0 8 0 amappl4 96 454 0 431 1 0 1 1 0 8 0 amappl3 88 166 0 155 1 0 1 1 0 8 0 amappl2 80 1122 0 1046 3 1 2 3 0 8 0 amappl1 72 13843 0 13416 26 12 14 19 0 8 5 amappl 80 532 0 495 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 243 0 228 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 243 0 228 1 0 1 1 0 8 0 vmmpekpl 168 5932 0 5908 2 0 2 2 0 8 0 vmmpepl 168 35654 0 33918 101 9 92 92 0 357 16 vmsppl 272 242 0 228 2 0 2 2 0 8 1 pdppl 4096 493 0 456 6 0 6 6 0 8 1 pvpl 32 119380 0 105406 117 0 117 117 0 265 4 pmappl 200 242 0 228 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 419 0 7 12 0 12 12 0 8 0