panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *380786 82278 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(fffffd802c58bd60) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a01ea0,1,ffff800014940508) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374073f0,c0106477,ffff800015a01ea0,1,fffffd803f7c6960,ffff800014940508) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f8edd30,c0106477,ffff800015a01ea0,ffff800014940508) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800014940508,ffff800015a01fb8,ffff800015a02020) at sys_ioctl+0x5b8 syscall(ffff800015a02080) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,7f43ec99010) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7031e3420, 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(fffffd802c58bd60) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a01ea0,1,ffff800014940508) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374073f0,c0106477,ffff800015a01ea0,1,fffffd803f7c6960,ffff800014940508) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f8edd30,c0106477,ffff800015a01ea0,ffff800014940508) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800014940508,ffff800015a01fb8,ffff800015a02020) at sys_ioctl+0x5b8 syscall(ffff800015a02080) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,7f43ec99010) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7031e3420, count: -9 ddb> show registers rdi 0xffffffff8198adc7 db_enter+0x17 rsi 0x7d40 __ALIGN_SIZE+0x6d40 rbp 0xffff800015a01a60 rbx 0xffff800015a01b10 rdx 0x7d41 __ALIGN_SIZE+0x6d41 rcx 0xffff8000149c3000 rax 0xffff8000149c3000 r8 0xffff800015a01a20 r9 0x1 r10 0xffff800000992ec0 r11 0xa78c68d21ac137d6 r12 0x3000000008 r13 0xffff800015a01a70 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015a01a50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=380786 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff8000149409f8,0xffff8000149413e8 process=0xffff8000ffff6370 user=0xffff8000159fd000, vmspace=0xfffffd803f00c440 estcpu=31, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 3457 382117 2847 0 2 0 syz-executor.0 3457 39841 2847 0 3 0x4000080 fifor syz-executor.0 3457 372689 2847 0 2 0x4000000 syz-executor.0 82278 318001 19278 0 2 0 syz-executor.1 *82278 380786 19278 0 7 0x4000000 syz-executor.1 82278 391521 19278 0 2 0x4000000 syz-executor.1 28037 207001 0 0 3 0x14200 bored sosplice 2847 402136 52896 0 2 0x482 syz-executor.0 19278 514129 52896 0 2 0x482 syz-executor.1 52896 347276 50742 0 3 0x82 thrsleep syz-fuzzer 52896 247617 50742 0 3 0x4000082 thrsleep syz-fuzzer 52896 288110 50742 0 3 0x4000082 kqread syz-fuzzer 52896 396858 50742 0 3 0x4000082 thrsleep syz-fuzzer 52896 410740 50742 0 3 0x4000082 thrsleep syz-fuzzer 52896 161523 50742 0 2 0x4000482 syz-fuzzer 52896 127380 50742 0 3 0x4000082 thrsleep syz-fuzzer 50742 40642 32708 0 3 0x10008a pause ksh 32708 475642 59147 0 3 0x92 select sshd 74932 103645 1 0 3 0x100083 ttyin getty 59147 388009 1 0 3 0x80 select sshd 17257 422228 3572 73 2 0x100090 syslogd 3572 411434 1 0 3 0x100082 netio syslogd 16919 500707 1 77 3 0x100090 poll dhclient 67734 12030 1 0 3 0x80 poll dhclient 91285 6556 0 0 2 0x14200 zerothread 96241 116778 0 0 3 0x14200 aiodoned aiodoned 76642 453135 0 0 3 0x14200 syncer update 18102 110776 0 0 3 0x14200 cleaner cleaner 50786 22284 0 0 3 0x14200 reaper reaper 72988 338050 0 0 3 0x14200 pgdaemon pagedaemon 21919 433088 0 0 3 0x14200 bored crynlk 96893 323060 0 0 3 0x14200 bored crypto 16428 334350 0 0 3 0x40014200 acpi0 acpi0 4935 210312 0 0 3 0x14200 bored softnet 86063 401754 0 0 3 0x14200 bored systqmp 29901 78773 0 0 3 0x14200 bored systq 83593 370275 0 0 3 0x40014200 bored softclock 25920 70738 0 0 3 0x40014200 idle0 32183 443147 0 0 3 0x14200 bored smr 1 159458 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 9555 6370K 7126K 78643K 23545 0 0 pcb 13 8K 8K 78643K 346 0 0 rtable 120 12K 12K 78643K 1071 0 0 ifaddr 73 18K 20K 78643K 516 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 270 0 0 iov 0 0K 28K 78643K 592 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1218 76K 77K 78643K 5552 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 48 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 446 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 4701 0 0 sigio 0 0K 0K 78643K 67 0 0 proc 43 30K 54K 78643K 822 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 456 0 0 in_multi 33 2K 2K 78643K 167 0 0 ether_multi 1 0K 0K 78643K 17 0 0 mrt 0 0K 0K 78643K 11 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 629 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 87 20K 29K 78643K 11820 0 0 UVM aobj 130 4K 4K 78643K 155 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 208 0 0 NDP 17 0K 0K 78643K 141 0 0 temp 206 2728K 2852K 78643K 17748 0 0 kqueue 0 0K 0K 78643K 41 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 9 0 2 1 0 1 1 0 8 0 rtpcb 80 231 0 229 1 0 1 1 0 8 0 rtentry 112 53 0 7 2 0 2 2 0 8 0 unpcb 120 1499 0 1487 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 1060 0 1060 1 1 0 1 0 8 0 tcpcb 544 687 0 683 1 0 1 1 0 8 0 inpcb 280 1996 0 1987 9 8 1 2 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 48 4 0 4 1 1 0 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 24 0 24 8 8 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 87 0 87 17 17 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 190 0 1 12 0 12 12 0 8 0 art_table 32 191 0 1 2 0 2 2 0 8 0 art_node 16 48 0 7 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 20 1 0 1 1 0 8 0 semapl 112 442 0 432 1 0 1 1 0 8 0 shmpl 112 153 0 25 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9046 0 7631 46 0 46 46 0 8 0 ffsino 240 9046 0 7631 84 0 84 84 0 8 0 nchpl 144 15881 0 14245 62 1 61 62 0 8 0 uvmvnodes 72 6901 0 0 126 0 126 126 0 8 0 vnodes 200 6901 0 0 364 0 364 364 0 8 0 namei 1024 50008 0 50008 4 3 1 1 0 8 1 scsiplug 64 7 0 7 5 5 0 1 0 8 0 scxspl 192 51119 0 51119 26 25 1 6 0 8 1 plimitpl 152 374 0 367 1 0 1 1 0 8 0 sigapl 432 4872 0 4858 2 0 2 2 0 8 0 futexpl 56 78062 0 78062 4 3 1 1 0 8 1 knotepl 112 903 0 884 1 0 1 1 0 8 0 kqueuepl 104 1141 0 1139 1 0 1 1 0 8 0 pipepl 112 2666 0 2647 7 6 1 2 0 8 0 fdescpl 424 4873 0 4858 2 0 2 2 0 8 0 filepl 120 29453 0 29355 5 1 4 5 0 8 1 lockfpl 104 1692 0 1691 5 4 1 1 0 8 0 lockfspl 48 593 0 592 5 4 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 67 0 57 1 0 1 1 0 8 0 ucredpl 96 6412 0 6405 1 0 1 1 0 8 0 zombiepl 144 4858 0 4858 2 1 1 1 0 8 1 processpl 864 4888 0 4858 4 0 4 4 0 8 0 procpl 632 10942 0 10902 4 0 4 4 0 8 0 sosppl 128 70 0 70 17 16 1 1 0 8 1 sockpl 384 3790 0 3769 10 7 3 4 0 8 0 mcl64k 65536 1446 0 1446 108 107 1 33 0 8 1 mcl16k 16384 13 0 13 11 10 1 1 0 8 1 mcl12k 12288 90 0 90 17 16 1 1 0 8 1 mcl9k 9216 67 0 67 15 15 0 1 0 8 0 mcl8k 8192 66 0 66 18 18 0 1 0 8 0 mcl4k 4096 227 0 227 3 2 1 1 0 8 1 mcl2k2 2112 30 0 30 13 13 0 1 0 8 0 mcl2k 2048 61915 0 61870 29 22 7 16 0 8 0 mtagpl 80 144 0 75 3 1 2 2 0 8 0 mbufpl 256 122035 0 121837 69 54 15 29 0 8 0 bufpl 256 21901 0 14791 445 0 445 445 0 8 0 anonpl 16 486336 0 474432 200 145 55 65 0 62 3 amapchunkpl 152 21139 0 21030 82 75 7 15 0 158 1 amappl16 192 28350 0 27695 208 170 38 45 0 8 5 amappl15 184 10 0 9 1 0 1 1 0 8 0 amappl14 176 50 0 43 1 0 1 1 0 8 0 amappl13 168 7 0 7 1 1 0 1 0 8 0 amappl12 160 6 0 5 1 0 1 1 0 8 0 amappl11 152 2392 0 2378 1 0 1 1 0 8 0 amappl10 144 2394 0 2392 2 1 1 1 0 8 0 amappl9 136 553 0 550 1 0 1 1 0 8 0 amappl8 128 127 0 112 1 0 1 1 0 8 0 amappl7 120 2369 0 2363 1 0 1 1 0 8 0 amappl6 112 2386 0 2378 1 0 1 1 0 8 0 amappl5 104 180 0 170 1 0 1 1 0 8 0 amappl4 96 5129 0 5102 1 0 1 1 0 8 0 amappl3 88 320 0 309 1 0 1 1 0 8 0 amappl2 80 38554 0 38479 4 2 2 3 0 8 0 amappl1 72 90451 0 90017 26 17 9 19 0 8 0 amappl 80 11235 0 11197 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 154 0 25 3 0 3 3 0 8 0 uaddrrnd 24 4873 0 4858 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4873 0 4858 1 0 1 1 0 8 0 vmmpekpl 168 28634 0 28610 2 0 2 2 0 8 0 vmmpepl 168 566444 0 564634 216 134 82 93 0 357 3 vmsppl 272 4872 0 4858 2 1 1 2 0 8 0 pdppl 4096 9753 0 9716 6 1 5 6 0 8 0 pvpl 32 1402360 0 1387307 423 274 149 215 0 265 24 pmappl 200 4872 0 4858 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 798 0 220 20 2 18 18 0 8 0