panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *270546 44113 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(fffffd803e0eece0) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff80001499caa0,1,ffff8000ffff3160) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd803741c648,c0106477,ffff80001499caa0,1,fffffd803f7c65a0,ffff8000ffff3160) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803dca1628,c0106477,ffff80001499caa0,ffff8000ffff3160) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff3160,ffff80001499cbb8,ffff80001499cc20) at sys_ioctl+0x5b8 syscall(ffff80001499cc80) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,52b689a6010) at Xsyscall+0x128 end of kernel end trace frame: 0x52e52eb5ae0, 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(fffffd803e0eece0) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff80001499caa0,1,ffff8000ffff3160) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd803741c648,c0106477,ffff80001499caa0,1,fffffd803f7c65a0,ffff8000ffff3160) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803dca1628,c0106477,ffff80001499caa0,ffff8000ffff3160) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff3160,ffff80001499cbb8,ffff80001499cc20) at sys_ioctl+0x5b8 syscall(ffff80001499cc80) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,52b689a6010) at Xsyscall+0x128 end of kernel end trace frame: 0x52e52eb5ae0, count: -9 ddb> show registers rdi 0xffffffff81ac3167 db_enter+0x17 rsi 0x78cc __ALIGN_SIZE+0x68cc rbp 0xffff80001499c660 rbx 0xffff80001499c710 rdx 0x78cd __ALIGN_SIZE+0x68cd rcx 0xffff800017a02000 rax 0xffff800017a02000 r8 0xffff80001499c620 r9 0x1 r10 0xffff80000003c780 r11 0x820c7694d7d60df5 r12 0x3000000008 r13 0xffff80001499c670 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001499c650 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=270546 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2508,0xffff8000ffff2a08 process=0xffff8000ffff66d0 user=0xffff800014997000, vmspace=0xfffffd803f013990 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 44113 196313 46603 0 2 0 syz-executor.1 *44113 270546 46603 0 7 0x4000000 syz-executor.1 44113 268227 46603 0 2 0x4000000 syz-executor.1 44686 328189 79767 0 2 0x2 syz-executor.0 46603 289346 79767 0 2 0x482 syz-executor.1 69174 117875 1 0 3 0x100083 ttyin getty 9865 427460 0 0 3 0x14200 bored sosplice 79767 349338 84738 0 3 0x82 thrsleep syz-fuzzer 79767 74847 84738 0 2 0x4000482 syz-fuzzer 79767 219085 84738 0 3 0x4000082 thrsleep syz-fuzzer 79767 61996 84738 0 3 0x4000082 thrsleep syz-fuzzer 79767 324931 84738 0 3 0x4000082 kqread syz-fuzzer 79767 164893 84738 0 3 0x4000082 thrsleep syz-fuzzer 79767 108475 84738 0 3 0x4000082 thrsleep syz-fuzzer 84738 272882 40779 0 3 0x10008a pause ksh 40779 338293 90526 0 3 0x92 select sshd 90526 474277 1 0 3 0x80 select sshd 95936 16356 51609 73 2 0x100090 syslogd 51609 225399 1 0 3 0x100082 netio syslogd 74032 429644 1 77 3 0x100090 poll dhclient 46049 232563 1 0 3 0x80 poll dhclient 95771 218483 0 0 2 0x14200 zerothread 1152 523952 0 0 3 0x14200 aiodoned aiodoned 37877 200716 0 0 3 0x14200 syncer update 13271 521334 0 0 3 0x14200 cleaner cleaner 86357 445281 0 0 3 0x14200 reaper reaper 44952 282803 0 0 3 0x14200 pgdaemon pagedaemon 20046 448406 0 0 3 0x14200 bored crynlk 90692 322169 0 0 3 0x14200 bored crypto 12996 499090 0 0 3 0x40014200 acpi0 acpi0 38609 184497 0 0 3 0x14200 bored softnet 32470 328314 0 0 3 0x14200 bored systqmp 4158 427842 0 0 3 0x14200 bored systq 2201 375491 0 0 3 0x40014200 bored softclock 22038 464573 0 0 3 0x40014200 idle0 80115 365679 0 0 2 0x14200 smr 1 86319 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 9610 6523K 14777K 78643K 71513 0 0 pcb 13 8K 8K 78643K 1587 0 0 rtable 123 12K 13K 78643K 3989 0 0 ifaddr 85 23K 26K 78643K 1884 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 1091 0 0 iov 0 0K 56K 78643K 3091 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 76K 77K 78643K 22251 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 270 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 2208 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 22246 0 0 sigio 1 0K 0K 78643K 303 0 0 proc 42 30K 54K 78643K 3014 0 0 subproc 32 2K 2K 78643K 203 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 2248 0 0 in_multi 33 2K 2K 78643K 844 0 0 ether_multi 1 0K 0K 78643K 120 0 0 mrt 0 0K 0K 78643K 56 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 120 530K 530K 78643K 120 0 0 exec 0 0K 1K 78643K 2379 0 0 pfkey data 0 0K 4K 78643K 10 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 105 21K 31K 78643K 52915 0 0 UVM aobj 130 4K 4K 78643K 142 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 821 0 0 NDP 21 0K 1K 78643K 522 0 0 temp 233 2729K 3373K 78643K 72947 0 0 kqueue 0 0K 0K 78643K 188 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 28 0 22 1 0 1 1 0 8 0 rtpcb 80 914 0 912 1 0 1 1 0 8 0 rtentry 112 186 0 141 2 0 2 2 0 8 0 unpcb 120 7336 0 7326 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 891 0 891 1 1 0 1 0 8 0 tcpcb 544 3460 0 3456 1 0 1 1 0 8 0 ipq 40 6 0 6 3 3 0 1 0 8 0 ipqe 40 12 0 12 3 3 0 1 0 8 0 inpcb 280 9420 0 9407 14 12 2 2 0 8 0 nd6 48 34 0 28 1 0 1 1 0 8 0 pkpcb 40 127 0 127 44 43 1 1 0 8 1 swfcl 56 14 0 0 1 0 1 1 0 8 0 ppxss 1128 378 0 378 58 57 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 626 0 428 17 4 13 13 0 8 0 art_table 32 627 0 428 2 0 2 2 0 8 0 art_node 16 149 0 109 1 0 1 1 0 8 0 sysvmsgpl 40 43 0 37 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 2206 0 2196 1 0 1 1 0 8 0 shmpl 112 140 0 12 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 37359 0 35937 46 0 46 46 0 8 0 ffsino 240 37359 0 35937 84 0 84 84 0 8 0 nchpl 144 68646 0 67028 61 0 61 61 0 8 0 uvmvnodes 72 7128 0 0 130 0 130 130 0 8 0 vnodes 200 7128 0 0 376 0 376 376 0 8 0 namei 1024 223970 0 223970 6 5 1 1 0 8 1 scsiplug 64 39 0 39 26 25 1 1 0 8 1 scxspl 192 226872 0 226872 108 105 3 7 0 8 3 plimitpl 152 1861 0 1854 1 0 1 1 0 8 0 sigapl 432 22402 0 22389 2 0 2 2 0 8 0 futexpl 56 371960 0 371960 10 9 1 1 0 8 1 knotepl 112 4266 0 4247 1 0 1 1 0 8 0 kqueuepl 104 5320 0 5318 1 0 1 1 0 8 0 pipepl 112 12418 0 12399 26 25 1 2 0 8 0 fdescpl 424 22403 0 22389 2 0 2 2 0 8 0 filepl 120 135645 0 135548 15 11 4 5 0 8 1 lockfpl 104 7908 0 7908 16 15 1 1 0 8 1 lockfspl 48 2701 0 2701 16 15 1 1 0 8 1 sessionpl 112 38 0 28 1 0 1 1 0 8 0 pgrppl 48 304 0 294 1 0 1 1 0 8 0 ucredpl 96 28855 0 28848 1 0 1 1 0 8 0 zombiepl 144 22389 0 22389 4 3 1 1 0 8 1 processpl 864 22418 0 22389 4 0 4 4 0 8 0 procpl 632 50843 0 50806 4 0 4 4 0 8 0 sosppl 128 274 0 274 57 56 1 1 0 8 1 sockpl 384 17975 0 17956 24 21 3 4 0 8 1 mcl64k 65536 4070 0 4070 354 353 1 65 0 8 1 mcl16k 16384 63 0 63 47 46 1 1 0 8 1 mcl12k 12288 438 0 438 49 48 1 1 0 8 1 mcl9k 9216 337 0 337 54 53 1 1 0 8 1 mcl8k 8192 303 0 303 55 55 0 1 0 8 0 mcl4k 4096 1056 0 1056 17 16 1 1 0 8 1 mcl2k2 2112 125 0 125 48 48 0 1 0 8 0 mcl2k 2048 90268 0 90222 22 15 7 14 0 8 0 mtagpl 80 595 0 535 5 3 2 2 0 8 0 mbufpl 256 253491 0 253307 182 169 13 42 0 8 0 bufpl 256 65865 0 58130 487 2 485 486 0 8 0 anonpl 16 1930168 0 1918168 528 471 57 81 0 62 0 amapchunkpl 152 94363 0 94258 261 256 5 18 0 158 0 amappl16 192 119493 0 118836 580 546 34 57 0 8 0 amappl15 184 1210 0 1210 6 6 0 1 0 8 0 amappl14 176 4377 0 4370 1 0 1 1 0 8 0 amappl13 168 4454 0 4454 3 3 0 1 0 8 0 amappl12 160 1511 0 1507 1 0 1 1 0 8 0 amappl11 152 2602 0 2591 1 0 1 1 0 8 0 amappl10 144 7201 0 7199 11 10 1 1 0 8 0 amappl9 136 2947 0 2943 1 0 1 1 0 8 0 amappl8 128 2490 0 2458 2 0 2 2 0 8 0 amappl7 120 7174 0 7167 1 0 1 1 0 8 0 amappl6 112 2590 0 2585 1 0 1 1 0 8 0 amappl5 104 1837 0 1826 1 0 1 1 0 8 0 amappl4 96 24841 0 24812 1 0 1 1 0 8 0 amappl3 88 5567 0 5557 1 0 1 1 0 8 0 amappl2 80 181491 0 181423 3 1 2 3 0 8 0 amappl1 72 383149 0 382737 26 17 9 19 0 8 0 amappl 80 51443 0 51407 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 141 0 12 3 0 3 3 0 8 0 uaddrrnd 24 22403 0 22389 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 22403 0 22389 1 0 1 1 0 8 0 vmmpekpl 168 135462 0 135439 2 0 2 2 0 8 0 vmmpepl 168 2565238 0 2563519 559 478 81 102 0 357 1 vmsppl 272 22402 0 22389 5 4 1 2 0 8 0 pdppl 4096 44812 0 44778 6 1 5 6 0 8 0 pvpl 32 5640700 0 5625553 1238 1057 181 267 0 265 47 pmappl 200 22402 0 22389 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1289 0 672 23 4 19 21 0 8 0