panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *163984 21888 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(fffffd8004c0b648) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a16f10,1,ffff8000ffff33d8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374143f0,c0106477,ffff800015a16f10,1,fffffd803f7c6960,ffff8000ffff33d8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802d7d2450,c0106477,ffff800015a16f10,ffff8000ffff33d8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff33d8,ffff800015a17028,ffff800015a17090) at sys_ioctl+0x5b8 syscall(ffff800015a170f0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,4a4fb482010) at Xsyscall+0x128 end of kernel end trace frame: 0x4a775b26c90, 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(fffffd8004c0b648) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a16f10,1,ffff8000ffff33d8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd80374143f0,c0106477,ffff800015a16f10,1,fffffd803f7c6960,ffff8000ffff33d8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802d7d2450,c0106477,ffff800015a16f10,ffff8000ffff33d8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff33d8,ffff800015a17028,ffff800015a17090) at sys_ioctl+0x5b8 syscall(ffff800015a170f0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,4a4fb482010) at Xsyscall+0x128 end of kernel end trace frame: 0x4a775b26c90, count: -9 ddb> show registers rdi 0xffffffff8198adc7 db_enter+0x17 rsi 0x795d __ALIGN_SIZE+0x695d rbp 0xffff800015a16ad0 rbx 0xffff800015a16b80 rdx 0x795e __ALIGN_SIZE+0x695e rcx 0xffff800016bbf000 rax 0xffff800016bbf000 r8 0xffff800015a16a90 r9 0x1 r10 0xffff80000003c7c0 r11 0x7ddd52933b1e1e0a r12 0x3000000008 r13 0xffff800015a16ae0 r14 0x100 r15 0x1 rip 0xffffffff8198adc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015a16ac0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=163984 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3160,0xffff8000ffff2c80 process=0xffff8000ffff6a30 user=0xffff800015a12000, vmspace=0xfffffd803f00c330 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 21888 71381 92017 0 2 0 syz-executor.1 *21888 163984 92017 0 7 0x4000000 syz-executor.1 21888 154694 92017 0 2 0x4000000 syz-executor.1 85173 229465 43648 0 2 0 syz-executor.0 85173 242853 43648 0 3 0x4000080 lockf syz-executor.0 85173 288534 43648 0 3 0x4000080 fsleep syz-executor.0 85173 456544 43648 0 3 0x4000080 fsleep syz-executor.0 51157 217848 1 0 3 0x100083 ttyin getty 40033 94578 0 0 3 0x14200 bored sosplice 92017 47866 49906 0 2 0x482 syz-executor.1 43648 356228 49906 0 2 0x482 syz-executor.0 49906 253056 26966 0 3 0x82 thrsleep syz-fuzzer 49906 28317 26966 0 3 0x4000082 thrsleep syz-fuzzer 49906 171152 26966 0 3 0x4000082 kqread syz-fuzzer 49906 504653 26966 0 3 0x4000082 thrsleep syz-fuzzer 49906 420495 26966 0 3 0x4000082 thrsleep syz-fuzzer 49906 73210 26966 0 3 0x4000082 thrsleep syz-fuzzer 49906 184069 26966 0 3 0x4000082 thrsleep syz-fuzzer 26966 235268 22623 0 3 0x10008a pause ksh 22623 298491 35413 0 3 0x92 select sshd 35413 486277 1 0 3 0x80 select sshd 86268 328101 5526 73 2 0x100090 syslogd 5526 167671 1 0 3 0x100082 netio syslogd 94847 84865 1 77 3 0x100090 poll dhclient 77100 58822 1 0 3 0x80 poll dhclient 34668 46393 0 0 2 0x14200 zerothread 61930 89399 0 0 3 0x14200 aiodoned aiodoned 13822 240141 0 0 3 0x14200 syncer update 89405 316528 0 0 3 0x14200 cleaner cleaner 10835 309938 0 0 3 0x14200 reaper reaper 62193 252293 0 0 3 0x14200 pgdaemon pagedaemon 43230 392443 0 0 3 0x14200 bored crynlk 91226 37123 0 0 3 0x14200 bored crypto 84439 336360 0 0 3 0x40014200 acpi0 acpi0 19269 240691 0 0 3 0x14200 bored softnet 23792 138521 0 0 3 0x14200 bored systqmp 90468 187591 0 0 3 0x14200 bored systq 47105 251257 0 0 3 0x40014200 bored softclock 42236 221917 0 0 3 0x40014200 idle0 97996 228537 0 0 3 0x14200 bored smr 1 407604 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 9503 6348K 6862K 78643K 14821 0 0 pcb 13 8K 8K 78643K 125 0 0 rtable 117 12K 12K 78643K 543 0 0 ifaddr 55 13K 14K 78643K 206 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 93 0 0 iov 0 0K 32K 78643K 232 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 77K 78643K 2673 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 26 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 176 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1636 0 0 sigio 0 0K 0K 78643K 40 0 0 proc 42 30K 54K 78643K 577 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 152 0 0 in_multi 33 2K 2K 78643K 100 0 0 ether_multi 1 0K 0K 78643K 6 0 0 mrt 0 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 341 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 4689 0 0 UVM aobj 77 4K 4K 78643K 98 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 100 0 0 NDP 11 0K 0K 78643K 56 0 0 temp 163 2727K 2795K 78643K 8148 0 0 kqueue 0 0K 0K 78643K 11 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 93 0 91 1 0 1 1 0 8 0 rtentry 112 59 0 14 2 0 2 2 0 8 0 unpcb 120 597 0 587 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 2 0 2 1 1 0 1 0 8 0 tcpqe 32 395 0 395 1 1 0 1 0 8 0 tcpcb 544 262 0 258 1 0 1 1 0 8 0 inpcb 280 707 0 698 1 0 1 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 1 1 1 0 8 1 ppxss 1128 32 0 32 6 5 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 236 0 44 13 1 12 12 0 8 0 art_table 32 237 0 44 2 0 2 2 0 8 0 art_node 16 56 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 8 1 0 1 1 0 8 0 semapl 112 174 0 164 1 0 1 1 0 8 0 shmpl 112 96 0 21 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3999 0 2593 47 0 47 47 0 8 0 ffsino 240 3999 0 2593 84 0 84 84 0 8 0 nchpl 144 6515 0 4893 62 0 62 62 0 8 0 uvmvnodes 72 5043 0 0 92 0 92 92 0 8 0 vnodes 200 5043 0 0 266 0 266 266 0 8 0 namei 1024 19747 0 19747 3 2 1 1 0 8 1 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 20549 0 20549 17 16 1 6 0 8 1 plimitpl 152 129 0 122 1 0 1 1 0 8 0 sigapl 432 1807 0 1793 2 0 2 2 0 8 0 futexpl 56 26512 0 26510 2 1 1 1 0 8 0 knotepl 112 293 0 274 1 0 1 1 0 8 0 kqueuepl 104 327 0 325 1 0 1 1 0 8 0 pipepl 112 972 0 953 3 2 1 2 0 8 0 fdescpl 424 1808 0 1793 2 0 2 2 0 8 0 filepl 120 10466 0 10368 4 0 4 4 0 8 0 lockfpl 104 579 0 577 3 2 1 1 0 8 0 lockfspl 48 200 0 199 3 2 1 1 0 8 0 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 41 0 31 1 0 1 1 0 8 0 ucredpl 96 1974 0 1967 1 0 1 1 0 8 0 zombiepl 144 1793 0 1793 2 1 1 1 0 8 1 processpl 864 1823 0 1793 4 0 4 4 0 8 0 procpl 632 3859 0 3818 4 0 4 4 0 8 0 sosppl 128 18 0 18 5 5 0 1 0 8 0 sockpl 384 1413 0 1394 4 1 3 3 0 8 1 mcl64k 65536 552 0 552 62 61 1 32 0 8 1 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 20 0 20 6 5 1 1 0 8 1 mcl9k 9216 26 0 26 5 4 1 1 0 8 1 mcl8k 8192 25 0 25 8 7 1 1 0 8 1 mcl4k 4096 74 0 74 4 3 1 1 0 8 1 mcl2k2 2112 14 0 14 6 6 0 1 0 8 0 mcl2k 2048 57113 0 57070 14 7 7 11 0 8 1 mtagpl 80 37 0 16 2 1 1 1 0 8 0 mbufpl 256 98354 0 98255 41 33 8 22 0 8 0 bufpl 256 9944 0 5385 286 0 286 286 0 8 0 anonpl 16 179804 0 168031 97 41 56 64 0 62 6 amapchunkpl 152 7994 0 7881 27 17 10 12 0 158 5 amappl16 192 9808 0 9156 89 55 34 45 0 8 1 amappl15 184 3 0 2 1 0 1 1 0 8 0 amappl14 176 639 0 633 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 9 0 7 1 0 1 1 0 8 0 amappl11 152 1076 0 1062 1 0 1 1 0 8 0 amappl10 144 66 0 66 6 6 0 1 0 8 0 amappl9 136 539 0 536 1 0 1 1 0 8 0 amappl8 128 146 0 130 1 0 1 1 0 8 0 amappl7 120 38 0 33 1 0 1 1 0 8 0 amappl6 112 1055 0 1048 1 0 1 1 0 8 0 amappl5 104 217 0 206 1 0 1 1 0 8 0 amappl4 96 2048 0 2020 1 0 1 1 0 8 0 amappl3 88 860 0 849 1 0 1 1 0 8 0 amappl2 80 13700 0 13621 4 2 2 3 0 8 0 amappl1 72 40249 0 39820 26 17 9 19 0 8 0 amappl 80 4146 0 4106 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 97 0 21 2 0 2 2 0 8 0 uaddrrnd 24 1808 0 1793 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1808 0 1793 1 0 1 1 0 8 0 vmmpekpl 168 15599 0 15577 2 0 2 2 0 8 0 vmmpepl 168 215728 0 213921 135 55 80 97 0 357 1 vmsppl 272 1807 0 1793 2 1 1 2 0 8 0 pdppl 4096 3623 0 3586 6 1 5 6 0 8 0 pvpl 32 476732 0 461854 192 51 141 158 0 265 18 pmappl 200 1807 0 1793 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 533 0 121 13 0 13 13 0 8 0