SUSE Support

Here When You Need Us

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 SP2
SUSE Linux Enterprise Server 15 SP1
SUSE Linux Enterprise Server 12 SP5

Situation

Segfaults were seen on IBM Power.

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

The util-linux maintenance update released December/2020 for both SLES15 SP1 and SP2 and SLES12 SP5 includes the patch to resolve the problem.

Cause

The root of the problem is what is returned by rtas_get_sysparm for PROCESSOR_MODULE_INFO and ntypes is optimized out.
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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.