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 *248354 57776 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(ffffffff821e3863,ffffffff821f70fe,149,ffffffff821c01b6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8037447e00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8037447e00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8037447e00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8037447e00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802f576dd8,2,fffffd803f7c6960,ffff8000149149f8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80360c3e18,0,4,fffffd803f7c6960) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800017b56908) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036720900,fffffd802f576dd8,ffff800017b56a08) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000149149f8,a,c002074100,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800017b56b80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,8) at Xsyscall+0x128 end of kernel end trace frame: 0xc00351f978, count: 1 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(ffffffff821e3863,ffffffff821f70fe,149,ffffffff821c01b6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8037447e00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8037447e00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8037447e00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8037447e00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802f576dd8,2,fffffd803f7c6960,ffff8000149149f8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80360c3e18,0,4,fffffd803f7c6960) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800017b56908) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8036720900,fffffd802f576dd8,ffff800017b56a08) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000149149f8,a,c002074100,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800017b56b80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,8) at Xsyscall+0x128 end of kernel end trace frame: 0xc00351f978, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800017b563e0 rbx 0xffff800017b56490 rdx 0x2 rcx 0 rax 0 r8 0xffff800017b563a0 r9 0x1 r10 0 r11 0x8d07062faaed5811 r12 0x3000000008 r13 0xffff800017b563f0 r14 0x100 r15 0x1 rip 0xffffffff8173c158 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800017b563d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=248354 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014914780,0xffff800014915660 process=0xffff8000148a26d8 user=0xffff800017b51000, vmspace=0xfffffd803f013000 estcpu=36, cpticks=5, pctcpu=0.13 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 15622 475494 57776 0 3 0x82 piperd syz-executor.1 28031 76719 1 0 3 0x100083 ttyin getty 9117 226541 0 0 3 0x14200 acct acct 43298 122718 0 0 3 0x14200 bored sosplice 57776 165690 79062 0 3 0x82 thrsleep syz-fuzzer 57776 298504 79062 0 3 0x4000082 nanosleep syz-fuzzer 57776 503400 79062 0 3 0x4000082 thrsleep syz-fuzzer 57776 76524 79062 0 3 0x4000082 thrsleep syz-fuzzer 57776 165365 79062 0 3 0x4000082 thrsleep syz-fuzzer 57776 189903 79062 0 3 0x4000082 thrsleep syz-fuzzer 57776 369438 79062 0 3 0x4000082 thrsleep syz-fuzzer *57776 248354 79062 0 7 0x4000002 syz-fuzzer 79062 274509 5978 0 3 0x10008a pause ksh 5978 114279 61693 0 3 0x92 select sshd 61693 288056 1 0 3 0x80 select sshd 18391 438250 22174 73 3 0x100090 kqread syslogd 22174 7045 1 0 3 0x100082 netio syslogd 79391 116251 1 77 3 0x100090 poll dhclient 97062 337693 1 0 3 0x80 poll dhclient 55989 159613 0 0 3 0x14200 pgzero zerothread 31118 101923 0 0 3 0x14200 aiodoned aiodoned 58168 488841 0 0 3 0x14200 syncer update 977 434873 0 0 3 0x14200 cleaner cleaner 90836 4078 0 0 3 0x14200 reaper reaper 80483 394660 0 0 3 0x14200 pgdaemon pagedaemon 50860 355328 0 0 3 0x14200 bored crynlk 95536 24129 0 0 3 0x14200 bored crypto 27577 57159 0 0 3 0x40014200 acpi0 acpi0 66873 369758 0 0 3 0x14200 bored softnet 35016 272331 0 0 3 0x14200 bored systqmp 6949 463676 0 0 3 0x14200 bored systq 83728 272300 0 0 3 0x40014200 bored softclock 1227 243736 0 0 3 0x40014200 idle0 5326 3667 0 0 3 0x14200 bored smr 1 103646 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 9581 6695K 8604K 78643K 19665 0 0 pcb 13 8K 8K 78643K 349 0 0 rtable 101 8K 8K 78643K 1172 0 0 ifaddr 73 16K 17K 78643K 329 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 119 0 0 iov 0 0K 32K 78643K 473 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1263 79K 80K 78643K 4035 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 24 0 0 VM map 14 3K 3K 78643K 22 0 0 sem 12 0K 0K 78643K 348 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 1842 0 0 sigio 0 0K 0K 78643K 29 0 0 proc 49 38K 55K 78643K 992 0 0 subproc 16 1K 2K 78643K 187 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 146 0 0 in_multi 22 1K 2K 78643K 211 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 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 124 144K 163K 78643K 5379 0 0 UVM aobj 94 3K 3K 78643K 110 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 353 0 0 NDP 19 0K 0K 78643K 102 0 0 temp 189 3539K 3614K 78643K 60066 0 0 kqueue 0 0K 0K 78643K 17 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 43 0 39 1 0 1 1 0 8 0 rtpcb 80 131 0 129 1 0 1 1 0 8 0 rtentry 112 218 0 184 2 0 2 2 0 8 0 unpcb 120 1986 0 1975 7 6 1 3 0 8 0 syncache 264 21 0 21 5 5 0 1 0 8 0 tcpqe 32 60 0 60 2 2 0 1 0 8 0 tcpcb 544 616 0 612 2 1 1 2 0 8 0 ipq 40 16 0 16 7 7 0 1 0 8 0 ipqe 40 82 0 82 7 7 0 1 0 8 0 inpcb 280 1777 0 1770 6 5 1 2 0 8 0 rttmr 72 4 0 4 2 2 0 1 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 6 0 6 1 1 0 1 0 8 0 nd6 48 26 0 24 4 3 1 1 0 8 0 pkpcb 40 10 0 10 3 3 0 1 0 8 0 ppxss 1128 30 0 30 4 4 0 1 0 8 0 art_heap8 4096 7 0 6 4 3 1 4 0 8 0 art_heap4 256 849 0 676 26 13 13 15 0 8 0 art_table 32 856 0 682 2 0 2 2 0 8 0 art_node 16 217 0 186 1 0 1 1 0 8 0 sysvmsgpl 40 197 0 181 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 346 0 336 1 0 1 1 0 8 0 shmpl 112 108 0 16 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4246 0 2853 46 0 46 46 0 8 0 ffsino 240 4246 0 2853 83 0 83 83 0 8 0 nchpl 144 7919 0 6314 61 0 61 61 0 8 0 uvmvnodes 72 6235 0 0 114 0 114 114 0 8 0 vnodes 208 6235 0 0 329 0 329 329 0 8 0 namei 1024 26534 0 26534 2 1 1 1 0 8 1 vcpupl 1984 13 0 1 2 0 2 2 0 8 0 vmpool 520 20 0 8 1 0 1 1 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 27252 0 27252 15 14 1 7 0 8 1 plimitpl 152 187 0 181 1 0 1 1 0 8 0 sigapl 432 1988 0 1977 2 0 2 2 0 8 0 futexpl 56 56802 0 56802 3 2 1 1 0 8 1 knotepl 112 525 0 506 1 0 1 1 0 8 0 kqueuepl 104 439 0 437 1 0 1 1 0 8 0 pipepl 112 2294 0 2279 10 8 2 3 0 8 1 fdescpl 424 1989 0 1977 2 0 2 2 0 8 0 filepl 120 19397 0 19322 22 17 5 10 0 8 2 lockfpl 104 670 0 669 1 0 1 1 0 8 0 lockfspl 48 228 0 227 1 0 1 1 0 8 0 sessionpl 112 28 0 19 1 0 1 1 0 8 0 pgrppl 48 588 0 579 1 0 1 1 0 8 0 ucredpl 96 2010 0 2002 1 0 1 1 0 8 0 zombiepl 144 1977 0 1977 2 1 1 1 0 8 1 processpl 864 2005 0 1977 4 0 4 4 0 8 0 procpl 632 4167 0 4132 4 0 4 4 0 8 0 sosppl 128 16 0 16 4 4 0 1 0 8 0 sockpl 384 3926 0 3906 19 15 4 9 0 8 1 mcl64k 65536 671 0 671 65 60 5 65 0 8 5 mcl16k 16384 22 0 22 3 3 0 1 0 8 0 mcl12k 12288 53 0 53 5 4 1 1 0 8 1 mcl9k 9216 28 0 28 6 5 1 1 0 8 1 mcl8k 8192 89 0 89 2 1 1 1 0 8 1 mcl4k 4096 208 0 208 3 2 1 1 0 8 1 mcl2k2 2112 16 0 16 5 5 0 1 0 8 0 mcl2k 2048 69392 0 69347 18 11 7 15 0 8 0 mtagpl 80 74 0 74 4 3 1 1 0 8 1 mbufpl 256 129932 0 129849 77 64 13 41 0 8 2 bufpl 256 15339 0 9102 390 0 390 390 0 8 0 anonpl 16 256242 0 241049 135 39 96 96 0 62 15 amapchunkpl 152 10998 0 10891 41 25 16 16 0 158 10 amappl16 192 11892 0 10814 121 65 56 67 0 8 0 amappl15 184 283 0 283 2 2 0 1 0 8 0 amappl14 176 238 0 234 2 1 1 1 0 8 0 amappl13 168 165 0 165 1 1 0 1 0 8 0 amappl12 160 108 0 103 1 0 1 1 0 8 0 amappl11 152 214 0 203 1 0 1 1 0 8 0 amappl10 144 446 0 446 3 2 1 1 0 8 1 amappl9 136 1136 0 1130 1 0 1 1 0 8 0 amappl8 128 683 0 647 2 0 2 2 0 8 0 amappl7 120 521 0 513 1 0 1 1 0 8 0 amappl6 112 222 0 210 1 0 1 1 0 8 0 amappl5 104 325 0 315 1 0 1 1 0 8 0 amappl4 96 2209 0 2181 1 0 1 1 0 8 0 amappl3 88 513 0 507 1 0 1 1 0 8 0 amappl2 80 14786 0 14726 4 2 2 3 0 8 0 amappl1 72 45067 0 44680 26 16 10 20 0 8 0 amappl 80 4570 0 4527 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 109 0 16 2 0 2 2 0 8 0 uaddrrnd 24 2009 0 1977 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2009 0 1977 1 0 1 1 0 8 0 vmmpekpl 168 18254 0 18222 2 0 2 2 0 8 0 vmmpepl 168 246796 0 244802 223 87 136 146 0 357 34 vmsppl 272 1988 0 1977 4 2 2 2 0 8 1 pdppl 4096 4024 0 3982 9 2 7 7 0 8 0 pvpl 32 686929 0 669552 377 78 299 318 0 265 114 pmappl 200 2008 0 1985 2 0 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 693 0 165 18 1 17 18 0 8 0