Bug 1955250

Summary: Missing memory information
Product: Red Hat Enterprise Linux 8 Reporter: Zane Bitter <zbitter>
Component: lshwAssignee: ltao
Status: CLOSED ERRATA QA Contact: Jeff Bastian <jbastian>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.4CC: jbastian, jkreger, kholtz, ltao, ruyang, rvr
Target Milestone: betaKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lshw-B.02.19.2-6.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2042890 (view as bug list) Environment:
Last Closed: 2021-11-09 19:48:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2042890    

Description Zane Bitter 2021-04-29 18:33:02 UTC
Description of problem:
On machines containing memory banks with less than 32GiB of RAM each with SMBIOS versions 2.7 or later, no memory size information is reported for those banks. This is due to the patch for bug 1882619 causing a regression.

A fix is available upstream: https://github.com/lyonel/lshw/commit/74e23540335254b8fca6a81cc891c52d96937d40

The way lshw is used by ironic-python-agent means that this results in all hardware inspected by OpenStack Ironic reporting a memory size of 0.

Version-Release number of selected component (if applicable):
B.02.19.2-5

How reproducible:
100%

Steps to Reproduce:
1. sudo lshw -short -C memory

Actual results:

H/W path                 Device          Class          Description
===================================================================
/0/3                                     memory         16GiB System Memory
/0/3/0                                   memory         Row of chips LPDDR3 Sync
/0/3/1                                   memory         Row of chips LPDDR3 Sync
/0/7                                     memory         256KiB L1 cache
/0/8                                     memory         1MiB L2 cache
/0/9                                     memory         8MiB L3 cache
/0/b                                     memory         128KiB BIOS
/0/100/1f.2                              memory         Memory controller

Expected results:

H/W path                 Device          Class          Description
===================================================================
/0/3                                     memory         16GiB System Memory
/0/3/0                                   memory         8GiB Row of chips LPDDR3
/0/3/1                                   memory         8GiB Row of chips LPDDR3
/0/7                                     memory         256KiB L1 cache
/0/8                                     memory         1MiB L2 cache
/0/9                                     memory         8MiB L3 cache
/0/b                                     memory         128KiB BIOS
/0/100/1f.2                              memory         Memory controller


Additional info:

Comment 1 ltao 2021-06-08 10:28:44 UTC
Hello Jeff,

Could you please set qa_ack flags for the bug? Thanks!

Thanks,
Tao Liu

Comment 4 Jeff Bastian 2021-06-09 22:54:37 UTC
Pre-testing with lshw-B.02.19.2-6.el8 looks good on an aarch64 server (SMBIOS 3.0) and x86_64 server (SMBIOS 2.7).

:::::::::::::::::::::::
:: Before -- aarch64 ::
:::::::::::::::::::::::

[root@hpe-apollo-cn99xx-14-vm-01 ~]# journalctl --dmesg --no-hostname --output short-monotonic | grep SMBIOS.*present
[    0.205723] kernel: SMBIOS 3.0.0 present.

[root@hpe-apollo-cn99xx-14-vm-01 ~]# rpm -q lshw
lshw-B.02.19.2-5.el8.aarch64

[root@hpe-apollo-cn99xx-14-vm-01 ~]# lshw -short -C memory
H/W path          Device     Class          Description
=======================================================
/0/1000                      memory         5575MiB System Memory
/0/1000/0                    memory         DIMM RAM [empty]
/0/0                         memory         96KiB BIOS

::::::::::::::::::::::
:: After -- aarch64 ::
::::::::::::::::::::::

[root@hpe-apollo-cn99xx-14-vm-01 ~]# rpm -q lshw
lshw-B.02.19.2-6.el8.aarch64

[root@hpe-apollo-cn99xx-14-vm-01 ~]# lshw -short -C memory
H/W path          Device     Class          Description
=======================================================
/0/1000                      memory         6GiB System Memory
/0/1000/0                    memory         6GiB DIMM RAM
/0/0                         memory         96KiB BIOS



::::::::::::::::::::::
:: Before -- x86_64 ::
::::::::::::::::::::::

[root@intel-wildcatpass-01 ~]# journalctl --dmesg --no-hostname --output short-monotonic | grep SMBIOS.*present
[    0.000000] kernel: SMBIOS 2.7 present.

[root@intel-wildcatpass-01 ~]# rpm -q lshw
lshw-B.02.19.2-5.el8.x86_64

[root@intel-wildcatpass-01 ~]# lshw -short -C memory
H/W path         Device      Class          Description
=======================================================
/0/0                         memory         64KiB BIOS
/0/1                         memory         896KiB L1 cache
/0/15                        memory         3584KiB L2 cache
/0/2                         memory         35MiB L3 cache
/0/18                        memory         896KiB L1 cache
/0/19                        memory         3584KiB L2 cache
/0/1a                        memory         35MiB L3 cache
/0/1c                        memory         32GiB System Memory
/0/1c/0                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/1                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/2                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/3                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/4                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/5                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/6                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/7                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/8                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/9                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/a                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/b                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/c                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/d                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/e                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/f                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/10                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/11                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/12                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/13                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/14                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/15                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/16                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/17                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 

