Skip to content

lscpu: panic on aarch64-linux #494

@RossComputerGuy

Description

@RossComputerGuy

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 93a60ee, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions