panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *134480 26963 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(fffffd802be42d18) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149de780,1,ffff8000ffff2290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037410580,c0106477,ffff8000149de780,1,fffffd803f7c6c00,ffff8000ffff2290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f791c40,c0106477,ffff8000149de780,ffff8000ffff2290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2290,ffff8000149de898,ffff8000149de900) at sys_ioctl+0x5b8 syscall(ffff8000149de960) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,cb01ee85010) at Xsyscall+0x128 end of kernel end trace frame: 0xcb2b328fc90, 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(fffffd802be42d18) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff8000149de780,1,ffff8000ffff2290) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd8037410580,c0106477,ffff8000149de780,1,fffffd803f7c6c00,ffff8000ffff2290) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f791c40,c0106477,ffff8000149de780,ffff8000ffff2290) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff2290,ffff8000149de898,ffff8000149de900) at sys_ioctl+0x5b8 syscall(ffff8000149de960) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,cb01ee85010) at Xsyscall+0x128 end of kernel end trace frame: 0xcb2b328fc90, count: -9 ddb> show registers rdi 0xffffffff81972197 db_enter+0x17 rsi 0x7088 __ALIGN_SIZE+0x6088 rbp 0xffff8000149de340 rbx 0xffff8000149de3f0 rdx 0x7089 __ALIGN_SIZE+0x6089 rcx 0xffff8000149e7000 rax 0xffff8000149e7000 r8 0xffff8000149de300 r9 0x1 r10 0xffff800000996d00 r11 0x465d8b97d4d9cbd3 r12 0x3000000008 r13 0xffff8000149de350 r14 0x100 r15 0x1 rip 0xffffffff81972198 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149de330 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=134480 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff29f8,0xffff8000ffff2790 process=0xffff8000ffff6010 user=0xffff8000149d9000, vmspace=0xfffffd803f014880 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 75181 330790 66489 0 2 0 syz-executor.0 75181 473763 66489 0 3 0x4000080 fsleep syz-executor.0 75181 366971 66489 0 3 0x4000080 fsleep syz-executor.0 26963 33547 29958 0 2 0 syz-executor.1 *26963 134480 29958 0 7 0x4000000 syz-executor.1 26963 68685 29958 0 2 0x4000000 syz-executor.1 20637 436731 0 0 3 0x14200 bored sosplice 66489 222607 33399 0 2 0x482 syz-executor.0 29958 52084 33399 0 2 0x482 syz-executor.1 33399 195292 74677 0 3 0x82 thrsleep syz-fuzzer 33399 415508 74677 0 3 0x4000082 thrsleep syz-fuzzer 33399 40773 74677 0 3 0x4000082 thrsleep syz-fuzzer 33399 292653 74677 0 3 0x4000082 thrsleep syz-fuzzer 33399 374275 74677 0 3 0x4000082 thrsleep syz-fuzzer 33399 45437 74677 0 3 0x4000082 kqread syz-fuzzer 33399 503478 74677 0 3 0x4000082 thrsleep syz-fuzzer 33399 175081 74677 0 3 0x4000082 thrsleep syz-fuzzer 74677 80791 89349 0 3 0x10008a pause ksh 89349 169960 28222 0 3 0x92 select sshd 1904 115283 1 0 3 0x100083 ttyin getty 28222 293232 1 0 3 0x80 select sshd 32430 124630 12039 73 2 0x100090 syslogd 12039 151929 1 0 3 0x100082 netio syslogd 16175 327702 1 77 3 0x100090 poll dhclient 84994 65368 1 0 3 0x80 poll dhclient 55039 158062 0 0 2 0x14200 zerothread 21561 265424 0 0 3 0x14200 aiodoned aiodoned 48782 162667 0 0 3 0x14200 syncer update 49920 491140 0 0 3 0x14200 cleaner cleaner 6220 184373 0 0 3 0x14200 reaper reaper 5673 120612 0 0 3 0x14200 pgdaemon pagedaemon 74086 189788 0 0 3 0x14200 bored crynlk 1810 347247 0 0 3 0x14200 bored crypto 72300 444967 0 0 3 0x40014200 acpi0 acpi0 27363 241892 0 0 3 0x14200 bored softnet 69 245784 0 0 3 0x14200 bored systqmp 74338 484131 0 0 3 0x14200 bored systq 9785 39692 0 0 3 0x40014200 bored softclock 11514 74707 0 0 3 0x40014200 idle0 68247 287884 0 0 3 0x14200 bored smr 1 26810 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 9507 6471K 6842K 78643K 12939 0 0 pcb 13 8K 8K 78643K 89 0 0 rtable 111 4K 4K 78643K 349 0 0 ifaddr 55 12K 13K 78643K 126 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 70 0 0 iov 0 0K 16K 78643K 108 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 77K 78643K 2053 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 13 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 1278 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1938 0 0 sigio 0 0K 0K 78643K 12 0 0 proc 41 30K 54K 78643K 414 0 0 subproc 32 2K 2K 78643K 34 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 90 0 0 in_multi 33 2K 2K 78643K 70 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 256 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 98 21K 26K 78643K 5056 0 0 UVM aobj 27 3K 3K 78643K 34 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 48 0 0 NDP 11 0K 0K 78643K 34 0 0 temp 164 2727K 2794K 78643K 7817 0 0 kqueue 0 0K 0K 78643K 2 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 6 0 0 1 0 1 1 0 8 0 rtpcb 80 53 0 51 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 301 0 291 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1715 0 1715 1 1 0 1 0 8 0 tcpcb 544 164 0 160 1 0 1 1 0 8 0 inpcb 280 402 0 395 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 17 0 17 4 3 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 9 1 0 1 1 0 8 0 semupl 112 14 0 14 1 1 0 1 0 8 0 semapl 112 1276 0 1266 1 0 1 1 0 8 0 shmpl 112 32 0 7 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3902 0 2500 46 0 46 46 0 8 0 ffsino 240 3902 0 2500 84 0 84 84 0 8 0 nchpl 144 6381 0 4738 61 0 61 61 0 8 0 uvmvnodes 72 4487 0 0 82 0 82 82 0 8 0 vnodes 200 4487 0 0 237 0 237 237 0 8 0 namei 1024 17998 0 17998 1 0 1 1 0 8 1 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 18353 0 18353 11 10 1 7 0 8 1 plimitpl 152 83 0 76 1 0 1 1 0 8 0 sigapl 432 2109 0 2095 2 0 2 2 0 8 0 futexpl 56 50024 0 50022 1 0 1 1 0 8 0 knotepl 112 194 0 175 1 0 1 1 0 8 0 kqueuepl 104 246 0 244 1 0 1 1 0 8 0 pipepl 112 634 0 615 2 1 1 2 0 8 0 fdescpl 424 2110 0 2095 2 0 2 2 0 8 0 filepl 120 8637 0 8538 4 0 4 4 0 8 1 lockfpl 104 318 0 318 2 1 1 1 0 8 1 lockfspl 48 120 0 120 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 1297 0 1290 1 0 1 1 0 8 0 zombiepl 144 2095 0 2095 1 0 1 1 0 8 1 processpl 864 2125 0 2095 4 0 4 4 0 8 0 procpl 632 4310 0 4269 4 0 4 4 0 8 0 sosppl 128 11 0 11 4 3 1 1 0 8 1 sockpl 384 768 0 749 3 0 3 3 0 8 1 mcl64k 65536 551 0 551 66 65 1 65 0 8 1 mcl16k 16384 5 0 5 3 3 0 1 0 8 0 mcl12k 12288 23 0 23 3 2 1 1 0 8 1 mcl9k 9216 76 0 76 3 2 1 1 0 8 1 mcl8k 8192 1006 0 1006 1 0 1 1 0 8 1 mcl4k 4096 42 0 42 3 2 1 1 0 8 1 mcl2k2 2112 4 0 4 3 3 0 1 0 8 0 mcl2k 2048 59845 0 59806 15 9 6 13 0 8 0 mtagpl 80 36 0 13 2 1 1 1 0 8 0 mbufpl 256 111091 0 110960 40 30 10 37 0 8 0 bufpl 256 9391 0 4574 302 0 302 302 0 8 0 anonpl 16 172725 0 161001 82 30 52 64 0 62 4 amapchunkpl 152 8082 0 7948 15 7 8 10 0 158 2 amappl16 192 9952 0 9326 56 23 33 44 0 8 1 amappl14 176 53 0 46 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 821 0 818 1 0 1 1 0 8 0 amappl11 152 1147 0 1133 1 0 1 1 0 8 0 amappl10 144 58 0 58 1 1 0 1 0 8 0 amappl9 136 556 0 552 1 0 1 1 0 8 0 amappl8 128 127 0 111 1 0 1 1 0 8 0 amappl7 120 31 0 28 1 0 1 1 0 8 0 amappl6 112 1140 0 1133 1 0 1 1 0 8 0 amappl5 104 970 0 956 1 0 1 1 0 8 0 amappl4 96 1517 0 1493 1 0 1 1 0 8 0 amappl3 88 1077 0 1065 1 0 1 1 0 8 0 amappl2 80 17096 0 17020 3 1 2 3 0 8 0 amappl1 72 42183 0 41746 25 16 9 19 0 8 0 amappl 80 4573 0 4529 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 33 0 7 1 0 1 1 0 8 0 uaddrrnd 24 2110 0 2095 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2110 0 2095 1 0 1 1 0 8 0 vmmpekpl 168 15862 0 15839 2 0 2 2 0 8 0 vmmpepl 168 245186 0 243390 113 34 79 90 0 357 0 vmsppl 272 2109 0 2095 2 1 1 2 0 8 0 pdppl 4096 4226 0 4190 6 1 5 6 0 8 0 pvpl 32 461464 0 446671 184 40 144 157 0 265 24 pmappl 200 2109 0 2095 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 542 0 113 15 1 14 15 0 8 0