panic: vrele: v_writecount != 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *369342 56651 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(fffffd80366611a0) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a22840,1,ffff8000ffff3b40) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd803740c008,c0106477,ffff800015a22840,1,fffffd803f7c6b40,ffff8000ffff3b40) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803ecfbe90,c0106477,ffff800015a22840,ffff8000ffff3b40) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff3b40,ffff800015a22958,ffff800015a229c0) at sys_ioctl+0x5b8 syscall(ffff800015a22a20) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,f87eaddb010) at Xsyscall+0x128 end of kernel end trace frame: 0xf8a0379c740, 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(fffffd80366611a0) at vrele+0x188 sys/kern/vfs_subr.c:797 diskmapioctl(5a00,c0106477,ffff800015a22840,1,ffff8000ffff3b40) at diskmapioctl+0x2a8 sys/dev/diskmap.c:140 VOP_IOCTL(fffffd803740c008,c0106477,ffff800015a22840,1,fffffd803f7c6b40,ffff8000ffff3b40) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803ecfbe90,c0106477,ffff800015a22840,ffff8000ffff3b40) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:519 sys_ioctl(ffff8000ffff3b40,ffff800015a22958,ffff800015a229c0) at sys_ioctl+0x5b8 syscall(ffff800015a22a20) at syscall+0x508 Xsyscall(6,0,ffffffffffffff1f,0,3,f87eaddb010) at Xsyscall+0x128 end of kernel end trace frame: 0xf8a0379c740, count: -9 ddb> show registers rdi 0xffffffff81ac3167 db_enter+0x17 rsi 0x7841 __ALIGN_SIZE+0x6841 rbp 0xffff800015a22400 rbx 0xffff800015a224b0 rdx 0x7842 __ALIGN_SIZE+0x6842 rcx 0xffff8000149e7000 rax 0xffff8000149e7000 r8 0xffff800015a223c0 r9 0x1 r10 0xffff800000992f40 r11 0x25defbfe06ff8eb5 r12 0x3000000008 r13 0xffff800015a22410 r14 0x100 r15 0x1 rip 0xffffffff81ac3168 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015a223f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=369342 stat=onproc flags process=0 proc=4000000 pri=24, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2018,0xffff8000ffff22a0 process=0xffff8000ffff7450 user=0xffff800015a1d000, vmspace=0xfffffd803f013000 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 56651 374463 36082 0 2 0 syz-executor.0 *56651 369342 36082 0 7 0x4000000 syz-executor.0 56651 366960 36082 0 2 0x4000000 syz-executor.0 97911 372603 11898 0 2 0 syz-executor.1 97911 115279 11898 0 2 0x4000000 syz-executor.1 37111 493953 1 0 3 0x100083 ttyin getty 11898 116328 88276 0 2 0x482 syz-executor.1 77073 440524 0 0 3 0x14200 bored sosplice 36082 463810 88276 0 2 0x482 syz-executor.0 88276 352062 55477 0 3 0x82 kqread syz-fuzzer 88276 427471 55477 0 3 0x4000082 thrsleep syz-fuzzer 88276 84102 55477 0 3 0x4000082 thrsleep syz-fuzzer 88276 127119 55477 0 3 0x4000082 thrsleep syz-fuzzer 88276 99234 55477 0 3 0x4000082 thrsleep syz-fuzzer 88276 304969 55477 0 3 0x4000082 thrsleep syz-fuzzer 88276 249807 55477 0 3 0x4000082 thrsleep syz-fuzzer 55477 166453 68884 0 3 0x10008a pause ksh 68884 221573 89236 0 3 0x92 select sshd 89236 410158 1 0 3 0x80 select sshd 70751 394700 97007 73 2 0x100090 syslogd 97007 152371 1 0 3 0x100082 netio syslogd 20398 266926 1 77 3 0x100090 poll dhclient 58339 501076 1 0 3 0x80 poll dhclient 12805 46114 0 0 2 0x14200 zerothread 3480 454375 0 0 3 0x14200 aiodoned aiodoned 13547 512377 0 0 3 0x14200 syncer update 30603 295408 0 0 3 0x14200 cleaner cleaner 75494 484800 0 0 3 0x14200 reaper reaper 45237 370575 0 0 3 0x14200 pgdaemon pagedaemon 57894 88362 0 0 3 0x14200 bored crynlk 90221 115007 0 0 3 0x14200 bored crypto 16931 99298 0 0 3 0x40014200 acpi0 acpi0 46876 462683 0 0 3 0x14200 bored softnet 73544 97887 0 0 2 0x14200 systqmp 65472 167536 0 0 3 0x14200 bored systq 39672 297837 0 0 2 0x40014200 softclock 9516 445252 0 0 3 0x40014200 idle0 879 134954 0 0 3 0x14200 bored smr 1 51409 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 9532 6365K 7008K 78643K 20395 0 0 pcb 13 8K 8K 78643K 297 0 0 rtable 115 12K 12K 78643K 949 0 0 ifaddr 65 15K 16K 78643K 424 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 178 0 0 iov 1 12K 24K 78643K 517 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 76K 77K 78643K 4764 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 57 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 86 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 3619 0 0 sigio 1 0K 0K 78643K 56 0 0 proc 42 30K 46K 78643K 729 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 314 0 0 in_multi 33 2K 2K 78643K 139 0 0 ether_multi 1 0K 0K 78643K 15 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 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 530 0 0 pfkey data 0 0K 4K 78643K 4 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 94 21K 25K 78643K 9401 0 0 UVM aobj 130 4K 4K 78643K 147 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 14 0K 0K 78643K 117 0 0 temp 184 2727K 2855K 78643K 14547 0 0 kqueue 0 0K 0K 78643K 46 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 8 0 2 1 0 1 1 0 8 0 rtpcb 80 165 0 163 1 0 1 1 0 8 0 rtentry 112 58 0 14 2 0 2 2 0 8 0 unpcb 120 1181 0 1171 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 773 0 773 1 1 0 1 0 8 0 tcpcb 544 508 0 504 1 0 1 1 0 8 0 inpcb 280 1492 0 1483 4 2 2 2 0 8 1 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 48 4 0 4 1 1 0 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 13 0 13 7 7 0 1 0 8 0 swfcl 56 5 0 0 1 0 1 1 0 8 0 ppxss 1128 75 0 75 13 12 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 236 0 44 13 1 12 12 0 8 0 art_table 32 237 0 44 2 0 2 2 0 8 0 art_node 16 55 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 30 0 16 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 84 0 74 1 0 1 1 0 8 0 shmpl 112 145 0 17 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7329 0 5924 46 0 46 46 0 8 0 ffsino 240 7329 0 5924 84 0 84 84 0 8 0 nchpl 144 12507 0 10888 63 1 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 39646 0 39646 3 2 1 1 0 8 1 scsiplug 64 8 0 8 4 4 0 1 0 8 0 scxspl 192 40691 0 40691 29 28 1 6 0 8 1 plimitpl 152 293 0 286 1 0 1 1 0 8 0 sigapl 432 3790 0 3776 2 0 2 2 0 8 0 futexpl 56 60332 0 60332 3 2 1 1 0 8 1 knotepl 112 862 0 843 1 0 1 1 0 8 0 kqueuepl 104 926 0 924 1 0 1 1 0 8 0 pipepl 112 2200 0 2175 8 7 1 2 0 8 0 fdescpl 424 3791 0 3776 2 0 2 2 0 8 0 filepl 120 23041 0 22935 7 3 4 5 0 8 0 lockfpl 104 1342 0 1340 6 5 1 1 0 8 0 lockfspl 48 462 0 460 6 5 1 1 0 8 0 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 51 0 41 1 0 1 1 0 8 0 ucredpl 96 4889 0 4881 1 0 1 1 0 8 0 zombiepl 144 3776 0 3776 1 0 1 1 0 8 1 processpl 864 3806 0 3776 4 0 4 4 0 8 0 procpl 632 8490 0 8451 4 0 4 4 0 8 0 sosppl 128 46 0 46 12 12 0 1 0 8 0 sockpl 384 2868 0 2849 11 8 3 4 0 8 1 mcl64k 65536 1609 0 1609 151 150 1 65 0 8 1 mcl16k 16384 13 0 13 11 10 1 1 0 8 1 mcl12k 12288 68 0 68 13 12 1 1 0 8 1 mcl9k 9216 55 0 55 17 16 1 1 0 8 1 mcl8k 8192 48 0 48 14 13 1 1 0 8 1 mcl4k 4096 168 0 168 10 9 1 1 0 8 1 mcl2k2 2112 16 0 16 7 7 0 1 0 8 0 mcl2k 2048 60647 0 60607 19 13 6 12 0 8 0 mtagpl 80 95 0 59 2 1 1 1 0 8 0 mbufpl 256 114833 0 114701 95 84 11 40 0 8 0 bufpl 256 15206 0 10634 287 0 287 287 0 8 0 anonpl 16 361583 0 349754 168 116 52 66 0 62 0 amapchunkpl 152 15634 0 15502 18 10 8 10 0 158 0 amappl16 192 21064 0 20414 154 120 34 45 0 8 1 amappl15 184 780 0 780 2 2 0 1 0 8 0 amappl14 176 840 0 834 1 0 1 1 0 8 0 amappl13 168 1006 0 1004 2 1 1 1 0 8 0 amappl12 160 1802 0 1797 1 0 1 1 0 8 0 amappl11 152 54 0 43 1 0 1 1 0 8 0 amappl10 144 72 0 71 1 0 1 1 0 8 0 amappl9 136 562 0 559 1 0 1 1 0 8 0 amappl8 128 147 0 128 1 0 1 1 0 8 0 amappl7 120 37 0 32 1 0 1 1 0 8 0 amappl6 112 55 0 49 1 0 1 1 0 8 0 amappl5 104 1987 0 1975 1 0 1 1 0 8 0 amappl4 96 1479 0 1452 1 0 1 1 0 8 0 amappl3 88 3642 0 3631 1 0 1 1 0 8 0 amappl2 80 30524 0 30447 3 1 2 3 0 8 0 amappl1 72 74515 0 74088 26 17 9 19 0 8 0 amappl 80 8792 0 8748 2 0 2 2 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 146 0 17 3 0 3 3 0 8 0 uaddrrnd 24 3791 0 3776 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3791 0 3776 1 0 1 1 0 8 0 vmmpekpl 168 26977 0 26954 2 0 2 2 0 8 0 vmmpepl 168 443049 0 441242 184 104 80 113 0 357 1 vmsppl 272 3790 0 3776 2 1 1 2 0 8 0 pdppl 4096 7588 0 7552 6 1 5 6 0 8 0 pvpl 32 925730 0 910787 288 150 138 164 0 265 12 pmappl 200 3790 0 3776 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 702 0 286 16 1 15 15 0 8 0