panic: kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 329 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 46830 83357 0 0x2 0x1 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 __assert(ffffffff821e5afe,ffffffff821fb298,149,ffffffff821c4287) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803b149e00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803b149e00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803b149e00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803b149e00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80389d2000,2,ffffffffffffffff,ffff800015940c70,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80290fd1f0,0,0,ffffffffffffffff) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_inactive(ffff8000159300c8) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd80389d2000,ffff800015940c70) at VOP_INACTIVE+0xaa sys/kern/vfs_vops.c:573 vput(fffffd80389d2000) at vput+0xae sys/kern/vfs_subr.c:768 ktrwriteraw(ffff800015940c70,fffffd80389d2000,fffffd803f7c6ba0,ffff800015930258,ffff800015930230) at ktrwriteraw+0x1fd sys/kern/kern_ktrace.c:669 ktrsysret(ffff800015940c70,c3,0,ffff800015930360) at ktrsysret+0x183 ktrwrite2 sys/kern/kern_ktrace.c:620 [inline] ktrsysret(ffff800015940c70,c3,0,ffff800015930360) at ktrsysret+0x183 sys/kern/kern_ktrace.c:206 end trace frame: 0xffff8000159303d0, count: 0 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 kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 329 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 __assert(ffffffff821e5afe,ffffffff821fb298,149,ffffffff821c4287) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803b149e00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803b149e00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803b149e00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803b149e00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80389d2000,2,ffffffffffffffff,ffff800015940c70,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80290fd1f0,0,0,ffffffffffffffff) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_inactive(ffff8000159300c8) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd80389d2000,ffff800015940c70) at VOP_INACTIVE+0xaa sys/kern/vfs_vops.c:573 vput(fffffd80389d2000) at vput+0xae sys/kern/vfs_subr.c:768 ktrwriteraw(ffff800015940c70,fffffd80389d2000,fffffd803f7c6ba0,ffff800015930258,ffff800015930230) at ktrwriteraw+0x1fd sys/kern/kern_ktrace.c:669 ktrsysret(ffff800015940c70,c3,0,ffff800015930360) at ktrsysret+0x183 ktrwrite2 sys/kern/kern_ktrace.c:620 [inline] ktrsysret(ffff800015940c70,c3,0,ffff800015930360) at ktrsysret+0x183 sys/kern/kern_ktrace.c:206 syscall(ffff8000159303e0) at syscall+0x47f mi_syscall_return sys/sys/syscall_mi.h:117 [inline] syscall(ffff8000159303e0) at syscall+0x47f sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,0,0,c3,7f7fffff4af0,7f7fffff46b0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff46d0, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001592fbb0 rbx 0xffff80001592fc60 rdx 0x2 rcx 0 rax 0 r8 0xffff80001592fb70 r9 0x1 r10 0 r11 0xe0b0eb7d83e4a3be r12 0x3000000008 r13 0xffff80001592fbc0 r14 0x100 r15 0x1 rip 0xffffffff8132ba48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001592fba0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=46830 stat=onproc flags process=2 proc=1 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800015941b40,0xffffffff8255c048 process=0xffff8000148a3458 user=0xffff80001592b000, vmspace=0xfffffd803f013220 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *83357 46830 3951 0 7 0x3 syz-executor.0 17914 95508 0 0 3 0x14200 acct acct 16298 217579 1 0 3 0x100083 ttyin getty 21404 167693 0 0 3 0x14200 bored sosplice 3951 449408 94143 0 3 0x82 thrsleep syz-fuzzer 3951 195832 94143 0 3 0x4000082 nanosleep syz-fuzzer 3951 346127 94143 0 3 0x4000082 thrsleep syz-fuzzer 3951 432576 94143 0 3 0x4000082 thrsleep syz-fuzzer 3951 362622 94143 0 3 0x4000082 kqread syz-fuzzer 3951 221521 94143 0 3 0x4000082 thrsleep syz-fuzzer 3951 280024 94143 0 3 0x4000082 thrsleep syz-fuzzer 94143 88350 21662 0 3 0x10008a pause ksh 21662 386035 8893 0 3 0x92 select sshd 8893 419751 1 0 3 0x80 select sshd 95331 15002 36981 73 3 0x100010 ffs_fsync syslogd 36981 288480 1 0 3 0x100082 netio syslogd 30581 208475 1 77 3 0x100090 poll dhclient 35152 197361 1 0 3 0x80 poll dhclient 47369 179033 0 0 2 0x14200 zerothread 44844 166519 0 0 3 0x14200 aiodoned aiodoned 72651 125495 0 0 3 0x14200 syncer update 61064 387234 0 0 3 0x14200 cleaner cleaner 14141 281830 0 0 3 0x14200 reaper reaper 89199 354710 0 0 3 0x14200 pgdaemon pagedaemon 22729 498001 0 0 3 0x14200 bored crynlk 80486 335087 0 0 3 0x14200 bored crypto 45616 300992 0 0 3 0x40014200 acpi0 acpi0 12985 357305 0 0 3 0x14200 bored softnet 64372 493104 0 0 3 0x14200 bored systqmp 7566 432439 0 0 3 0x14200 bored systq 7684 349514 0 0 3 0x40014200 bored softclock 88400 39108 0 0 3 0x40014200 idle0 11143 408709 0 0 3 0x14200 bored smr 1 342982 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 9572 7023K 9355K 78643K 66418 0 0 pcb 13 11K 13K 78643K 1550 0 0 rtable 90 8K 9K 78643K 8984 0 0 ifaddr 86 24K 30K 78643K 1649 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 1686 0 0 iov 0 0K 32K 78643K 1179 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1232 77K 78K 78643K 15739 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 277 0 0 VM map 44 11K 11K 78643K 64 0 0 sem 12 0K 1K 78643K 4131 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 9172 0 0 sigio 0 0K 0K 78643K 93 0 0 proc 49 38K 63K 78643K 1984 0 0 subproc 17 1K 2K 78643K 558 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 437 0 0 in_multi 16 1K 2K 78643K 537 0 0 ether_multi 1 0K 0K 78643K 40 0 0 mrt 0 0K 0K 78643K 32 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 1071 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 173 333K 352K 78643K 21885 0 0 UVM aobj 130 4K 4K 78643K 395 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 918 0 0 NDP 19 0K 1K 78643K 461 0 0 temp 205 3539K 4181K 78643K 172430 0 0 kqueue 0 0K 0K 78643K 52 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 518 0 514 1 0 1 1 0 8 0 rtpcb 80 1004 0 1002 1 0 1 1 0 8 0 rtentry 112 1790 0 1762 2 0 2 2 0 8 0 unpcb 120 7447 0 7432 17 16 1 3 0 8 0 syncache 264 38 0 38 18 18 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 187 0 187 10 9 1 1 0 8 1 tcpcb 544 2557 0 2553 39 38 1 15 0 8 0 ipq 40 79 0 79 16 16 0 1 0 8 0 ipqe 40 1257 0 1257 16 16 0 1 0 8 0 inpcb 280 10332 0 10325 41 40 1 9 0 8 0 rttmr 72 12 0 12 7 7 0 1 0 8 0 ip6q 72 3 0 3 2 2 0 1 0 8 0 ip6af 40 8 0 8 2 2 0 1 0 8 0 nd6 48 71 0 71 4 4 0 1 0 8 0 pkpcb 40 12 0 12 3 3 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 292 0 292 27 27 0 1 0 8 0 art_heap8 4096 24 0 23 11 10 1 3 0 8 0 art_heap4 256 4532 0 4370 50 36 14 17 0 8 0 art_table 32 4556 0 4393 5 3 2 3 0 8 0 art_node 16 1789 0 1763 1 0 1 1 0 8 0 sysvmsgpl 40 60 0 20 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 4129 0 4119 1 0 1 1 0 8 0 shmpl 112 393 0 265 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 14044 0 12640 46 0 46 46 0 8 0 ffsino 240 14044 0 12640 84 0 84 84 0 8 0 nchpl 144 28046 0 27553 60 41 19 60 0 8 0 uvmvnodes 72 7003 0 0 128 0 128 128 0 8 0 vnodes 208 7003 0 0 369 0 369 369 0 8 0 namei 1024 101608 0 101608 5 4 1 1 0 8 1 vcpupl 1984 43 0 1 6 0 6 6 0 8 0 vmpool 520 62 0 20 4 1 3 3 0 8 0 scxspl 192 89581 0 89580 33 32 1 7 0 8 0 plimitpl 152 577 0 571 1 0 1 1 0 8 0 sigapl 432 9255 0 9244 2 0 2 2 0 8 0 futexpl 56 289219 0 289219 4 4 0 1 0 8 0 knotepl 112 3374 0 3359 3 2 1 2 0 8 0 kqueuepl 104 5838 0 5836 7 6 1 4 0 8 0 pipepl 112 22232 0 22219 27 26 1 4 0 8 0 fdescpl 424 9256 0 9244 2 0 2 2 0 8 0 filepl 120 98799 0 98727 64 61 3 11 0 8 0 lockfpl 104 2360 0 2359 1 0 1 1 0 8 0 lockfspl 48 828 0 827 1 0 1 1 0 8 0 sessionpl 112 49 0 40 1 0 1 1 0 8 0 pgrppl 48 119 0 110 1 0 1 1 0 8 0 ucredpl 96 9428 0 9419 1 0 1 1 0 8 0 zombiepl 144 9249 0 9249 1 0 1 1 0 8 1 processpl 864 9277 0 9249 4 0 4 4 0 8 0 procpl 632 19576 0 19542 4 0 4 4 0 8 0 sosppl 128 137 0 137 21 21 0 1 0 8 0 sockpl 384 18917 0 18893 85 81 4 15 0 8 0 mcl64k 65536 1152 0 1152 74 67 7 33 0 8 7 mcl16k 16384 153 0 153 29 29 0 1 0 8 0 mcl12k 12288 234 0 234 16 16 0 1 0 8 0 mcl9k 9216 110 0 110 25 25 0 1 0 8 0 mcl8k 8192 461 0 461 11 11 0 1 0 8 0 mcl4k 4096 1302 0 1302 6 6 0 1 0 8 0 mcl2k2 2112 77 0 77 22 22 0 1 0 8 0 mcl2k 2048 84445 0 84394 55 47 8 14 0 8 0 mtagpl 80 597 0 597 13 13 0 6 0 8 0 mbufpl 256 231896 0 231793 119 98 21 54 0 8 0 bufpl 256 31249 0 23085 513 2 511 511 0 8 0 anonpl 16 884906 0 869217 281 182 99 101 0 62 13 amapchunkpl 152 39945 0 39831 88 72 16 20 0 158 10 amappl16 192 48590 0 47427 277 217 60 71 0 8 0 amappl15 184 675 0 675 8 7 1 1 0 8 1 amappl14 176 2145 0 2142 1 0 1 1 0 8 0 amappl13 168 1578 0 1578 7 7 0 1 0 8 0 amappl12 160 1228 0 1224 1 0 1 1 0 8 0 amappl11 152 788 0 777 1 0 1 1 0 8 0 amappl10 144 1797 0 1795 1 0 1 1 0 8 0 amappl9 136 1408 0 1403 1 0 1 1 0 8 0 amappl8 128 960 0 905 3 1 2 2 0 8 0 amappl7 120 1946 0 1938 1 0 1 1 0 8 0 amappl6 112 752 0 738 1 0 1 1 0 8 0 amappl5 104 1724 0 1712 1 0 1 1 0 8 0 amappl4 96 9916 0 9888 1 0 1 1 0 8 0 amappl3 88 2263 0 2255 1 0 1 1 0 8 0 amappl2 80 71704 0 71647 3 1 2 3 0 8 0 amappl1 72 166583 0 166204 27 18 9 20 0 8 0 amappl 80 20341 0 20288 3 1 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 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 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 394 0 265 3 0 3 3 0 8 0 uaddrrnd 24 9318 0 9244 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9318 0 9244 1 0 1 1 0 8 0 vmmpekpl 168 83618 0 83587 2 0 2 2 0 8 0 vmmpepl 168 1083006 0 1080814 509 363 146 151 0 357 36 vmsppl 272 9255 0 9244 5 4 1 2 0 8 0 pdppl 4096 18642 0 18570 13 3 10 10 0 8 0 pvpl 32 2372533 0 2354856 685 375 310 326 0 265 121 pmappl 200 9317 0 9264 3 0 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1019 0 357 20 0 20 20 0 8 0