panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *458972 46485 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(fffffd80362160a8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff80001494d220,1,ffff8000ffff2018) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037405968,c0106477,ffff80001494d220,1,fffffd803f7c6ba0,ffff8000ffff2018) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f96a2e0,c0106477,ffff80001494d220,ffff8000ffff2018) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2018,ffff80001494d338,ffff80001494d3a0) at sys_ioctl+0x5b8 syscall(ffff80001494d400) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,97a8b553010) at Xsyscall+0x128 end of kernel end trace frame: 0x97cf7af6c70, 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(fffffd80362160a8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff80001494d220,1,ffff8000ffff2018) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037405968,c0106477,ffff80001494d220,1,fffffd803f7c6ba0,ffff8000ffff2018) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f96a2e0,c0106477,ffff80001494d220,ffff8000ffff2018) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2018,ffff80001494d338,ffff80001494d3a0) at sys_ioctl+0x5b8 syscall(ffff80001494d400) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,97a8b553010) at Xsyscall+0x128 end of kernel end trace frame: 0x97cf7af6c70, count: -9 ddb> show registers rdi 0xffffffff8198adc7 db_enter+0x17 rsi 0x71fc __ALIGN_SIZE+0x61fc rbp 0xffff80001494cde0 rbx 0xffff80001494ce90 rdx 0x71fd __ALIGN_SIZE+0x61fd rcx 0xffff8000149bd000 rax 0xffff8000149bd000 r8 0xffff80001494cda0 r9 0x1 r10 0xffff800000992e40 r11 0x7e9500516ae20104 r12 0x3000000008 r13 0xffff80001494cdf0 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001494cdd0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=458972 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2508,0xffff8000ffff38d8 process=0xffff8000ffff7b10 user=0xffff800014948000, vmspace=0xfffffd803f00ccc0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 46485 398197 33228 0 2 0 syz-executor.1 *46485 458972 33228 0 7 0x4000000 syz-executor.1 46485 316000 33228 0 2 0x4000000 syz-executor.1 77049 221038 1 0 3 0x100083 ttyin getty 86007 124642 0 0 3 0x14200 bored sosplice 34323 196479 17084 0 2 0x2 syz-executor.0 33228 209733 17084 0 2 0x482 syz-executor.1 17084 505463 84989 0 3 0x82 thrsleep syz-fuzzer 17084 210901 84989 0 2 0x4000482 syz-fuzzer 17084 381270 84989 0 3 0x4000082 kqread syz-fuzzer 17084 239393 84989 0 3 0x4000082 thrsleep syz-fuzzer 17084 312456 84989 0 3 0x4000082 thrsleep syz-fuzzer 17084 440387 84989 0 3 0x4000082 thrsleep syz-fuzzer 17084 173613 84989 0 3 0x4000082 thrsleep syz-fuzzer 84989 241786 21396 0 3 0x10008a pause ksh 21396 179731 99333 0 3 0x92 select sshd 99333 179501 1 0 3 0x80 select sshd 14102 325213 11150 73 2 0x100090 syslogd 11150 505376 1 0 3 0x100082 netio syslogd 63409 129043 1 77 3 0x100090 poll dhclient 66752 467641 1 0 3 0x80 poll dhclient 95042 415662 0 0 2 0x14200 zerothread 95769 504825 0 0 3 0x14200 aiodoned aiodoned 36742 197664 0 0 3 0x14200 syncer update 86966 395337 0 0 3 0x14200 cleaner cleaner 58547 7067 0 0 3 0x14200 reaper reaper 19520 158405 0 0 3 0x14200 pgdaemon pagedaemon 77011 113847 0 0 3 0x14200 bored crynlk 87084 49135 0 0 3 0x14200 bored crypto 82811 407699 0 0 3 0x40014200 acpi0 acpi0 48958 154291 0 0 3 0x14200 bored softnet 77756 313820 0 0 3 0x14200 bored systqmp 17168 508741 0 0 3 0x14200 bored systq 81060 491518 0 0 2 0x40014200 softclock 20922 254921 0 0 3 0x40014200 idle0 84302 489473 0 0 3 0x14200 bored smr 1 128715 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 9571 7259K 14538K 78643K 23337 0 0 pcb 13 8K 8K 78643K 315 0 0 rtable 120 12K 12K 78643K 845 0 0 ifaddr 73 16K 17K 78643K 391 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 224 0 0 iov 0 0K 24K 78643K 580 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 77K 78643K 5507 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 59 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 470 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 4382 0 0 sigio 0 0K 0K 78643K 88 0 0 proc 42 30K 54K 78643K 789 0 0 subproc 32 2K 2K 78643K 36 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 445 0 0 in_multi 33 2K 2K 78643K 233 0 0 ether_multi 1 0K 0K 78643K 33 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 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 621 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 90 20K 30K 78643K 11114 0 0 UVM aobj 130 4K 4K 78643K 157 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 179 0 0 NDP 17 0K 0K 78643K 105 0 0 temp 206 2728K 3368K 78643K 16783 0 0 kqueue 0 0K 0K 78643K 31 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 8 0 1 1 0 1 1 0 8 0 rtpcb 80 197 0 195 1 0 1 1 0 8 0 rtentry 112 51 0 5 2 0 2 2 0 8 0 unpcb 120 1405 0 1395 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1290 0 1290 1 1 0 1 0 8 0 tcpcb 544 716 0 712 1 0 1 1 0 8 0 inpcb 280 1874 0 1867 4 3 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 38 0 38 12 12 0 1 0 8 0 ppxss 1128 68 0 68 16 15 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 190 0 0 12 0 12 12 0 8 0 art_table 32 191 0 0 2 0 2 2 0 8 0 art_node 16 47 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 13 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 466 0 456 1 0 1 1 0 8 0 shmpl 112 155 0 27 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8502 0 7091 46 0 46 46 0 8 0 ffsino 240 8502 0 7091 84 0 84 84 0 8 0 nchpl 144 14843 0 13211 62 0 62 62 0 8 0 uvmvnodes 72 6867 0 0 125 0 125 125 0 8 0 vnodes 200 6867 0 0 362 0 362 362 0 8 0 namei 1024 47671 0 47671 1 0 1 1 0 8 1 scsiplug 64 5 0 5 4 4 0 1 0 8 0 scxspl 192 47490 0 47490 25 23 2 6 0 8 2 plimitpl 152 411 0 404 1 0 1 1 0 8 0 sigapl 432 4557 0 4544 2 0 2 2 0 8 0 futexpl 56 74472 0 74472 2 1 1 1 0 8 1 knotepl 112 826 0 807 1 0 1 1 0 8 0 kqueuepl 104 1058 0 1056 1 0 1 1 0 8 0 pipepl 112 2446 0 2427 6 5 1 2 0 8 0 fdescpl 424 4558 0 4544 2 0 2 2 0 8 0 filepl 120 27598 0 27502 6 2 4 5 0 8 1 lockfpl 104 1531 0 1531 4 3 1 1 0 8 1 lockfspl 48 528 0 528 4 3 1 1 0 8 1 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 59 0 49 1 0 1 1 0 8 0 ucredpl 96 5792 0 5785 1 0 1 1 0 8 0 zombiepl 144 4544 0 4544 3 2 1 1 0 8 1 processpl 864 4573 0 4544 4 0 4 4 0 8 0 procpl 632 10206 0 10169 4 0 4 4 0 8 0 sosppl 128 51 0 51 15 15 0 1 0 8 0 sockpl 384 3550 0 3531 6 3 3 4 0 8 1 mcl64k 65536 1470 0 1470 162 161 1 65 0 8 1 mcl16k 16384 20 0 20 13 12 1 1 0 8 1 mcl12k 12288 82 0 82 14 13 1 1 0 8 1 mcl9k 9216 59 0 59 17 16 1 1 0 8 1 mcl8k 8192 71 0 71 12 11 1 1 0 8 1 mcl4k 4096 228 0 226 2 1 1 1 0 8 0 mcl2k2 2112 29 0 29 9 9 0 1 0 8 0 mcl2k 2048 61559 0 61508 19 12 7 14 0 8 0 mtagpl 80 137 0 41 3 1 2 2 0 8 0 mbufpl 256 119436 0 119155 104 85 19 45 0 8 0 bufpl 256 19259 0 12392 430 0 430 430 0 8 0 anonpl 16 449084 0 437416 177 113 64 65 0 62 13 amapchunkpl 152 20476 0 20369 54 48 6 15 0 158 0 amappl16 192 25392 0 24747 169 128 41 45 0 8 8 amappl15 184 1 0 1 1 1 0 1 0 8 0 amappl14 176 62 0 56 1 0 1 1 0 8 0 amappl13 168 2141 0 2139 1 0 1 1 0 8 0 amappl12 160 10 0 10 1 1 0 1 0 8 0 amappl11 152 54 0 43 1 0 1 1 0 8 0 amappl10 144 67 0 66 2 1 1 1 0 8 0 amappl9 136 2780 0 2774 1 0 1 1 0 8 0 amappl8 128 2344 0 2329 1 0 1 1 0 8 0 amappl7 120 31 0 27 1 0 1 1 0 8 0 amappl6 112 51 0 45 1 0 1 1 0 8 0 amappl5 104 174 0 164 1 0 1 1 0 8 0 amappl4 96 6966 0 6939 1 0 1 1 0 8 0 amappl3 88 324 0 313 1 0 1 1 0 8 0 amappl2 80 35692 0 35625 4 2 2 3 0 8 0 amappl1 72 85933 0 85526 26 17 9 19 0 8 0 amappl 80 10500 0 10463 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 156 0 27 3 0 3 3 0 8 0 uaddrrnd 24 4558 0 4544 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4558 0 4544 1 0 1 1 0 8 0 vmmpekpl 168 31315 0 31289 2 0 2 2 0 8 0 vmmpepl 168 529723 0 528048 190 101 89 94 0 357 13 vmsppl 272 4557 0 4544 2 1 1 2 0 8 0 pdppl 4096 9123 0 9088 6 1 5 6 0 8 0 pvpl 32 1234165 0 1219460 408 202 206 233 0 265 81 pmappl 200 4557 0 4544 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 854 0 286 18 0 18 18 0 8 0