lscpu segfaults on IBM Power8 - Assertion failed
This document (000019784) is provided subject to the disclaimer at the end of this document.
SUSE Linux Enterprise Server 15 SP1
SUSE Linux Enterprise Server 12 SP5
The command 'lscpu' displaying information about the CPU, segfaults and dumps a core on IBM Power8.
The problem only occurs if 'lscpu' is run as user 'root':
<hostname>:~ # lscpu
lscpu: sys-utils/lscpu.c:362: read_physical_info_powerpc: Assertion `ntypes <= 1' failed. Aborted (core dumped)
When run as regular user the expected output is produced:
<hostname>:~ # su - <username>
<hostname> <username> 34% lscpu
Byte Order: Little Endian
On-line CPU(s) list: 0-303
Thread(s) per core: 8
Core(s) per socket: 9
NUMA node(s): 5
Model: 2.0 (pvr 004d 0200)
Model name: POWER8 (architected), altivec supported
Hypervisor vendor: pHyp
The assert causing the abort is excessive, since the information isn't critical, and ntypes greater than 1 is valid in some hardware configurations, and an assert() on the value isn't necessary.
The problem didn't occur if lscpu is run as user, because rtas_get_sysparm is never called to collect this information.
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000019784
- Creation Date: 02-Mar-2021
- Modified Date:02-Mar-2021
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com