panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 98860 16922 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(fffffd802b8542d8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a09b90,1,ffff8000ffff2ee8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374150d0,c0106477,ffff800015a09b90,1,fffffd803f7c6b40,ffff8000ffff2ee8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f973358,c0106477,ffff800015a09b90,ffff8000ffff2ee8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2ee8,ffff800015a09ca8,ffff800015a09d10) at sys_ioctl+0x5b8 syscall(ffff800015a09d70) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,f5624b3e010) at Xsyscall+0x128 end of kernel end trace frame: 0xf59006f1500, 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(fffffd802b8542d8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a09b90,1,ffff8000ffff2ee8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374150d0,c0106477,ffff800015a09b90,1,fffffd803f7c6b40,ffff8000ffff2ee8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f973358,c0106477,ffff800015a09b90,ffff8000ffff2ee8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2ee8,ffff800015a09ca8,ffff800015a09d10) at sys_ioctl+0x5b8 syscall(ffff800015a09d70) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,f5624b3e010) at Xsyscall+0x128 end of kernel end trace frame: 0xf59006f1500, count: -9 ddb> show registers rdi 0xffffffff81877897 db_enter+0x17 rsi 0x5569 __ALIGN_SIZE+0x4569 rbp 0xffff800015a09750 rbx 0xffff800015a09800 rdx 0x556a __ALIGN_SIZE+0x456a rcx 0xffff800016bdd000 rax 0xffff800016bdd000 r8 0xffff800015a09710 r9 0x1 r10 0xffff8000009ccd80 r11 0x7205c8128fa59aae r12 0x3000000008 r13 0xffff800015a09760 r14 0x100 r15 0x1 rip 0xffffffff81877898 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015a09740 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=98860 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3650,0xffff8000ffff3b50 process=0xffff8000ffff7450 user=0xffff800015a04000, vmspace=0xfffffd803f00bee0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 16922 401318 9409 0 2 0 syz-executor.1 *16922 98860 9409 0 7 0x4000000 syz-executor.1 16922 175515 9409 0 2 0x4000000 syz-executor.1 52249 245561 73319 0 3 0x80 nanosleep syz-executor.0 52249 118763 73319 0 3 0x4000080 select syz-executor.0 9409 170934 63364 0 2 0x482 syz-executor.1 47485 487217 1 0 3 0x100083 ttyin getty 45340 304383 0 0 3 0x14200 bored sosplice 73319 51813 63364 0 3 0x82 nanosleep syz-executor.0 63364 20379 16819 0 3 0x82 thrsleep syz-fuzzer 63364 341875 16819 0 3 0x4000082 thrsleep syz-fuzzer 63364 209958 16819 0 3 0x4000082 kqread syz-fuzzer 63364 353570 16819 0 3 0x4000082 thrsleep syz-fuzzer 63364 519761 16819 0 3 0x4000082 thrsleep syz-fuzzer 63364 492691 16819 0 3 0x4000082 thrsleep syz-fuzzer 63364 246892 16819 0 3 0x4000082 thrsleep syz-fuzzer 16819 72262 80241 0 3 0x10008a pause ksh 80241 242481 92288 0 3 0x92 select sshd 92288 21569 1 0 3 0x80 select sshd 68180 266897 71525 73 2 0x100090 syslogd 71525 73098 1 0 3 0x100082 netio syslogd 68011 225172 1 77 3 0x100090 poll dhclient 69615 298727 1 0 3 0x80 poll dhclient 87067 194327 0 0 2 0x14200 zerothread 22775 293673 0 0 3 0x14200 aiodoned aiodoned 7232 443185 0 0 3 0x14200 syncer update 89669 205297 0 0 3 0x14200 cleaner cleaner 94709 488457 0 0 3 0x14200 reaper reaper 5594 303561 0 0 3 0x14200 pgdaemon pagedaemon 2492 455467 0 0 3 0x14200 bored crynlk 58883 185657 0 0 3 0x14200 bored crypto 9083 171767 0 0 3 0x40014200 acpi0 acpi0 61739 453845 0 0 3 0x14200 bored softnet 51101 417377 0 0 3 0x14200 bored systqmp 83229 324434 0 0 3 0x14200 bored systq 99337 82543 0 0 2 0x40014200 softclock 58192 465918 0 0 3 0x40014200 idle0 75379 10448 0 0 2 0x14200 smr 1 83437 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 9572 6518K 14710K 78643K 26756 0 0 pcb 13 8K 8K 78643K 321 0 0 rtable 120 12K 13K 78643K 1152 0 0 ifaddr 73 18K 19K 78643K 539 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 346 0 0 iov 0 0K 24K 78643K 842 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 77K 78643K 6695 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 78 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 643 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 5810 0 0 sigio 0 0K 0K 78643K 85 0 0 proc 42 30K 46K 78643K 840 0 0 subproc 32 2K 2K 78643K 51 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 592 0 0 in_multi 33 2K 2K 78643K 221 0 0 ether_multi 1 0K 0K 78643K 18 0 0 mrt 0 0K 0K 78643K 14 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 706 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 96 21K 30K 78643K 14313 0 0 UVM aobj 130 5K 5K 78643K 152 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 209 0 0 NDP 17 0K 0K 78643K 146 0 0 temp 206 2728K 3367K 78643K 21085 0 0 kqueue 0 0K 0K 78643K 47 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 10 0 4 1 0 1 1 0 8 0 rtpcb 80 268 0 266 1 0 1 1 0 8 0 rtentry 112 68 0 23 2 0 2 2 0 8 0 unpcb 120 1860 0 1849 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1654 0 1654 1 1 0 1 0 8 0 tcpcb 544 935 0 931 1 0 1 1 0 8 0 inpcb 280 2380 0 2373 3 2 1 2 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 43 0 43 14 14 0 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 97 0 97 18 18 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 238 0 46 12 0 12 12 0 8 0 art_table 32 239 0 46 2 0 2 2 0 8 0 art_node 16 58 0 18 1 0 1 1 0 8 0 sysvmsgpl 40 33 0 18 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 641 0 631 1 0 1 1 0 8 0 shmpl 112 150 0 22 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 10855 0 9455 46 0 46 46 0 8 0 ffsino 240 10855 0 9455 84 0 84 84 0 8 0 nchpl 144 19230 0 17603 61 0 61 61 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 60933 0 60933 3 2 1 1 0 8 1 scsiplug 64 14 0 14 9 9 0 1 0 8 0 scxspl 192 62856 0 62856 43 41 2 6 0 8 2 plimitpl 152 463 0 456 1 0 1 1 0 8 0 sigapl 432 5982 0 5968 2 0 2 2 0 8 0 futexpl 56 97605 0 97605 3 2 1 1 0 8 1 knotepl 112 1159 0 1140 1 0 1 1 0 8 0 kqueuepl 104 1409 0 1407 1 0 1 1 0 8 0 pipepl 112 3468 0 3449 8 7 1 2 0 8 0 fdescpl 424 5983 0 5968 2 0 2 2 0 8 0 filepl 120 35738 0 35640 6 2 4 5 0 8 1 lockfpl 104 2155 0 2154 4 3 1 1 0 8 0 lockfspl 48 732 0 731 4 3 1 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 56 0 46 1 0 1 1 0 8 0 ucredpl 96 7057 0 7050 1 0 1 1 0 8 0 zombiepl 144 5968 0 5968 2 1 1 1 0 8 1 processpl 864 5998 0 5968 4 0 4 4 0 8 0 procpl 632 13352 0 13313 4 0 4 4 0 8 0 sosppl 128 61 0 61 16 16 0 1 0 8 0 sockpl 384 4594 0 4574 5 2 3 3 0 8 1 mcl64k 65536 1435 0 1435 131 130 1 65 0 8 1 mcl16k 16384 21 0 21 13 12 1 1 0 8 1 mcl12k 12288 109 0 109 9 8 1 1 0 8 1 mcl9k 9216 93 0 93 15 14 1 1 0 8 1 mcl8k 8192 85 0 85 14 13 1 1 0 8 1 mcl4k 4096 282 0 282 4 3 1 1 0 8 1 mcl2k2 2112 36 0 36 13 12 1 1 0 8 1 mcl2k 2048 63958 0 63918 18 12 6 12 0 8 0 mtagpl 80 151 0 133 3 2 1 2 0 8 0 mbufpl 256 130531 0 130431 83 73 10 38 0 8 0 bufpl 256 24983 0 19458 346 0 346 346 0 8 0 anonpl 16 543567 0 531898 209 145 64 66 0 62 12 amapchunkpl 152 24356 0 24224 57 47 10 15 0 158 4 amappl16 192 33649 0 33007 213 172 41 45 0 8 8 amappl15 184 3142 0 3138 1 0 1 1 0 8 0 amappl14 176 319 0 313 1 0 1 1 0 8 0 amappl13 168 10 0 9 1 0 1 1 0 8 0 amappl12 160 14 0 12 1 0 1 1 0 8 0 amappl11 152 54 0 43 1 0 1 1 0 8 0 amappl10 144 70 0 69 2 1 1 1 0 8 0 amappl9 136 3184 0 3181 1 0 1 1 0 8 0 amappl8 128 2767 0 2750 1 0 1 1 0 8 0 amappl7 120 41 0 35 1 0 1 1 0 8 0 amappl6 112 58 0 51 1 0 1 1 0 8 0 amappl5 104 197 0 186 1 0 1 1 0 8 0 amappl4 96 6271 0 6239 2 1 1 2 0 8 0 amappl3 88 439 0 428 1 0 1 1 0 8 0 amappl2 80 50181 0 50103 4 2 2 3 0 8 0 amappl1 72 108305 0 107876 26 17 9 19 0 8 0 amappl 80 13666 0 13622 7 5 2 2 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 151 0 22 3 0 3 3 0 8 0 uaddrrnd 24 5983 0 5968 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5983 0 5968 1 0 1 1 0 8 0 vmmpekpl 168 32072 0 32051 2 0 2 2 0 8 0 vmmpepl 168 691229 0 689425 210 122 88 96 0 357 9 vmsppl 272 5982 0 5968 2 1 1 2 0 8 0 pdppl 4096 11973 0 11936 6 1 5 6 0 8 0 pvpl 32 1372717 0 1357935 341 182 159 165 0 265 33 pmappl 200 5982 0 5968 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 723 0 249 17 1 16 17 0 8 0