panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 151051 12128 0 0 0 0 syz-executor.1 *195754 12128 0 0 0x4000000 1K 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(fffffd8007bbb568) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800022e1db10,1,ffff800020b318c8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd806fac80d0,c0106477,ffff800022e1db10,1,fffffd807f7c6780,ffff800020b318c8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806e3487d0,c0106477,ffff800022e1db10,ffff800020b318c8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800020b318c8,ffff800022e1dc28,ffff800022e1dc90) at sys_ioctl+0x5b8 syscall(ffff800022e1dd00) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022e1dd00) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff1f,0,3,dd0c17ab010) at Xsyscall+0x128 end of kernel end trace frame: 0xdd3711a7170, 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(fffffd8007bbb568) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800022e1db10,1,ffff800020b318c8) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd806fac80d0,c0106477,ffff800022e1db10,1,fffffd807f7c6780,ffff800020b318c8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806e3487d0,c0106477,ffff800022e1db10,ffff800020b318c8) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff800020b318c8,ffff800022e1dc28,ffff800022e1dc90) at sys_ioctl+0x5b8 syscall(ffff800022e1dd00) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800022e1dd00) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff1f,0,3,dd0c17ab010) at Xsyscall+0x128 end of kernel end trace frame: 0xdd3711a7170, count: -9 ddb{1}> show registers rdi 0xffffffff810a6987 db_enter+0x17 rsi 0x67a3 __ALIGN_SIZE+0x57a3 rbp 0xffff800022e1d6d0 rbx 0xffff800022e1d780 rdx 0x67a4 __ALIGN_SIZE+0x57a4 rcx 0xffff800021c02000 rax 0xffff800021c02000 r8 0xffffffff81491283 kprintf+0x173 r9 0x1 r10 0x25 r11 0x614a80e098d62dba r12 0x3000000008 r13 0xffff800022e1d6e0 r14 0x100 r15 0x1 rip 0xffffffff810a6988 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022e1d6c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=195754 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff800020b30780,0xffff800020b31b50 process=0xffff800020b7c000 user=0xffff800022e18000, vmspace=0xfffffd807f00c8a0 estcpu=27, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 12128 151051 23553 0 7 0 syz-executor.1 *12128 195754 23553 0 7 0x4000000 syz-executor.1 12128 110543 23553 0 2 0x4000000 syz-executor.1 23553 393968 90815 0 3 0x82 nanosleep syz-executor.1 84099 266716 0 0 3 0x14200 bored sosplice 11576 101965 90815 0 3 0x82 nanosleep syz-executor.0 90815 132993 68171 0 3 0x82 thrsleep syz-fuzzer 90815 52234 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 118010 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 233894 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 441317 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 199715 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 451060 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 350419 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 201542 68171 0 3 0x4000082 thrsleep syz-fuzzer 90815 70068 68171 0 3 0x4000082 kqread syz-fuzzer 68171 511516 69131 0 3 0x10008a pause ksh 69131 122244 39431 0 3 0x92 select sshd 90458 300538 1 0 3 0x100083 ttyin getty 39431 403571 1 0 3 0x80 select sshd 30982 153840 80085 74 3 0x100092 bpf pflogd 80085 209448 1 0 3 0x80 netio pflogd 20413 151308 74705 73 3 0x100090 kqread syslogd 74705 146797 1 0 3 0x100082 netio syslogd 58143 237312 1 77 3 0x100090 poll dhclient 49290 502387 1 0 3 0x80 poll dhclient 21816 454691 0 0 3 0x14200 pgzero zerothread 51825 178773 0 0 3 0x14200 aiodoned aiodoned 8212 200501 0 0 3 0x14200 syncer update 77117 422020 0 0 3 0x14200 cleaner cleaner 21582 524272 0 0 3 0x14200 reaper reaper 89136 184851 0 0 3 0x14200 pgdaemon pagedaemon 45660 273874 0 0 3 0x14200 bored crynlk 80037 310484 0 0 3 0x14200 bored crypto 50304 37927 0 0 3 0x40014200 acpi0 acpi0 94266 506599 0 0 3 0x40014200 idle1 78510 220676 0 0 3 0x14200 bored softnet 28284 227370 0 0 3 0x14200 bored systqmp 84635 97936 0 0 3 0x14200 bored systq 13373 192184 0 0 3 0x40014200 bored softclock 63597 185357 0 0 3 0x40014200 idle0 36447 196555 0 0 3 0x14200 bored smr 1 460462 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 12128 (syz-executor.1) thread 0xffff800020b318c8 (195754) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82363570) #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 9585 6460K 7035K 78643K 16691 0 0 pcb 13 8K 8K 78643K 186 0 0 rtable 115 4K 5K 78643K 1063 0 0 ifaddr 81 17K 17K 78643K 392 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1604 0 0 iov 0 0K 28K 78643K 323 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 3407 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 36 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 262 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 2508 0 0 sigio 0 0K 0K 78643K 19 0 0 proc 54 51K 83K 78643K 977 0 0 subproc 32 2K 2K 78643K 174 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 245 0 0 in_multi 33 2K 2K 78643K 191 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 13 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 496 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 109 22K 31K 78643K 9058 0 0 UVM aobj 94 3K 3K 78643K 108 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 138 0 0 NDP 19 0K 0K 78643K 116 0 0 temp 220 2744K 2812K 78643K 11792 0 0 kqueue 0 0K 0K 78643K 27 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 23 0 16 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 131 0 129 1 0 1 1 0 8 0 rtentry 112 139 0 94 2 0 2 2 0 8 0 unpcb 120 732 0 720 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9233 0 9233 3 3 0 2 0 8 0 tcpcb 544 406 0 402 1 0 1 1 0 8 0 inpcb 280 1151 0 1143 1 0 1 1 0 8 0 rttmr 72 3 0 3 3 3 0 1 0 8 0 nd6 48 30 0 24 1 0 1 1 0 8 0 pkpcb 40 16 0 16 5 4 1 1 0 8 1 ppxss 1128 64 0 64 6 5 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 51 0 36 1 0 1 1 0 8 0 pfstkey 112 51 0 36 1 0 1 1 0 8 0 pfstate 328 51 0 36 2 0 2 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 564 0 373 13 1 12 12 0 8 0 art_table 32 565 0 373 2 0 2 2 0 8 0 art_node 16 136 0 95 1 0 1 1 0 8 0 sysvmsgpl 40 43 0 21 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 260 0 250 1 0 1 1 0 8 0 shmpl 112 106 0 14 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5233 0 3820 47 0 47 47 0 8 0 ffsino 272 5233 0 3820 96 0 96 96 0 8 0 nchpl 144 8760 0 7122 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 28389 0 28389 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 5 0 5 4 4 0 1 0 8 0 scxspl 192 26814 0 26814 23 20 3 6 0 8 3 plimitpl 152 237 0 229 1 0 1 1 0 8 0 sigapl 432 2684 0 2669 3 1 2 3 0 8 0 futexpl 56 29627 0 29627 1 0 1 1 0 8 1 knotepl 112 583 0 564 1 0 1 1 0 8 0 kqueuepl 104 533 0 531 1 0 1 1 0 8 0 pipepl 112 1500 0 1481 5 4 1 2 0 8 0 fdescpl 488 2685 0 2669 3 0 3 3 0 8 0 filepl 152 15290 0 15189 11 6 5 7 0 8 1 lockfpl 104 817 0 817 2 1 1 1 0 8 1 lockfspl 48 278 0 278 2 1 1 1 0 8 1 sessionpl 112 26 0 15 1 0 1 1 0 8 0 pgrppl 48 44 0 33 1 0 1 1 0 8 0 ucredpl 96 2897 0 2888 1 0 1 1 0 8 0 zombiepl 144 2669 0 2668 3 2 1 1 0 8 0 processpl 896 2701 0 2668 4 0 4 4 0 8 0 procpl 632 7874 0 7830 8 3 5 5 0 8 1 srpgc 64 19 0 19 5 5 0 1 0 8 0 sosppl 128 23 0 23 6 6 0 1 0 8 0 sockpl 384 2050 0 2029 6 3 3 4 0 8 0 mcl64k 65536 25 0 0 4 1 3 3 0 8 0 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 13 0 0 1 0 1 1 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 10 0 0 2 0 2 2 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 206 0 0 23 2 21 23 0 8 0 mtagpl 80 21 0 0 1 0 1 1 0 8 0 mbufpl 256 270 0 0 13 0 13 13 0 8 0 bufpl 256 16955 0 9926 440 0 440 440 0 8 0 anonpl 16 263422 0 251627 127 63 64 64 0 125 13 amapchunkpl 152 16887 0 16778 42 36 6 19 0 158 0 amappl16 192 13801 0 13154 126 84 42 45 0 8 8 amappl15 184 594 0 594 1 1 0 1 0 8 0 amappl14 176 434 0 428 1 0 1 1 0 8 0 amappl13 168 8 0 8 2 2 0 1 0 8 0 amappl12 160 592 0 589 1 0 1 1 0 8 0 amappl11 152 80 0 65 1 0 1 1 0 8 0 amappl10 144 100 0 96 1 0 1 1 0 8 0 amappl9 136 1844 0 1840 1 0 1 1 0 8 0 amappl8 128 1404 0 1378 1 0 1 1 0 8 0 amappl7 120 78 0 72 1 0 1 1 0 8 0 amappl6 112 78 0 70 1 0 1 1 0 8 0 amappl5 104 861 0 845 1 0 1 1 0 8 0 amappl4 96 2050 0 2022 2 1 1 2 0 8 0 amappl3 88 1501 0 1489 1 0 1 1 0 8 0 amappl2 80 20310 0 20234 4 1 3 3 0 8 0 amappl1 72 68347 0 67901 26 16 10 20 0 8 0 amappl 80 8272 0 8234 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 107 0 14 2 0 2 2 0 8 0 uaddrrnd 24 2685 0 2669 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2685 0 2669 1 0 1 1 0 8 0 vmmpekpl 168 23111 0 23075 2 0 2 2 0 8 0 vmmpepl 168 335664 0 333870 192 99 93 100 0 357 10 vmsppl 368 2684 0 2669 2 0 2 2 0 8 0 pdppl 4096 5377 0 5338 7 1 6 6 0 8 1 pvpl 32 722424 0 707431 257 98 159 162 0 265 34 pmappl 232 2684 0 2669 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 615 0 10 18 0 18 18 0 8 0