:::::::::::::::::::::
:: After -- x86_64 ::
:::::::::::::::::::::

[root@intel-wildcatpass-01 ~]# rpm -q lshw
lshw-B.02.19.2-6.el8.x86_64

[root@intel-wildcatpass-01 ~]# lshw -short -C memory
H/W path         Device      Class          Description
=======================================================
/0/0                         memory         64KiB BIOS
/0/1                         memory         896KiB L1 cache
/0/15                        memory         3584KiB L2 cache
/0/2                         memory         35MiB L3 cache
/0/18                        memory         896KiB L1 cache
/0/19                        memory         3584KiB L2 cache
/0/1a                        memory         35MiB L3 cache
/0/1c                        memory         32GiB System Memory
/0/1c/0                      memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/1                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/2                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/3                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/4                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/5                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/6                      memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/7                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/8                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/9                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/a                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/b                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/c                      memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/d                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/e                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/f                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/10                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/11                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/12                     memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/13                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/14                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/15                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/16                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/17                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5

Comment 10 Jeff Bastian 2021-07-14 19:44:06 UTC
Verified with lshw-B.02.19.2-6.el8 in RHEL-8.5.0-20210714.n.0.

The output still matches the "After" output from comment 4.

:::::::::::::
:: aarch64 ::
:::::::::::::

[root@hpe-apollo-cn99xx-14-vm-30 ~]# journalctl --dmesg --no-hostname --output short-monotonic | grep SMBIOS.*present
[    0.176398] kernel: SMBIOS 3.0.0 present.

[root@hpe-apollo-cn99xx-14-vm-30 ~]# rpm -q lshw
lshw-B.02.19.2-6.el8.aarch64

[root@hpe-apollo-cn99xx-14-vm-30 ~]# lshw -short -C memory
H/W path          Device     Class          Description
=======================================================
/0/1000                      memory         6GiB System Memory
/0/1000/0                    memory         6GiB DIMM RAM
/0/0                         memory         96KiB BIOS


::::::::::::
:: x86_64 ::
::::::::::::

[root@intel-wildcatpass-01 ~]# journalctl --dmesg --no-hostname --output short-monotonic | grep SMBIOS.*present
[    0.000000] kernel: SMBIOS 2.7 present.

[root@intel-wildcatpass-01 ~]# rpm -q lshw
lshw-B.02.19.2-6.el8.x86_64

[root@intel-wildcatpass-01 ~]# lshw -short -C memory
H/W path         Device      Class          Description
=======================================================
/0/0                         memory         64KiB BIOS
/0/1                         memory         896KiB L1 cache
/0/15                        memory         3584KiB L2 cache
/0/2                         memory         35MiB L3 cache
/0/18                        memory         896KiB L1 cache
/0/19                        memory         3584KiB L2 cache
/0/1a                        memory         35MiB L3 cache
/0/1c                        memory         32GiB System Memory
/0/1c/0                      memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/1                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/2                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/3                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/4                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/5                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/6                      memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/7                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/8                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/9                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/a                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/b                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/c                      memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/d                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/e                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/f                      memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/10                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/11                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/12                     memory         8GiB DIMM DDR4 Synchronous 2133 MHz 
/0/1c/13                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/14                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/15                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/16                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5 
/0/1c/17                     memory         DIMM DDR4 Synchronous 2133 MHz (0.5

Comment 12 errata-xmlrpc 2021-11-09 19:48:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lshw bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4442

Comment 13 Ken Holtz 2022-01-19 15:30:33 UTC
Requesting this BZ for consideration of backport into RHEL 8.4 z-stream. Requesting this because it is needed within OpenStack 16.2 and that version relies on RHEL 8.4 and cannot pick up fixes from RHEL 8.5. Partners and customers are actively working on OSP 16.2 and this fix will be important for OpenStack Ironic as reported in the original description of the BZ. Unfortunately without backport to RHEL 8.4 this fix is not useful to OpenStack until OSP 17 would release further in the future.

Comment 14 Zane Bitter 2022-01-19 15:40:11 UTC
Note that there is a workaround in ironic: https://review.opendev.org/q/I6eb5981d28b9ae368239af0c1d0ec32ff79d95b3

Comment 15 ltao 2022-01-20 03:02:27 UTC
Hi Ken and Zane,

Thanks for the information, I will do the 8.4 z-stream backporting.

@ruyang, hello Dave, should we open a z-stream bug for this?

Thanks,
Tao Liu

Comment 17 Dave Young 2022-01-20 10:15:09 UTC
(In reply to ltao from comment #15)
> Hi Ken and Zane,
> 
> Thanks for the information, I will do the 8.4 z-stream backporting.
> 
> @ruyang, hello Dave, should we open a z-stream bug for this?
> 

Hi Tao, Please use the new bug https://bugzilla.redhat.com/show_bug.cgi?id=2042890
for z stream work.