Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`lscpu`: panic on aarch64-linux

未关闭
#494 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
rust

调研方向

从 src/uu/lscpu/src/sysfs.rs 第154行开始,在所描述的 aarch64 QEMU initrd 环境中复现 lscpu。跟踪哪个 sysfs 查找返回 NotFound,并验证其在主机和其他 Arm 系统上的行为。当该 sysfs 条目在 VM 中缺失或不同时,lscpu 不再 panic,即表示完成。

由索引模型根据 Issue 内容生成。

描述

I'm running uutils-util-linux inside of an initrd in an Arm QEMU VM on an Ampere Altra host. util-linux is built from commit 93a60ee39a2f697a5a21a631de1101cd1d36ba67, lscpu fails with a panic:

$ lscpu

thread 'main' (161) panicked at src/uu/lscpu/src/sysfs.rs:154:71:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

/sys is mounted, I'm not sure what the problem is. lscpu works on my host and other Arm systems. This is how I have QEMU configured:

qemu-system-aarch64 -drive if=pflash,format=raw,unit=0,readonly=on,file=$(nix build nixpkgs#OVMF.fd --no-link --print-out-paths)/FV/AAVMF_CODE.fd -machine virt,gic-version=max,accel=kvm:tcg -cpu max -drive file=fat:rw:fs,format=raw,media=disk -display none -serial stdio -m 128G -smp 16 -device virtio-gpu
主要语言
Rust
星标
224
派生
62
平均合并
8 小时 5 分钟
30 天内合并 PR
16

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

uutils/util-linux 的其他 Issue

查看 uutils/util-linux 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。