panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *282040 92267 0 0 0x4000000 1K syz-executor.1 153638 92267 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(fffffd8067f12388) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800021207b20,1,ffff800020b6f3d8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd806fac6260,c0106477,ffff800021207b20,1,fffffd807f7c6900,ffff800020b6f3d8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80679f9448,c0106477,ffff800021207b20,ffff800020b6f3d8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800020b6f3d8,ffff800021207c38,ffff800021207ca0) at sys_ioctl+0x5b8 syscall(ffff800021207d10) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021207d10) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff1f,0,3,acdbebc1010) at Xsyscall+0x128 end of kernel end trace frame: 0xad076933530, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic vrele: v_writecount != 0 ddb{1}> 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(fffffd8067f12388) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800021207b20,1,ffff800020b6f3d8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd806fac6260,c0106477,ffff800021207b20,1,fffffd807f7c6900,ffff800020b6f3d8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80679f9448,c0106477,ffff800021207b20,ffff800020b6f3d8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800020b6f3d8,ffff800021207c38,ffff800021207ca0) at sys_ioctl+0x5b8 syscall(ffff800021207d10) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021207d10) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff1f,0,3,acdbebc1010) at Xsyscall+0x128 end of kernel end trace frame: 0xad076933530, count: -9 ddb{1}> show registers rdi 0xffffffff81a69fa7 db_enter+0x17 rsi 0x6a3f __ALIGN_SIZE+0x5a3f rbp 0xffff8000212076e0 rbx 0xffff800021207790 rdx 0x6a40 __ALIGN_SIZE+0x5a40 rcx 0xffff800022e2c000 rax 0xffff800022e2c000 r8 0xffffffff81c83d13 kprintf+0x173 r9 0x1 r10 0x25 r11 0xee222c00c0666a65 r12 0x3000000008 r13 0xffff8000212076f0 r14 0x100 r15 0x1 rip 0xffffffff81a69fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000212076d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=282040 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b60288,0xffff800020b6f660 process=0xffff800020aeb888 user=0xffff800021202000, vmspace=0xfffffd807f00b2e0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 92267 273929 65772 0 2 0 syz-executor.1 *92267 282040 65772 0 7 0x4000000 syz-executor.1 92267 153638 65772 0 7 0x4000000 syz-executor.1 34848 113146 30461 0 2 0 syz-executor.0 34848 209986 30461 0 3 0x4000080 ttyin syz-executor.0 34848 490616 30461 0 3 0x4000080 fsleep syz-executor.0 84158 118511 1 0 3 0x100083 ttyin getty 30461 61167 69689 0 3 0x82 nanosleep syz-executor.0 83503 89931 0 0 3 0x14200 bored sosplice 65772 287250 69689 0 3 0x82 nanosleep syz-executor.1 69689 80978 77575 0 3 0x82 thrsleep syz-fuzzer 69689 219866 77575 0 3 0x4000082 thrsleep syz-fuzzer 69689 395385 77575 0 3 0x4000082 thrsleep syz-fuzzer 69689 23787 77575 0 3 0x4000082 kqread syz-fuzzer 69689 8034 77575 0 3 0x4000082 thrsleep syz-fuzzer 69689 451650 77575 0 3 0x4000082 thrsleep syz-fuzzer 69689 253451 77575 0 3 0x4000082 thrsleep syz-fuzzer 69689 448350 77575 0 3 0x4000082 thrsleep syz-fuzzer 69689 128940 77575 0 3 0x4000082 thrsleep syz-fuzzer 69689 417804 77575 0 3 0x4000082 thrsleep syz-fuzzer 77575 406332 46352 0 3 0x10008a pause ksh 46352 93737 38352 0 3 0x92 select sshd 38352 195454 1 0 3 0x80 select sshd 22284 457078 38908 74 3 0x100092 bpf pflogd 38908 113586 1 0 3 0x80 netio pflogd 20776 114645 36306 73 3 0x100090 kqread syslogd 36306 488808 1 0 3 0x100082 netio syslogd 42675 49725 1 77 3 0x100090 poll dhclient 43613 347397 1 0 3 0x80 poll dhclient 97536 397902 0 0 2 0x14200 zerothread 28428 161914 0 0 3 0x14200 aiodoned aiodoned 19627 281951 0 0 3 0x14200 syncer update 67640 45952 0 0 3 0x14200 cleaner cleaner 586 439416 0 0 3 0x14200 reaper reaper 10628 27338 0 0 3 0x14200 pgdaemon pagedaemon 79316 349660 0 0 3 0x14200 bored crynlk 28840 445065 0 0 3 0x14200 bored crypto 4153 43195 0 0 3 0x40014200 acpi0 acpi0 83497 252154 0 0 3 0x40014200 idle1 52802 337261 0 0 3 0x14200 bored softnet 18383 474818 0 0 3 0x14200 bored systqmp 92015 116703 0 0 3 0x14200 bored systq 62830 28707 0 0 3 0x40014200 bored softclock 19262 157101 0 0 3 0x40014200 idle0 35857 372808 0 0 3 0x14200 bored smr 1 269674 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 92267 (syz-executor.1) thread 0xffff800020b6f3d8 (282040) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823647a0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 #2 mi_switch+0x38f sys/kern/sched_bsd.c:441 #3 sleep_finish+0x113 sys/kern/kern_synch.c:373 #4 tsleep+0x198 sleep_finish_timeout sys/kern/kern_synch.c:397 [inline] #4 tsleep+0x198 sleep_finish_all sys/kern/kern_synch.c:183 [inline] #4 tsleep+0x198 sys/kern/kern_synch.c:152 #5 fifo_open+0x3b6 sys/miscfs/fifofs/fifo_vnops.c:194 #6 VOP_OPEN+0x6a sys/kern/vfs_vops.c:153 #7 vn_open+0x495 sys/kern/vfs_vnops.c:174 #8 diskmapioctl+0x1ba sys/dev/diskmap.c:89 #9 VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 #10 vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 #11 sys_ioctl+0x5b8 #12 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #12 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #13 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9535 7070K 7595K 78643K 13384 0 0 pcb 13 8K 8K 78643K 99 0 0 rtable 111 4K 5K 78643K 478 0 0 ifaddr 62 14K 14K 78643K 184 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1537 0 0 iov 0 0K 16K 78643K 126 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 77K 78643K 2190 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 19 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 11 1K 1K 78643K 15 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 1137 0 0 sigio 0 0K 0K 78643K 27 0 0 proc 54 51K 83K 78643K 642 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 111 0 0 in_multi 33 2K 2K 78643K 69 0 0 ether_multi 1 0K 0K 78643K 6 0 0 mrt 0 0K 0K 78643K 10 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 323 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 30K 78643K 4652 0 0 UVM aobj 66 3K 3K 78643K 68 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 39 0 0 NDP 13 0K 0K 78643K 49 0 0 temp 179 2743K 3373K 78643K 6858 0 0 kqueue 0 0K 0K 78643K 11 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 8 0 2 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 63 0 61 1 0 1 1 0 8 0 rtentry 112 59 0 15 2 0 2 2 0 8 0 unpcb 120 340 0 327 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7604 0 7604 1 1 0 1 0 8 0 tcpcb 544 170 0 166 1 0 1 1 0 8 0 inpcb 280 501 0 494 1 0 1 1 0 8 0 rttmr 72 3 0 3 3 3 0 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 26 0 26 2 1 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 26 0 19 1 0 1 1 0 8 0 pfstkey 112 26 0 19 1 0 1 1 0 8 0 pfstate 328 26 0 19 2 1 1 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 235 0 44 12 0 12 12 0 8 0 art_table 32 236 0 44 2 0 2 2 0 8 0 art_node 16 58 0 18 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 6 1 0 1 1 0 8 0 semupl 112 3 0 3 2 2 0 1 0 8 0 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 66 0 2 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3210 0 1789 47 0 47 47 0 8 0 ffsino 272 3210 0 1789 96 0 96 96 0 8 0 nchpl 144 4963 0 3338 62 0 62 62 0 8 0 uvmvnodes 72 3902 0 0 71 0 71 71 0 8 0 vnodes 200 3902 0 0 206 0 206 206 0 8 0 namei 1024 14919 0 14919 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 13876 0 13876 18 17 1 6 0 8 1 plimitpl 152 112 0 104 1 0 1 1 0 8 0 sigapl 432 1337 0 1321 3 1 2 3 0 8 0 futexpl 56 13536 0 13535 2 1 1 1 0 8 0 knotepl 112 208 0 189 1 0 1 1 0 8 0 kqueuepl 104 227 0 225 1 0 1 1 0 8 0 pipepl 112 792 0 773 1 0 1 1 0 8 0 fdescpl 488 1338 0 1321 3 0 3 3 0 8 0 filepl 152 7568 0 7461 6 1 5 5 0 8 0 lockfpl 104 385 0 385 3 2 1 1 0 8 1 lockfspl 48 136 0 136 3 2 1 1 0 8 1 sessionpl 112 22 0 11 1 0 1 1 0 8 0 pgrppl 48 40 0 29 1 0 1 1 0 8 0 ucredpl 96 1356 0 1347 1 0 1 1 0 8 0 zombiepl 144 1321 0 1321 2 1 1 1 0 8 1 processpl 896 1354 0 1321 4 0 4 4 0 8 0 procpl 632 3800 0 3754 7 2 5 5 0 8 1 srpgc 64 5 0 5 3 3 0 1 0 8 0 sosppl 128 18 0 18 2 2 0 1 0 8 0 sockpl 384 920 0 898 5 2 3 3 0 8 0 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 11 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 184 0 0 21 1 20 21 0 8 0 mtagpl 80 21 0 0 1 0 1 1 0 8 0 mbufpl 256 235 0 0 12 0 12 12 0 8 0 bufpl 256 8009 0 1176 428 0 428 428 0 8 0 anonpl 16 138096 0 126418 91 27 64 64 0 125 11 amapchunkpl 152 8041 0 7926 16 7 9 10 0 158 3 amappl16 192 6571 0 5930 63 22 41 45 0 8 8 amappl15 184 562 0 559 1 0 1 1 0 8 0 amappl14 176 58 0 53 1 0 1 1 0 8 0 amappl13 168 215 0 213 2 1 1 1 0 8 0 amappl12 160 9 0 8 1 0 1 1 0 8 0 amappl11 152 393 0 378 1 0 1 1 0 8 0 amappl10 144 76 0 73 1 0 1 1 0 8 0 amappl9 136 617 0 614 1 0 1 1 0 8 0 amappl8 128 169 0 149 1 0 1 1 0 8 0 amappl7 120 45 0 40 1 0 1 1 0 8 0 amappl6 112 380 0 370 1 0 1 1 0 8 0 amappl5 104 143 0 129 1 0 1 1 0 8 0 amappl4 96 1633 0 1601 2 1 1 2 0 8 0 amappl3 88 214 0 203 1 0 1 1 0 8 0 amappl2 80 10498 0 10413 3 0 3 3 0 8 0 amappl1 72 37665 0 37196 27 16 11 20 0 8 0 amappl 80 4078 0 4036 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 67 0 2 2 0 2 2 0 8 0 uaddrrnd 24 1338 0 1321 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1338 0 1321 1 0 1 1 0 8 0 vmmpekpl 168 13336 0 13301 2 0 2 2 0 8 0 vmmpepl 168 167801 0 165907 142 52 90 99 0 357 7 vmsppl 368 1337 0 1321 2 0 2 2 0 8 0 pdppl 4096 2684 0 2642 6 0 6 6 0 8 0 pvpl 32 391092 0 376127 207 50 157 158 0 265 29 pmappl 232 1337 0 1321 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 596 0 7 17 0 17 17 0 8 0