Skip to content

lscpu: Panic when cpu_dir/topology/physical_package_id is -1 #495

@OPNA2608

Description

@OPNA2608
thread 'main' (638592) panicked at src/uu/lscpu/src/sysfs.rs:57:18:
called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
> cat /sys/devices/system/cpu/online 
0-1
> cat /sys/devices/system/cpu/cpu0/topology/physical_package_id 
-1
> cat /sys/devices/system/cpu/cpu1/topology/physical_package_id
-1

Regular lscpu:

> lscpu
Architecture:                ppc64
  CPU op-mode(s):            32-bit, 64-bit
  Byte Order:                Big Endian
CPU(s):                      2
  On-line CPU(s) list:       0,1
Model name:                  PPC970FX, altivec supported
  Model:                     3.0 (pvr 003c 0300)
  Thread(s) per core:        1
  Core(s) per socket:        2
  Socket(s):                 1
[...]
NUMA:                        
  NUMA node(s):              1
  NUMA node0 CPU(s):         0,1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions