lscpu segfaults on IBM Power8 - Assertion failed
This document (000019784) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 15 SP1
SUSE Linux Enterprise Server 12 SP5
Situation
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
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 304
On-line CPU(s) list: 0-303
Thread(s) per core: 8
Core(s) per socket: 9
Socket(s): 4
NUMA node(s): 5
Model: 2.0 (pvr 004d 0200)
Model name: POWER8 (architected), altivec supported
Hypervisor vendor: pHyp
[...]
Resolution
Cause
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.
Disclaimer
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: 13-Nov-2020
- Modified Date:02-Mar-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com