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 *469442 88022 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(ffffffff821e4c09,ffffffff821fa562,149,ffffffff821c35bf) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd80274e9100) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd80274e9100) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd80274e9100) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd80274e9100) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803ebe0280,2,fffffd803f7c6cc0,ffff8000ffff8c60,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e4324b8,0,4,fffffd803f7c6cc0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149187c8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803a585828,fffffd803ebe0280,ffff8000149188c8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8c60,b,c002bf5580,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014918a40) 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: 0xc0027b9658, 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(ffffffff821e4c09,ffffffff821fa562,149,ffffffff821c35bf) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd80274e9100) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd80274e9100) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd80274e9100) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd80274e9100) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803ebe0280,2,fffffd803f7c6cc0,ffff8000ffff8c60,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e4324b8,0,4,fffffd803f7c6cc0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149187c8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803a585828,fffffd803ebe0280,ffff8000149188c8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8c60,b,c002bf5580,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014918a40) 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: 0xc0027b9658, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149182a0 rbx 0xffff800014918350 rdx 0x2 rcx 0 rax 0 r8 0xffff800014918260 r9 0x1 r10 0 r11 0x83f0bb0cc86b6688 r12 0x3000000008 r13 0xffff8000149182b0 r14 0x100 r15 0x1 rip 0xffffffff8201d2f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014918290 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=469442 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8770,0xffff8000ffff2790 process=0xffff8000148a2018 user=0xffff800014913000, vmspace=0xfffffd803f013440 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 94962 406380 0 0 3 0x14200 acct acct 99412 189430 0 0 3 0x14200 bored sosplice 88022 368280 21452 0 3 0x82 thrsleep syz-fuzzer 88022 304210 21452 0 3 0x4000082 nanosleep syz-fuzzer 88022 27518 21452 0 3 0x4000082 thrsleep syz-fuzzer 88022 456619 21452 0 3 0x4000082 thrsleep syz-fuzzer 88022 475835 21452 0 3 0x4000082 thrsleep syz-fuzzer 88022 200925 21452 0 3 0x4000082 thrsleep syz-fuzzer 88022 216698 21452 0 3 0x4000082 thrsleep syz-fuzzer *88022 469442 21452 0 7 0x4000002 syz-fuzzer 21452 348212 86412 0 3 0x10008a pause ksh 86412 366869 49079 0 3 0x92 select sshd 36118 41665 1 0 3 0x100083 ttyopn getty 49079 316090 1 0 3 0x80 select sshd 23838 468069 13187 73 3 0x100010 ffs_fsync syslogd 13187 500002 1 0 3 0x100082 netio syslogd 78392 351335 0 0 3 0x14200 pgzero zerothread 84624 394604 0 0 3 0x14200 aiodoned aiodoned 51111 141238 0 0 3 0x14200 syncer update 81007 300196 0 0 3 0x14200 cleaner cleaner 49368 266866 0 0 3 0x14200 reaper reaper 46377 242842 0 0 3 0x14200 pgdaemon pagedaemon 63424 116852 0 0 3 0x14200 bored crynlk 38488 154052 0 0 3 0x14200 bored crypto 33392 120000 0 0 3 0x40014200 acpi0 acpi0 92164 122345 0 0 3 0x14200 bored softnet 60328 420276 0 0 3 0x14200 bored systqmp 26093 151409 0 0 3 0x14200 bored systq 92724 240227 0 0 3 0x40014200 bored softclock 67615 226106 0 0 3 0x40014200 idle0 3762 158021 0 0 3 0x14200 bored smr 1 234079 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 9592 6308K 7139K 78643K 18306 0 0 pcb 13 10K 12K 78643K 756 0 0 rtable 84 11K 13K 78643K 2195 0 0 ifaddr 84 18K 21K 78643K 804 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 185 0 0 iov 0 0K 28K 78643K 6250 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 4189 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 47 0 0 VM map 19 4K 4K 78643K 37 0 0 sem 12 0K 1K 78643K 1330 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 3483 0 0 sigio 0 0K 0K 78643K 44 0 0 proc 45 30K 63K 78643K 1480 0 0 subproc 0 0K 2K 78643K 365 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 259 0 0 in_multi 12 0K 2K 78643K 383 0 0 ether_multi 1 0K 0K 78643K 27 0 0 mrt 1 0K 0K 78643K 27 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 174 768K 768K 78643K 174 0 0 exec 0 0K 1K 78643K 870 0 0 pfkey data 0 0K 0K 78643K 2 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 113 151K 170K 78643K 9567 0 0 UVM aobj 130 4K 4K 78643K 138 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 713 0 0 NDP 22 0K 1K 78643K 240 0 0 temp 207 3539K 4181K 78643K 193942 0 0 kqueue 0 0K 0K 78643K 50 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 90 0 88 1 0 1 1 0 8 0 rtpcb 80 323 0 323 2 2 0 1 0 8 0 rtentry 112 427 0 403 2 0 2 2 0 8 0 unpcb 120 1832 0 1822 2 1 1 2 0 8 0 syncache 264 23 0 23 10 10 0 1 0 8 0 tcpqe 32 3923 0 3923 6 6 0 1 0 8 0 tcpcb 544 2755 0 2751 31 30 1 14 0 8 0 ipq 40 27 0 27 9 9 0 1 0 8 0 ipqe 40 503 0 503 9 9 0 1 0 8 0 inpcb 280 5548 0 5544 31 30 1 9 0 8 0 rttmr 72 9 0 9 6 6 0 1 0 8 0 ip6q 72 5 0 5 4 4 0 1 0 8 0 ip6af 40 12 0 12 3 3 0 1 0 8 0 nd6 48 50 0 50 5 4 1 1 0 8 1 pkpcb 40 24 0 24 7 7 0 1 0 8 0 swfcl 56 3 0 0 1 0 1 1 0 8 0 ppxss 1128 129 0 129 11 11 0 1 0 8 0 art_heap8 4096 21 0 20 12 11 1 3 0 8 0 art_heap4 256 1743 0 1621 37 25 12 15 0 8 3 art_table 32 1764 0 1641 2 0 2 2 0 8 0 art_node 16 423 0 401 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 7 2 1 1 1 0 8 0 semupl 112 13 0 13 1 1 0 1 0 8 0 semapl 112 1326 0 1316 1 0 1 1 0 8 0 shmpl 112 136 0 8 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6852 0 5449 46 0 46 46 0 8 0 ffsino 240 6852 0 5449 83 0 83 83 0 8 0 nchpl 144 13785 0 12158 61 0 61 61 0 8 0 uvmvnodes 72 7869 0 0 144 0 144 144 0 8 0 vnodes 208 7869 0 0 415 0 415 415 0 8 0 namei 1024 45624 0 45624 4 3 1 1 0 8 1 vcpupl 1984 17 0 0 3 0 3 3 0 8 0 vmpool 520 35 0 18 4 2 2 2 0 8 0 scsiplug 64 4 0 4 3 3 0 1 0 8 0 scxspl 192 41550 0 41549 22 21 1 7 0 8 0 plimitpl 152 327 0 323 1 0 1 1 0 8 0 sigapl 432 3597 0 3589 2 0 2 2 0 8 0 futexpl 56 107903 0 107903 2 2 0 1 0 8 0 knotepl 112 984 0 963 1 0 1 1 0 8 0 kqueuepl 104 1293 0 1291 4 3 1 4 0 8 0 pipepl 112 1982 0 1971 9 8 1 2 0 8 0 fdescpl 424 3598 0 3589 2 0 2 2 0 8 0 filepl 120 33515 0 33470 20 17 3 10 0 8 0 lockfpl 104 1527 0 1527 1 1 0 1 0 8 0 lockfspl 48 470 0 470 1 1 0 1 0 8 0 sessionpl 112 36 0 30 1 0 1 1 0 8 0 pgrppl 48 84 0 78 1 0 1 1 0 8 0 ucredpl 96 3719 0 3711 1 0 1 1 0 8 0 zombiepl 144 3589 0 3589 3 2 1 1 0 8 1 processpl 864 3614 0 3589 4 0 4 4 0 8 0 procpl 632 7879 0 7847 5 1 4 5 0 8 0 sosppl 128 48 0 48 11 11 0 1 0 8 0 sockpl 384 7760 0 7746 44 41 3 13 0 8 0 mcl64k 65536 575 0 575 33 33 0 29 0 8 0 mcl16k 16384 52 0 52 14 14 0 1 0 8 0 mcl12k 12288 105 0 105 10 10 0 1 0 8 0 mcl9k 9216 76 0 76 13 13 0 1 0 8 0 mcl8k 8192 177 0 177 5 5 0 1 0 8 0 mcl4k 4096 397 0 397 4 4 0 1 0 8 0 mcl2k2 2112 32 0 32 14 14 0 1 0 8 0 mcl2k 2048 67301 0 67262 16 10 6 14 0 8 0 mtagpl 80 185 0 185 4 3 1 1 0 8 1 mbufpl 256 143002 0 142946 126 119 7 33 0 8 0 bufpl 256 21237 0 13367 492 0 492 492 0 8 0 anonpl 16 433779 0 417721 181 97 84 85 0 62 12 amapchunkpl 152 18913 0 18820 74 59 15 15 0 158 10 amappl16 192 21076 0 20126 148 98 50 61 0 8 0 amappl15 184 65 0 65 5 5 0 1 0 8 0 amappl14 176 1138 0 1135 2 1 1 1 0 8 0 amappl13 168 357 0 357 4 4 0 1 0 8 0 amappl12 160 854 0 852 1 0 1 1 0 8 0 amappl11 152 270 0 265 1 0 1 1 0 8 0 amappl10 144 186 0 186 5 4 1 1 0 8 1 amappl9 136 961 0 957 1 0 1 1 0 8 0 amappl8 128 524 0 492 4 2 2 2 0 8 0 amappl7 120 287 0 279 1 0 1 1 0 8 0 amappl6 112 248 0 235 1 0 1 1 0 8 0 amappl5 104 1204 0 1197 1 0 1 1 0 8 0 amappl4 96 3376 0 3352 1 0 1 1 0 8 0 amappl3 88 1431 0 1420 1 0 1 1 0 8 0 amappl2 80 26895 0 26851 4 2 2 3 0 8 0 amappl1 72 76760 0 76410 30 21 9 20 0 8 1 amappl 80 8438 0 8404 4 3 1 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 137 0 8 4 1 3 3 0 8 0 uaddrrnd 24 3633 0 3589 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3633 0 3589 1 0 1 1 0 8 0 vmmpekpl 168 23620 0 23594 2 0 2 2 0 8 0 vmmpepl 168 438038 0 436312 298 193 105 127 0 357 14 vmsppl 272 3597 0 3589 3 2 1 2 0 8 0 pdppl 4096 7272 0 7231 12 5 7 7 0 8 0 pvpl 32 1228217 0 1209421 519 233 286 301 0 265 123 pmappl 200 3632 0 3607 3 1 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 877 0 263 19 1 18 19 0 8 0