panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *440515 74789 0 0 0x4000000 0 syz-executor.0 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(fffffd803e72c948) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000179ea040,1,ffff8000ffff2ee8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037419710,c0106477,ffff8000179ea040,1,fffffd803f7c6ba0,ffff8000ffff2ee8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8036164bc0,c0106477,ffff8000179ea040,ffff8000ffff2ee8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2ee8,ffff8000179ea158,ffff8000179ea1c0) at sys_ioctl+0x5b8 syscall(ffff8000179ea220) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,15378ee6010) at Xsyscall+0x128 end of kernel end trace frame: 0x15603d8b190, 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(fffffd803e72c948) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000179ea040,1,ffff8000ffff2ee8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037419710,c0106477,ffff8000179ea040,1,fffffd803f7c6ba0,ffff8000ffff2ee8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8036164bc0,c0106477,ffff8000179ea040,ffff8000ffff2ee8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2ee8,ffff8000179ea158,ffff8000179ea1c0) at sys_ioctl+0x5b8 syscall(ffff8000179ea220) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,15378ee6010) at Xsyscall+0x128 end of kernel end trace frame: 0x15603d8b190, count: -9 ddb> show registers rdi 0xffffffff81126a97 db_enter+0x17 rsi 0x7ba0 __ALIGN_SIZE+0x6ba0 rbp 0xffff8000179e9c00 rbx 0xffff8000179e9cb0 rdx 0x7ba1 __ALIGN_SIZE+0x6ba1 rcx 0xffff8000159df000 rax 0xffff8000159df000 r8 0xffff8000179e9bc0 r9 0x1 r10 0xffff800000a0d680 r11 0xe4b3b754ccb63698 r12 0x3000000008 r13 0xffff8000179e9c10 r14 0x100 r15 0x1 rip 0xffffffff81126a98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000179e9bf0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=440515 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff38c8,0xffff8000ffff33e8 process=0xffff8000ffff77b0 user=0xffff8000179e5000, vmspace=0xfffffd803f014440 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 74789 294499 35361 0 2 0 syz-executor.0 *74789 440515 35361 0 7 0x4000000 syz-executor.0 74789 209329 35361 0 2 0x4000000 syz-executor.0 56926 221094 48451 0 3 0x3000 suspend syz-executor.1 56926 23980 48451 0 2 0x4081000 syz-executor.1 35361 520776 26563 0 2 0x482 syz-executor.0 82655 179374 1 0 3 0x100083 ttyin getty 32934 251402 0 0 3 0x14200 bored sosplice 48451 197237 26563 0 2 0x482 syz-executor.1 26563 2166 6754 0 3 0x82 thrsleep syz-fuzzer 26563 282405 6754 0 3 0x4000082 thrsleep syz-fuzzer 26563 354829 6754 0 3 0x4000082 thrsleep syz-fuzzer 26563 23480 6754 0 3 0x4000082 thrsleep syz-fuzzer 26563 127580 6754 0 3 0x4000082 kqread syz-fuzzer 26563 297007 6754 0 3 0x4000082 thrsleep syz-fuzzer 26563 186373 6754 0 3 0x4000082 thrsleep syz-fuzzer 6754 227360 17033 0 3 0x10008a pause ksh 17033 63882 5135 0 3 0x92 select sshd 5135 182796 1 0 3 0x80 select sshd 8456 160071 77415 73 2 0x100090 syslogd 77415 490416 1 0 3 0x100082 netio syslogd 74876 20266 1 77 3 0x100090 poll dhclient 58872 199945 1 0 3 0x80 poll dhclient 63112 168384 0 0 2 0x14200 zerothread 67282 427944 0 0 3 0x14200 aiodoned aiodoned 52561 128006 0 0 3 0x14200 syncer update 42154 477956 0 0 3 0x14200 cleaner cleaner 8928 313332 0 0 3 0x14200 reaper reaper 13077 285926 0 0 3 0x14200 pgdaemon pagedaemon 51645 308475 0 0 3 0x14200 bored crynlk 85505 157897 0 0 3 0x14200 bored crypto 55645 264588 0 0 3 0x40014200 acpi0 acpi0 9233 154561 0 0 3 0x14200 bored softnet 72939 128478 0 0 3 0x14200 bored systqmp 40698 310873 0 0 3 0x14200 bored systq 902 281254 0 0 2 0x40014200 softclock 85965 110899 0 0 3 0x40014200 idle0 22156 317334 0 0 3 0x14200 bored smr 1 55346 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 9537 6359K 6999K 78643K 16611 0 0 pcb 13 8K 8K 78643K 157 0 0 rtable 111 4K 4K 78643K 708 0 0 ifaddr 68 15K 16K 78643K 289 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 127 0 0 iov 0 0K 28K 78643K 273 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 3184 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 28 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 240 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 2250 0 0 sigio 0 0K 0K 78643K 30 0 0 proc 42 30K 54K 78643K 666 0 0 subproc 32 2K 2K 78643K 72 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 179 0 0 in_multi 33 2K 2K 78643K 139 0 0 ether_multi 1 0K 0K 78643K 11 0 0 mrt 0 0K 0K 78643K 6 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 448 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 92 21K 29K 78643K 6168 0 0 UVM aobj 80 3K 3K 78643K 95 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 108 0 0 NDP 15 0K 0K 78643K 80 0 0 temp 191 2728K 2797K 78643K 10266 0 0 kqueue 0 0K 0K 78643K 26 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 123 0 121 1 0 1 1 0 8 0 rtentry 112 71 0 27 2 0 2 2 0 8 0 unpcb 120 831 0 821 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 352 0 352 1 1 0 1 0 8 0 tcpcb 544 352 0 348 1 0 1 1 0 8 0 inpcb 280 926 0 919 1 0 1 1 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 ppxss 1128 47 0 47 7 6 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 282 0 91 14 2 12 12 0 8 0 art_table 32 283 0 91 2 0 2 2 0 8 0 art_node 16 66 0 26 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 4 1 1 0 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 234 0 224 1 0 1 1 0 8 0 shmpl 112 93 0 15 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4925 0 3514 46 0 46 46 0 8 0 ffsino 240 4925 0 3514 84 0 84 84 0 8 0 nchpl 144 8281 0 6658 62 0 62 62 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 26151 0 26151 1 0 1 1 0 8 1 scsiplug 64 4 0 4 3 3 0 1 0 8 0 scxspl 192 26257 0 26257 21 19 2 7 0 8 2 plimitpl 152 170 0 163 1 0 1 1 0 8 0 sigapl 432 2417 0 2403 2 0 2 2 0 8 0 futexpl 56 37172 0 37172 1 0 1 1 0 8 1 knotepl 112 532 0 513 1 0 1 1 0 8 0 kqueuepl 104 501 0 499 1 0 1 1 0 8 0 pipepl 112 1392 0 1373 5 4 1 2 0 8 0 fdescpl 424 2418 0 2403 2 0 2 2 0 8 0 filepl 120 14411 0 14314 5 1 4 5 0 8 1 lockfpl 104 838 0 837 2 1 1 1 0 8 0 lockfspl 48 295 0 294 2 1 1 1 0 8 0 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 31 0 21 1 0 1 1 0 8 0 ucredpl 96 2982 0 2975 1 0 1 1 0 8 0 zombiepl 144 2403 0 2403 1 0 1 1 0 8 1 processpl 864 2433 0 2403 4 0 4 4 0 8 0 procpl 632 5306 0 5267 4 0 4 4 0 8 0 sosppl 128 36 0 36 7 6 1 1 0 8 1 sockpl 384 1903 0 1884 3 0 3 3 0 8 1 mcl64k 65536 77 0 77 7 7 0 1 0 8 0 mcl16k 16384 4 0 4 3 3 0 1 0 8 0 mcl12k 12288 45 0 45 5 4 1 1 0 8 1 mcl9k 9216 38 0 38 6 5 1 1 0 8 1 mcl8k 8192 32 0 32 9 8 1 1 0 8 1 mcl4k 4096 120 0 118 2 1 1 1 0 8 0 mcl2k2 2112 18 0 18 8 8 0 1 0 8 0 mcl2k 2048 57608 0 57559 15 8 7 11 0 8 0 mtagpl 80 60 0 36 2 1 1 1 0 8 0 mbufpl 256 101507 0 101383 14 5 9 11 0 8 0 bufpl 256 11721 0 7147 287 0 287 287 0 8 0 anonpl 16 223139 0 211665 98 39 59 63 0 62 9 amapchunkpl 152 10090 0 9984 27 17 10 10 0 158 5 amappl16 192 13866 0 13210 94 53 41 45 0 8 8 amappl15 184 702 0 702 1 1 0 1 0 8 0 amappl14 176 65 0 59 1 0 1 1 0 8 0 amappl13 168 316 0 316 2 2 0 1 0 8 0 amappl12 160 19 0 17 1 0 1 1 0 8 0 amappl11 152 54 0 43 1 0 1 1 0 8 0 amappl10 144 181 0 179 5 4 1 1 0 8 0 amappl9 136 580 0 576 1 0 1 1 0 8 0 amappl8 128 147 0 129 1 0 1 1 0 8 0 amappl7 120 163 0 158 1 0 1 1 0 8 0 amappl6 112 59 0 52 1 0 1 1 0 8 0 amappl5 104 175 0 164 1 0 1 1 0 8 0 amappl4 96 2649 0 2621 1 0 1 1 0 8 0 amappl3 88 257 0 246 1 0 1 1 0 8 0 amappl2 80 19433 0 19355 3 1 2 3 0 8 0 amappl1 72 52220 0 51802 25 15 10 19 0 8 0 amappl 80 5574 0 5537 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 94 0 15 2 0 2 2 0 8 0 uaddrrnd 24 2418 0 2403 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2418 0 2403 1 0 1 1 0 8 0 vmmpekpl 168 18139 0 18118 2 0 2 2 0 8 0 vmmpepl 168 281747 0 279961 150 61 89 96 0 357 11 vmsppl 272 2417 0 2403 2 1 1 2 0 8 0 pdppl 4096 4842 0 4806 6 1 5 6 0 8 0 pvpl 32 593127 0 578575 223 76 147 159 0 265 24 pmappl 200 2417 0 2403 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 451 0 38 12 0 12 12 0 8 0