panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *494886 40621 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(fffffd800453e2f0) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800016200250,1,ffff8000ffff2290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037411580,c0106477,ffff800016200250,1,fffffd803f7c6780,ffff8000ffff2290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f7a3e20,c0106477,ffff800016200250,ffff8000ffff2290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2290,ffff800016200368,ffff8000162003d0) at sys_ioctl+0x5b8 syscall(ffff800016200430) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,f0debbe010) at Xsyscall+0x128 end of kernel end trace frame: 0xf2e98ac2c0, 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(fffffd800453e2f0) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800016200250,1,ffff8000ffff2290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037411580,c0106477,ffff800016200250,1,fffffd803f7c6780,ffff8000ffff2290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f7a3e20,c0106477,ffff800016200250,ffff8000ffff2290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2290,ffff800016200368,ffff8000162003d0) at sys_ioctl+0x5b8 syscall(ffff800016200430) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,f0debbe010) at Xsyscall+0x128 end of kernel end trace frame: 0xf2e98ac2c0, count: -9 ddb> show registers rdi 0xffffffff81ac3167 db_enter+0x17 rsi 0x7f1d __ALIGN_SIZE+0x6f1d rbp 0xffff8000161ffe10 rbx 0xffff8000161ffec0 rdx 0x7f1e __ALIGN_SIZE+0x6f1e rcx 0xffff8000151df000 rax 0xffff8000151df000 r8 0xffff8000161ffdd0 r9 0x1 r10 0xffff800000998180 r11 0x4a44b927888fd387 r12 0x3000000008 r13 0xffff8000161ffe20 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000161ffe00 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=494886 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2ee8,0xffff8000ffff2a08 process=0xffff8000ffff6010 user=0xffff8000161fb000, vmspace=0xfffffd803f013440 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 40621 207034 41161 0 2 0 syz-executor.1 *40621 494886 41161 0 7 0x4000000 syz-executor.1 40621 377553 41161 0 2 0x4000000 syz-executor.1 85495 173714 0 0 3 0x14200 bored sosplice 41161 180562 20997 0 2 0x482 syz-executor.1 97213 21090 20997 0 2 0x2 syz-executor.0 20997 517352 72334 0 3 0x82 thrsleep syz-fuzzer 20997 87855 72334 0 2 0x4000482 syz-fuzzer 20997 484501 72334 0 3 0x4000082 thrsleep syz-fuzzer 20997 490170 72334 0 3 0x4000082 thrsleep syz-fuzzer 20997 134897 72334 0 3 0x4000082 thrsleep syz-fuzzer 20997 233734 72334 0 3 0x4000082 kqread syz-fuzzer 20997 320197 72334 0 3 0x4000082 thrsleep syz-fuzzer 72334 258220 33529 0 3 0x10008a pause ksh 33529 191980 88559 0 3 0x92 select sshd 40918 235172 1 0 3 0x100083 ttyin getty 88559 62091 1 0 3 0x80 select sshd 16066 456085 22238 73 2 0x100090 syslogd 22238 363668 1 0 3 0x100082 netio syslogd 46158 113508 1 77 3 0x100090 poll dhclient 60630 189854 1 0 3 0x80 poll dhclient 50766 92021 0 0 2 0x14200 zerothread 92606 259945 0 0 3 0x14200 aiodoned aiodoned 39853 443816 0 0 3 0x14200 syncer update 76039 479749 0 0 3 0x14200 cleaner cleaner 93492 257932 0 0 3 0x14200 reaper reaper 94149 146270 0 0 3 0x14200 pgdaemon pagedaemon 93783 4830 0 0 3 0x14200 bored crynlk 72781 420456 0 0 3 0x14200 bored crypto 86731 281542 0 0 3 0x40014200 acpi0 acpi0 46597 402986 0 0 3 0x14200 bored softnet 90091 56530 0 0 3 0x14200 bored systqmp 43647 245451 0 0 3 0x14200 bored systq 88739 167302 0 0 3 0x40014200 bored softclock 88054 448119 0 0 3 0x40014200 idle0 54897 168813 0 0 3 0x14200 bored smr 1 254556 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 9491 6455K 6838K 78643K 11478 0 0 pcb 13 8K 8K 78643K 53 0 0 rtable 108 3K 4K 78643K 234 0 0 ifaddr 48 11K 11K 78643K 60 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 33 0 0 iov 0 0K 12K 78643K 32 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1220 77K 77K 78643K 1542 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 4 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 38 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 341 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 41 30K 54K 78643K 390 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 14 0 0 in_multi 33 2K 2K 78643K 34 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 199 0 0 pfkey data 0 0K 0K 78643K 2 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 86 20K 22K 78643K 1596 0 0 UVM aobj 11 2K 2K 78643K 13 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 29 0 0 NDP 9 0K 0K 78643K 16 0 0 temp 135 2719K 2786K 78643K 4011 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 39 0 37 1 0 1 1 0 8 0 rtentry 112 47 0 3 2 0 2 2 0 8 0 unpcb 120 133 0 123 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1620 0 1620 1 1 0 1 0 8 0 tcpcb 544 48 0 44 1 0 1 1 0 8 0 inpcb 280 168 0 161 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 ppxss 1128 2 0 2 1 0 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 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semapl 112 36 0 26 1 0 1 1 0 8 0 shmpl 112 11 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1938 0 524 46 0 46 46 0 8 0 ffsino 240 1938 0 524 84 0 84 84 0 8 0 nchpl 144 2577 0 937 62 0 62 62 0 8 0 uvmvnodes 72 2205 0 0 41 0 41 41 0 8 0 vnodes 200 2205 0 0 117 0 117 117 0 8 0 namei 1024 7132 0 7132 1 0 1 1 0 8 1 scxspl 192 6412 0 6412 6 5 1 5 0 8 1 plimitpl 152 35 0 28 1 0 1 1 0 8 0 sigapl 432 512 0 499 2 0 2 2 0 8 0 futexpl 56 5278 0 5278 1 0 1 1 0 8 1 knotepl 112 83 0 64 1 0 1 1 0 8 0 kqueuepl 104 50 0 48 1 0 1 1 0 8 0 pipepl 112 342 0 323 2 0 2 2 0 8 1 fdescpl 424 513 0 499 2 0 2 2 0 8 0 filepl 120 2874 0 2778 4 0 4 4 0 8 1 lockfpl 104 140 0 140 2 1 1 1 0 8 1 lockfspl 48 50 0 50 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 27 0 17 1 0 1 1 0 8 0 ucredpl 96 488 0 481 1 0 1 1 0 8 0 zombiepl 144 499 0 499 1 0 1 1 0 8 1 processpl 864 528 0 499 4 0 4 4 0 8 0 procpl 632 923 0 886 4 0 4 4 0 8 0 sosppl 128 7 0 7 1 0 1 1 0 8 1 sockpl 384 342 0 323 3 0 3 3 0 8 1 mcl64k 65536 9 0 9 2 1 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 7 0 7 1 0 1 1 0 8 1 mcl4k 4096 25 0 25 2 1 1 1 0 8 1 mcl2k2 2112 4 0 4 1 0 1 1 0 8 1 mcl2k 2048 54255 0 54213 14 8 6 12 0 8 0 mtagpl 80 20 0 5 2 1 1 1 0 8 0 mbufpl 256 87623 0 87533 11 4 7 9 0 8 0 bufpl 256 7163 0 1575 350 0 350 350 0 8 0 anonpl 16 54583 0 42763 66 1 65 65 0 62 16 amapchunkpl 152 2284 0 2178 16 2 14 14 0 158 9 amappl16 192 1888 0 1239 33 0 33 33 0 8 0 amappl15 184 151 0 149 1 0 1 1 0 8 0 amappl14 176 206 0 198 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 164 0 160 1 0 1 1 0 8 0 amappl11 152 50 0 39 1 0 1 1 0 8 0 amappl10 144 66 0 65 1 0 1 1 0 8 0 amappl9 136 559 0 556 1 0 1 1 0 8 0 amappl8 128 131 0 114 1 0 1 1 0 8 0 amappl7 120 33 0 29 1 0 1 1 0 8 0 amappl6 112 53 0 47 1 0 1 1 0 8 0 amappl5 104 288 0 278 1 0 1 1 0 8 0 amappl4 96 735 0 707 1 0 1 1 0 8 0 amappl3 88 177 0 166 1 0 1 1 0 8 0 amappl2 80 3463 0 3393 3 1 2 3 0 8 0 amappl1 72 18160 0 17762 25 16 9 19 0 8 0 amappl 80 1145 0 1109 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 12 0 2 1 0 1 1 0 8 0 uaddrrnd 24 513 0 499 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 513 0 499 1 0 1 1 0 8 0 vmmpekpl 168 7499 0 7478 2 0 2 2 0 8 0 vmmpepl 168 65805 0 64123 96 16 80 91 0 357 6 vmsppl 272 512 0 499 2 1 1 2 0 8 0 pdppl 4096 1032 0 998 6 1 5 6 0 8 0 pvpl 32 213532 0 198709 255 0 255 255 0 265 134 pmappl 200 512 0 499 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 493 0 18 14 0 14 14 0 8 0