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 *422364 87967 0 0x2 0x4000000 0 syz-fuzzer 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(ffffffff821e60c6,ffffffff821f7b00,149,ffffffff821c0f60) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802ff57000) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802ff57000) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802ff57000) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802ff57000) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803be979d8,2,ffffffffffffffff,ffff8000ffff9150,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802dc73968,0,0,ffffffffffffffff) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_inactive(ffff80001490a4d8) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd803be979d8,ffff8000ffff9150) at VOP_INACTIVE+0xaa sys/kern/vfs_vops.c:573 vput(fffffd803be979d8) at vput+0xae sys/kern/vfs_subr.c:768 ufs_remove(ffff80001490a5d8) at ufs_remove+0x137 sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd803be97c48,fffffd803be979d8,ffff80001490a6d8) at VOP_REMOVE+0x11f sys/kern/vfs_vops.c:379 end trace frame: 0xffff80001490a770, 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(ffffffff821e60c6,ffffffff821f7b00,149,ffffffff821c0f60) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802ff57000) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802ff57000) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802ff57000) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802ff57000) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803be979d8,2,ffffffffffffffff,ffff8000ffff9150,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802dc73968,0,0,ffffffffffffffff) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_inactive(ffff80001490a4d8) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd803be979d8,ffff8000ffff9150) at VOP_INACTIVE+0xaa sys/kern/vfs_vops.c:573 vput(fffffd803be979d8) at vput+0xae sys/kern/vfs_subr.c:768 ufs_remove(ffff80001490a5d8) at ufs_remove+0x137 sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd803be97c48,fffffd803be979d8,ffff80001490a6d8) at VOP_REMOVE+0x11f sys/kern/vfs_vops.c:379 dounlinkat(ffff8000ffff9150,c,c00289c320,0) at dounlinkat+0x195 sys/kern/vfs_syscalls.c:1821 syscall(ffff80001490a850) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc002c834c8, count: -17 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014909fc0 rbx 0xffff80001490a070 rdx 0x2 rcx 0 rax 0 r8 0xffff800014909f80 r9 0x1 r10 0 r11 0xca4dba7b382808d4 r12 0x3000000008 r13 0xffff800014909fd0 r14 0x100 r15 0x1 rip 0xffffffff811e4308 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014909fb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=422364 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=71, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff53d0,0xffff8000ffff89f8 process=0xffff8000148a2d98 user=0xffff800014905000, vmspace=0xfffffd803f014cc0 estcpu=21, cpticks=4, pctcpu=0.9 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 97491 398871 0 0 3 0x14200 bored sosplice 87967 245826 59092 0 3 0x82 thrsleep syz-fuzzer 87967 35545 59092 0 3 0x4000082 nanosleep syz-fuzzer 87967 386857 59092 0 3 0x4000082 thrsleep syz-fuzzer 87967 346084 59092 0 3 0x4000082 thrsleep syz-fuzzer 87967 309873 59092 0 3 0x4000082 thrsleep syz-fuzzer *87967 422364 59092 0 7 0x4000002 syz-fuzzer 87967 428544 59092 0 3 0x4000082 thrsleep syz-fuzzer 87967 192449 59092 0 3 0x4000082 thrsleep syz-fuzzer 59092 366226 97746 0 3 0x10008a pause ksh 97746 375520 6407 0 3 0x92 select sshd 8083 340647 1 0 3 0x100083 ttyin getty 6407 371674 1 0 3 0x80 select sshd 28163 484148 52514 73 3 0x100010 biowait syslogd 52514 484606 1 0 3 0x100082 netio syslogd 36056 242872 1 77 3 0x100090 poll dhclient 82247 262482 1 0 3 0x80 poll dhclient 93082 225489 0 0 3 0x14200 pgzero zerothread 30246 49531 0 0 3 0x14200 aiodoned aiodoned 10013 443912 0 0 3 0x14200 syncer update 84807 28577 0 0 3 0x14200 cleaner cleaner 23536 203007 0 0 3 0x14200 reaper reaper 80595 265460 0 0 3 0x14200 pgdaemon pagedaemon 87405 153026 0 0 3 0x14200 bored crynlk 57731 411493 0 0 3 0x14200 bored crypto 4925 264908 0 0 3 0x40014200 acpi0 acpi0 40920 238381 0 0 3 0x14200 bored softnet 98389 46927 0 0 3 0x14200 bored systqmp 63198 210273 0 0 3 0x14200 bored systq 52899 163993 0 0 3 0x40014200 bored softclock 39250 41658 0 0 3 0x40014200 idle0 52248 97930 0 0 3 0x14200 bored smr 1 271808 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 9600 6522K 14948K 78643K 35098 0 0 pcb 13 10K 12K 78643K 892 0 0 rtable 84 11K 12K 78643K 4638 0 0 ifaddr 87 19K 22K 78643K 731 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 275 0 0 iov 0 0K 24K 78643K 1453 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1227 77K 77K 78643K 8725 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 68 0 0 VM map 43 10K 10K 78643K 60 0 0 sem 12 0K 0K 78643K 1062 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 4824 0 0 sigio 0 0K 0K 78643K 38 0 0 proc 49 38K 62K 78643K 1796 0 0 subproc 0 0K 2K 78643K 482 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 413 0 0 in_multi 16 1K 2K 78643K 470 0 0 ether_multi 1 0K 0K 78643K 40 0 0 mrt 0 0K 0K 78643K 19 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 1067 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 157 315K 334K 78643K 12770 0 0 UVM aobj 130 9K 9K 78643K 135 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 912 0 0 NDP 21 0K 1K 78643K 230 0 0 temp 202 3543K 4171K 78643K 173891 0 0 kqueue 0 0K 0K 78643K 23 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 297 0 293 1 0 1 1 0 8 0 rtpcb 80 464 0 462 1 0 1 1 0 8 0 rtentry 112 1076 0 1050 2 0 2 2 0 8 0 unpcb 120 1860 0 1849 1 0 1 1 0 8 0 syncache 264 32 0 32 12 12 0 1 0 8 0 tcpqe 32 75 0 75 7 7 0 1 0 8 0 tcpcb 544 2160 0 2156 45 44 1 15 0 8 0 ipq 40 40 0 40 15 15 0 1 0 8 0 ipqe 40 872 0 872 15 15 0 1 0 8 0 inpcb 280 5554 0 5547 44 43 1 9 0 8 0 rttmr 72 6 0 6 5 5 0 1 0 8 0 ip6q 72 6 0 6 3 3 0 1 0 8 0 ip6af 40 18 0 18 3 3 0 1 0 8 0 nd6 48 61 0 61 2 2 0 1 0 8 0 pkpcb 40 23 0 23 8 8 0 1 0 8 0 swfcl 56 6 0 0 1 0 1 1 0 8 0 ppxss 1128 83 0 83 15 15 0 1 0 8 0 art_heap8 4096 8 0 7 8 7 1 3 0 8 0 art_heap4 256 3213 0 3083 31 21 10 15 0 8 0 art_table 32 3221 0 3090 2 0 2 2 0 8 0 art_node 16 1070 0 1046 1 0 1 1 0 8 0 sysvmsgpl 40 40 0 28 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1060 0 1050 1 0 1 1 0 8 0 shmpl 112 133 0 5 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9651 0 8257 46 0 46 46 0 8 0 ffsino 240 9651 0 8257 83 0 83 83 0 8 0 nchpl 144 17831 0 17369 60 40 20 60 0 8 0 uvmvnodes 72 6808 0 0 124 0 124 124 0 8 0 vnodes 208 6808 0 0 359 0 359 359 0 8 0 namei 1024 60119 0 60119 6 5 1 1 0 8 1 vcpupl 1984 42 0 1 6 0 6 6 0 8 0 vmpool 520 58 0 17 3 0 3 3 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 58367 0 58366 25 24 1 6 0 8 0 plimitpl 152 371 0 366 1 0 1 1 0 8 0 sigapl 432 4917 0 4907 2 0 2 2 0 8 0 futexpl 56 150478 0 150478 5 5 0 1 0 8 0 knotepl 112 1895 0 1876 4 3 1 2 0 8 0 kqueuepl 104 2833 0 2831 10 9 1 4 0 8 0 pipepl 112 8108 0 8099 34 33 1 5 0 8 0 fdescpl 424 4918 0 4907 2 0 2 2 0 8 0 filepl 120 47420 0 47365 50 47 3 11 0 8 0 lockfpl 104 7894 0 7893 1 0 1 1 0 8 0 lockfspl 48 3672 0 3671 1 0 1 1 0 8 0 sessionpl 112 43 0 35 1 0 1 1 0 8 0 pgrppl 48 89 0 81 1 0 1 1 0 8 0 ucredpl 96 4936 0 4929 1 0 1 1 0 8 0 zombiepl 144 4910 0 4910 1 0 1 1 0 8 1 processpl 864 4936 0 4910 4 0 4 4 0 8 0 procpl 632 10623 0 10590 4 0 4 4 0 8 0 sosppl 128 55 0 55 18 18 0 1 0 8 0 sockpl 384 7948 0 7928 62 59 3 14 0 8 0 mcl64k 65536 1902 0 1902 194 194 0 33 0 8 0 mcl16k 16384 108 0 108 15 15 0 1 0 8 0 mcl12k 12288 157 0 157 11 11 0 1 0 8 0 mcl9k 9216 65 0 65 18 18 0 1 0 8 0 mcl8k 8192 669 0 669 6 6 0 1 0 8 0 mcl4k 4096 1226 0 1226 7 6 1 1 0 8 1 mcl2k2 2112 36 0 36 15 15 0 1 0 8 0 mcl2k 2048 76347 0 76309 24 18 6 12 0 8 1 mtagpl 80 2900 0 2900 25 25 0 6 0 8 0 mbufpl 256 180764 0 180703 206 196 10 55 0 8 0 bufpl 256 26590 0 18734 500 8 492 492 0 8 0 anonpl 16 657264 0 642238 261 159 102 110 0 62 16 amapchunkpl 152 25128 0 24993 75 58 17 21 0 158 10 amappl16 192 31678 0 30572 278 219 59 78 0 8 3 amappl15 184 82 0 82 5 5 0 1 0 8 0 amappl14 176 1060 0 1056 1 0 1 1 0 8 0 amappl13 168 1075 0 1075 7 7 0 1 0 8 0 amappl12 160 867 0 863 1 0 1 1 0 8 0 amappl11 152 656 0 645 1 0 1 1 0 8 0 amappl10 144 482 0 480 1 0 1 1 0 8 0 amappl9 136 1411 0 1406 1 0 1 1 0 8 0 amappl8 128 961 0 921 2 0 2 2 0 8 0 amappl7 120 600 0 594 1 0 1 1 0 8 0 amappl6 112 628 0 619 1 0 1 1 0 8 0 amappl5 104 1258 0 1248 1 0 1 1 0 8 0 amappl4 96 4712 0 4687 1 0 1 1 0 8 0 amappl3 88 1710 0 1703 1 0 1 1 0 8 0 amappl2 80 38161 0 38105 3 1 2 3 0 8 0 amappl1 72 97039 0 96663 26 16 10 20 0 8 0 amappl 80 11350 0 11293 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 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 134 0 5 3 0 3 3 0 8 0 uaddrrnd 24 4976 0 4907 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4976 0 4907 1 0 1 1 0 8 0 vmmpekpl 168 44651 0 44620 2 0 2 2 0 8 0 vmmpepl 168 604373 0 602311 377 256 121 142 0 357 15 vmsppl 272 4917 0 4907 7 6 1 2 0 8 0 pdppl 4096 9958 0 9889 14 4 10 10 0 8 0 pvpl 32 1673221 0 1656379 591 279 312 326 0 265 131 pmappl 200 4975 0 4924 3 0 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1151 0 532 20 1 19 19 0 8 0