panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 50018 19670 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(fffffd802c2da6a8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800016a040d0,1,ffff8000ffff2780) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037415580,c0106477,ffff800016a040d0,1,fffffd803f7c6a80,ffff8000ffff2780) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803615ead0,c0106477,ffff800016a040d0,ffff8000ffff2780) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2780,ffff800016a041e8,ffff800016a04250) at sys_ioctl+0x5b8 syscall(ffff800016a042b0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,733a9147010) at Xsyscall+0x128 end of kernel end trace frame: 0x7365e23d220, 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(fffffd802c2da6a8) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800016a040d0,1,ffff8000ffff2780) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037415580,c0106477,ffff800016a040d0,1,fffffd803f7c6a80,ffff8000ffff2780) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803615ead0,c0106477,ffff800016a040d0,ffff8000ffff2780) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2780,ffff800016a041e8,ffff800016a04250) at sys_ioctl+0x5b8 syscall(ffff800016a042b0) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,733a9147010) at Xsyscall+0x128 end of kernel end trace frame: 0x7365e23d220, count: -9 ddb> show registers rdi 0xffffffff81bc2977 db_enter+0x17 rsi 0x795e __ALIGN_SIZE+0x695e rbp 0xffff800016a03c90 rbx 0xffff800016a03d40 rdx 0x795f __ALIGN_SIZE+0x695f rcx 0xffff800016be3000 rax 0xffff800016be3000 r8 0xffff800016a03c50 r9 0x1 r10 0xffff800000997c40 r11 0xfab73e11f1dbfa9f r12 0x3000000008 r13 0xffff800016a03ca0 r14 0x100 r15 0x1 rip 0xffffffff81bc2978 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800016a03c80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=50018 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff38c8,0xffff8000ffff33e8 process=0xffff8000ffff77b0 user=0xffff8000169ff000, vmspace=0xfffffd803f00c990 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 19670 502437 72565 0 2 0 syz-executor.0 *19670 50018 72565 0 7 0x4000000 syz-executor.0 19670 461050 72565 0 2 0x4000000 syz-executor.0 57369 198876 1 0 3 0x100083 ttyin getty 46901 503564 89330 0 2 0x2 syz-executor.1 19347 351519 0 0 3 0x14200 bored sosplice 72565 240157 89330 0 2 0x482 syz-executor.0 89330 508058 42118 0 3 0x82 kqread syz-fuzzer 89330 522457 42118 0 2 0x4000482 syz-fuzzer 89330 337647 42118 0 3 0x4000082 thrsleep syz-fuzzer 89330 385993 42118 0 3 0x4000082 thrsleep syz-fuzzer 89330 22275 42118 0 3 0x4000082 thrsleep syz-fuzzer 89330 378800 42118 0 3 0x4000082 thrsleep syz-fuzzer 89330 385212 42118 0 3 0x4000082 thrsleep syz-fuzzer 42118 359531 91406 0 3 0x10008a pause ksh 91406 462058 5747 0 3 0x92 select sshd 5747 305677 1 0 3 0x80 select sshd 87408 5333 64034 73 2 0x100090 syslogd 64034 439691 1 0 3 0x100082 netio syslogd 71311 258510 1 77 3 0x100090 poll dhclient 37979 362409 1 0 3 0x80 poll dhclient 17694 317726 0 0 2 0x14200 zerothread 9024 440429 0 0 3 0x14200 aiodoned aiodoned 60291 479086 0 0 3 0x14200 syncer update 46112 63588 0 0 3 0x14200 cleaner cleaner 14219 110771 0 0 3 0x14200 reaper reaper 15154 137202 0 0 3 0x14200 pgdaemon pagedaemon 19497 67872 0 0 3 0x14200 bored crynlk 397 366641 0 0 3 0x14200 bored crypto 9831 375777 0 0 3 0x40014200 acpi0 acpi0 50152 176248 0 0 3 0x14200 bored softnet 40833 295437 0 0 3 0x14200 bored systqmp 99385 469537 0 0 3 0x14200 bored systq 79057 44566 0 0 3 0x40014200 bored softclock 78175 249674 0 0 3 0x40014200 idle0 93079 116927 0 0 3 0x14200 bored smr 1 392413 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 9568 6389K 7187K 78643K 21405 0 0 pcb 13 8K 8K 78643K 290 0 0 rtable 111 4K 4K 78643K 1082 0 0 ifaddr 77 16K 17K 78643K 416 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 235 0 0 iov 0 0K 24K 78643K 520 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1214 76K 77K 78643K 5062 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 48 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 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 4042 0 0 sigio 2 0K 0K 78643K 60 0 0 proc 42 30K 54K 78643K 1005 0 0 subproc 32 2K 2K 78643K 140 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 324 0 0 in_multi 33 2K 2K 78643K 226 0 0 ether_multi 1 0K 0K 78643K 20 0 0 mrt 0 0K 0K 78643K 21 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 661 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 93 21K 30K 78643K 10430 0 0 UVM aobj 130 4K 4K 78643K 144 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 181 0 0 NDP 18 0K 0K 78643K 121 0 0 temp 213 2728K 2806K 78643K 16151 0 0 kqueue 0 0K 0K 78643K 36 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 19 0 13 1 0 1 1 0 8 0 rtpcb 80 221 0 219 1 0 1 1 0 8 0 rtentry 112 114 0 70 2 0 2 2 0 8 0 unpcb 120 1199 0 1189 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1047 0 1047 1 1 0 1 0 8 0 tcpcb 544 570 0 566 1 0 1 1 0 8 0 inpcb 280 1667 0 1660 5 4 1 2 0 8 0 nd6 48 24 0 18 1 0 1 1 0 8 0 pkpcb 40 14 0 14 6 6 0 1 0 8 0 ppxss 1128 64 0 64 14 13 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 471 0 280 12 0 12 12 0 8 0 art_table 32 472 0 280 2 0 2 2 0 8 0 art_node 16 111 0 71 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 6 3 2 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 468 0 458 1 0 1 1 0 8 0 shmpl 112 142 0 14 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7791 0 6388 46 0 46 46 0 8 0 ffsino 240 7791 0 6388 84 0 84 84 0 8 0 nchpl 144 13585 0 11953 62 0 62 62 0 8 0 uvmvnodes 72 7113 0 0 130 0 130 130 0 8 0 vnodes 200 7113 0 0 375 0 375 375 0 8 0 namei 1024 43422 0 43422 2 1 1 1 0 8 1 scsiplug 64 6 0 6 4 3 1 1 0 8 1 scxspl 192 44029 0 44029 23 21 2 6 0 8 2 plimitpl 152 409 0 402 1 0 1 1 0 8 0 sigapl 432 4197 0 4184 2 0 2 2 0 8 0 futexpl 56 67181 0 67181 2 1 1 1 0 8 1 knotepl 112 940 0 921 1 0 1 1 0 8 0 kqueuepl 104 1044 0 1042 1 0 1 1 0 8 0 pipepl 112 2510 0 2491 4 3 1 2 0 8 0 fdescpl 424 4198 0 4184 2 0 2 2 0 8 0 filepl 120 25484 0 25385 6 2 4 5 0 8 1 lockfpl 104 1567 0 1567 3 2 1 1 0 8 1 lockfspl 48 546 0 546 3 2 1 1 0 8 1 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 75 0 65 1 0 1 1 0 8 0 ucredpl 96 5170 0 5163 1 0 1 1 0 8 0 zombiepl 144 4184 0 4184 2 1 1 1 0 8 1 processpl 864 4213 0 4184 4 0 4 4 0 8 0 procpl 632 9323 0 9286 4 0 4 4 0 8 0 sosppl 128 40 0 40 14 14 0 1 0 8 0 sockpl 384 3128 0 3109 5 2 3 4 0 8 0 mcl64k 65536 670 0 670 45 44 1 33 0 8 1 mcl16k 16384 12 0 12 9 9 0 1 0 8 0 mcl12k 12288 71 0 71 14 13 1 1 0 8 1 mcl9k 9216 57 0 57 13 12 1 1 0 8 1 mcl8k 8192 54 0 54 16 15 1 1 0 8 1 mcl4k 4096 224 0 224 5 4 1 1 0 8 1 mcl2k2 2112 20 0 20 11 10 1 1 0 8 1 mcl2k 2048 61203 0 61161 16 10 6 12 0 8 0 mtagpl 80 106 0 68 2 1 1 1 0 8 0 mbufpl 256 117200 0 117042 30 18 12 25 0 8 0 bufpl 256 18813 0 11699 445 0 445 445 0 8 0 anonpl 16 382221 0 370215 164 107 57 65 0 62 8 amapchunkpl 152 17797 0 17688 44 39 5 15 0 158 0 amappl16 192 22557 0 21902 146 112 34 45 0 8 1 amappl15 184 13 0 13 2 2 0 1 0 8 0 amappl14 176 89 0 84 1 0 1 1 0 8 0 amappl13 168 15 0 14 2 1 1 1 0 8 0 amappl12 160 915 0 911 1 0 1 1 0 8 0 amappl11 152 80 0 68 1 0 1 1 0 8 0 amappl10 144 1110 0 1108 2 1 1 1 0 8 0 amappl9 136 2610 0 2605 1 0 1 1 0 8 0 amappl8 128 2161 0 2137 1 0 1 1 0 8 0 amappl7 120 1095 0 1089 1 0 1 1 0 8 0 amappl6 112 63 0 55 1 0 1 1 0 8 0 amappl5 104 1114 0 1104 1 0 1 1 0 8 0 amappl4 96 3546 0 3517 1 0 1 1 0 8 0 amappl3 88 1217 0 1206 1 0 1 1 0 8 0 amappl2 80 32654 0 32589 3 1 2 3 0 8 0 amappl1 72 81862 0 81444 26 17 9 19 0 8 0 amappl 80 9674 0 9637 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 143 0 14 3 0 3 3 0 8 0 uaddrrnd 24 4198 0 4184 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4198 0 4184 1 0 1 1 0 8 0 vmmpekpl 168 28464 0 28439 2 0 2 2 0 8 0 vmmpepl 168 497019 0 495301 194 113 81 96 0 357 1 vmsppl 272 4197 0 4184 2 1 1 2 0 8 0 pdppl 4096 8403 0 8368 6 1 5 6 0 8 0 pvpl 32 1134213 0 1119168 405 229 176 256 0 265 53 pmappl 200 4197 0 4184 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 679 0 105 19 2 17 17 0 8 0