panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *291244 72867 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(fffffd803040bd28) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149d4b70,1,ffff8000ffff29f8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374163f0,c0106477,ffff8000149d4b70,1,fffffd803f7c6a20,ffff8000ffff29f8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80375af0f0,c0106477,ffff8000149d4b70,ffff8000ffff29f8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff29f8,ffff8000149d4c88,ffff8000149d4cf0) at sys_ioctl+0x5b8 syscall(ffff8000149d4d50) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,b5830820010) at Xsyscall+0x128 end of kernel end trace frame: 0xb5a4b9ad970, 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(fffffd803040bd28) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149d4b70,1,ffff8000ffff29f8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374163f0,c0106477,ffff8000149d4b70,1,fffffd803f7c6a20,ffff8000ffff29f8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80375af0f0,c0106477,ffff8000149d4b70,ffff8000ffff29f8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff29f8,ffff8000149d4c88,ffff8000149d4cf0) at sys_ioctl+0x5b8 syscall(ffff8000149d4d50) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,b5830820010) at Xsyscall+0x128 end of kernel end trace frame: 0xb5a4b9ad970, count: -9 ddb> show registers rdi 0xffffffff8198adc7 db_enter+0x17 rsi 0x75cf __ALIGN_SIZE+0x65cf rbp 0xffff8000149d4730 rbx 0xffff8000149d47e0 rdx 0x75d0 __ALIGN_SIZE+0x65d0 rcx 0xffff8000149e5000 rax 0xffff8000149e5000 r8 0xffff8000149d46f0 r9 0x1 r10 0xffff800000998240 r11 0x6ec4bc8c7d47817d r12 0x3000000008 r13 0xffff8000149d4740 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149d4720 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=291244 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff38c8,0xffff8000ffff2790 process=0xffff8000ffffaa28 user=0xffff8000149cf000, 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 72867 70385 86928 0 2 0 syz-executor.1 *72867 291244 86928 0 7 0x4000000 syz-executor.1 72867 435687 86928 0 2 0x4000000 syz-executor.1 13243 199493 86377 0 2 0x2 syz-executor.0 86928 96620 86377 0 2 0x482 syz-executor.1 29093 220295 1 0 3 0x100083 ttyin getty 83786 389813 0 0 3 0x14200 bored sosplice 86377 327192 31465 0 3 0x82 kqread syz-fuzzer 86377 84159 31465 0 2 0x4000482 syz-fuzzer 86377 325212 31465 0 3 0x4000082 thrsleep syz-fuzzer 86377 292037 31465 0 3 0x4000082 thrsleep syz-fuzzer 86377 286560 31465 0 3 0x4000082 thrsleep syz-fuzzer 86377 508515 31465 0 3 0x4000082 thrsleep syz-fuzzer 86377 40502 31465 0 3 0x4000082 thrsleep syz-fuzzer 86377 184477 31465 0 3 0x4000082 thrsleep syz-fuzzer 31465 115122 72257 0 3 0x10008a pause ksh 72257 199583 37758 0 3 0x92 select sshd 37758 512456 1 0 3 0x80 select sshd 27135 251850 2779 73 2 0x100090 syslogd 2779 381001 1 0 3 0x100082 netio syslogd 69029 5358 1 77 3 0x100090 poll dhclient 42378 114508 1 0 3 0x80 poll dhclient 61355 490828 0 0 2 0x14200 zerothread 7323 141273 0 0 3 0x14200 aiodoned aiodoned 49098 14658 0 0 3 0x14200 syncer update 59334 90050 0 0 3 0x14200 cleaner cleaner 96376 181749 0 0 3 0x14200 reaper reaper 21722 113932 0 0 3 0x14200 pgdaemon pagedaemon 58905 483887 0 0 3 0x14200 bored crynlk 83660 438479 0 0 3 0x14200 bored crypto 99103 222383 0 0 3 0x40014200 acpi0 acpi0 88479 56832 0 0 3 0x14200 bored softnet 86936 116919 0 0 3 0x14200 bored systqmp 50706 370652 0 0 3 0x14200 bored systq 63276 192465 0 0 3 0x40014200 bored softclock 21189 349296 0 0 3 0x40014200 idle0 60391 514883 0 0 3 0x14200 bored smr 1 349747 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 9588 6513K 14817K 78643K 37186 0 0 pcb 13 8K 8K 78643K 668 0 0 rtable 118 4K 5K 78643K 1920 0 0 ifaddr 77 18K 19K 78643K 839 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 570 0 0 iov 0 0K 32K 78643K 1221 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 77K 78643K 12973 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 96 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 847 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 12627 0 0 sigio 2 0K 0K 78643K 154 0 0 proc 42 30K 46K 78643K 1440 0 0 subproc 32 2K 2K 78643K 93 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 854 0 0 in_multi 33 2K 2K 78643K 420 0 0 ether_multi 1 0K 0K 78643K 64 0 0 mrt 0 0K 0K 78643K 22 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 132 583K 583K 78643K 132 0 0 exec 0 0K 1K 78643K 1124 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 103 21K 37K 78643K 30237 0 0 UVM aobj 130 4K 4K 78643K 149 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 372 0 0 NDP 18 0K 0K 78643K 229 0 0 temp 212 2728K 2856K 78643K 41495 0 0 kqueue 0 0K 0K 78643K 88 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 13 0 7 1 0 1 1 0 8 0 rtpcb 80 581 0 579 1 0 1 1 0 8 0 rtentry 112 87 0 42 2 0 2 2 0 8 0 unpcb 120 3259 0 3249 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1376 0 1376 1 1 0 1 0 8 0 tcpcb 544 1394 0 1390 1 0 1 1 0 8 0 inpcb 280 3809 0 3802 6 5 1 2 0 8 0 nd6 48 15 0 9 1 0 1 1 0 8 0 pkpcb 40 40 0 40 18 17 1 1 0 8 1 swfcl 56 5 0 0 1 0 1 1 0 8 0 ppxss 1128 161 0 161 42 41 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 331 0 136 17 4 13 13 0 8 0 art_table 32 332 0 136 2 0 2 2 0 8 0 art_node 16 79 0 39 1 0 1 1 0 8 0 sysvmsgpl 40 60 0 54 1 0 1 1 0 8 0 semapl 112 845 0 835 1 0 1 1 0 8 0 shmpl 112 147 0 19 5 1 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 24447 0 23036 46 0 46 46 0 8 0 ffsino 240 24447 0 23036 84 0 84 84 0 8 0 nchpl 144 41647 0 40030 61 0 61 61 0 8 0 uvmvnodes 72 7765 0 0 142 0 142 142 0 8 0 vnodes 200 7765 0 0 409 0 409 409 0 8 0 namei 1024 138190 0 138190 4 3 1 1 0 8 1 scsiplug 64 12 0 12 10 10 0 1 0 8 0 scxspl 192 119918 0 119918 69 67 2 7 0 8 2 plimitpl 152 800 0 793 1 0 1 1 0 8 0 sigapl 432 12795 0 12782 2 0 2 2 0 8 0 futexpl 56 197773 0 197773 4 3 1 1 0 8 1 knotepl 112 5158 0 5139 1 0 1 1 0 8 0 kqueuepl 104 4187 0 4185 1 0 1 1 0 8 0 pipepl 112 7330 0 7311 8 7 1 2 0 8 0 fdescpl 424 12796 0 12782 2 0 2 2 0 8 0 filepl 120 81789 0 81693 9 5 4 5 0 8 1 lockfpl 104 3496 0 3496 20 19 1 1 0 8 1 lockfspl 48 1187 0 1187 20 19 1 1 0 8 1 sessionpl 112 26 0 16 1 0 1 1 0 8 0 pgrppl 48 142 0 132 1 0 1 1 0 8 0 ucredpl 96 23673 0 23666 1 0 1 1 0 8 0 zombiepl 144 12782 0 12782 3 2 1 1 0 8 1 processpl 864 12811 0 12782 4 0 4 4 0 8 0 procpl 632 29052 0 29014 4 0 4 4 0 8 0 sosppl 128 104 0 104 27 27 0 1 0 8 0 sockpl 384 7765 0 7746 28 25 3 4 0 8 1 mcl64k 65536 2060 0 2060 198 198 0 65 0 8 0 mcl16k 16384 32 0 32 19 19 0 1 0 8 0 mcl12k 12288 225 0 225 46 45 1 1 0 8 1 mcl9k 9216 166 0 166 39 38 1 1 0 8 1 mcl8k 8192 141 0 141 36 36 0 1 0 8 0 mcl4k 4096 665 0 665 34 33 1 1 0 8 1 mcl2k2 2112 79 0 79 31 31 0 1 0 8 0 mcl2k 2048 74135 0 74090 46 40 6 15 0 8 0 mtagpl 80 245 0 186 4 2 2 2 0 8 0 mbufpl 256 175938 0 175757 115 102 13 41 0 8 0 bufpl 256 37007 0 29241 486 0 486 486 0 8 0 anonpl 16 1036152 0 1024404 303 240 63 65 0 62 12 amapchunkpl 152 53278 0 53163 150 142 8 19 0 158 3 amappl16 192 68511 0 67867 300 260 40 45 0 8 7 amappl15 184 5 0 5 5 5 0 1 0 8 0 amappl14 176 66 0 62 1 0 1 1 0 8 0 amappl13 168 9560 0 9559 2 1 1 1 0 8 0 amappl12 160 10 0 7 1 0 1 1 0 8 0 amappl11 152 62 0 51 1 0 1 1 0 8 0 amappl10 144 74 0 74 9 9 0 1 0 8 0 amappl9 136 607 0 603 1 0 1 1 0 8 0 amappl8 128 181 0 153 1 0 1 1 0 8 0 amappl7 120 45 0 39 1 0 1 1 0 8 0 amappl6 112 79 0 66 1 0 1 1 0 8 0 amappl5 104 235 0 225 1 0 1 1 0 8 0 amappl4 96 14115 0 14083 2 1 1 2 0 8 0 amappl3 88 585 0 575 1 0 1 1 0 8 0 amappl2 80 101706 0 101639 3 1 2 3 0 8 0 amappl1 72 235684 0 235264 24 15 9 19 0 8 0 amappl 80 29385 0 29346 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 148 0 19 3 0 3 3 0 8 0 uaddrrnd 24 12796 0 12782 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 12796 0 12782 1 0 1 1 0 8 0 vmmpekpl 168 93188 0 93164 2 0 2 2 0 8 0 vmmpepl 168 1452871 0 1451150 339 253 86 99 0 357 6 vmsppl 272 12795 0 12782 3 2 1 2 0 8 0 pdppl 4096 25599 0 25564 6 1 5 6 0 8 0 pvpl 32 3005371 0 2990473 759 526 233 255 0 265 110 pmappl 200 12795 0 12782 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1055 0 440 23 3 20 20 0 8 0