RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2081648 - python-dmidecode module fails to decode DMI data
Summary: python-dmidecode module fails to decode DMI data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: python-dmidecode
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Lichen Liu
QA Contact: Jeff Bastian
URL:
Whiteboard:
Depends On:
Blocks: oVirt_on_CentOS_Stream_9_Hosts
TreeView+ depends on / blocked
 
Reported: 2022-05-04 09:38 UTC by Sandro Bonazzola
Modified: 2023-05-09 10:40 UTC (History)
17 users (show)

Fixed In Version: python-dmidecode-3.12.3-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:25:01 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-121015 0 None None None 2022-05-04 09:54:19 UTC
Red Hat Product Errata RHBA-2023:2562 0 None None None 2023-05-09 08:25:07 UTC

Internal Links: 2103911

Description Sandro Bonazzola 2022-05-04 09:38:15 UTC
Description of problem:
dmidecode module fails to decode DMI data


How reproducible:
>>> import dmidecode
>>> dmidecode.system()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: [src/dmidecodemodule.c:331] Error decoding DMI data


Journal shows:
kernel: Lockdown: python: /dev/mem,kmem,port is restricted; see man kernel_lockdown.7

If it helps, dmidecode command works fine.


This issue causes error in oVirt project VDSM daemon which relies on dmidecode python module:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/vdsm/API.py", line 1418, in getHardwareInfo
    hw = supervdsm.getProxy().getHardwareInfo()
  File "/usr/lib/python3.9/site-packages/vdsm/common/supervdsm.py", line 56, in __call__
    return callMethod()
  File "/usr/lib/python3.9/site-packages/vdsm/common/supervdsm.py", line 53, in <lambda>
    getattr(self._supervdsmProxy._svdsm, self._funcName)(*args,
  File "<string>", line 2, in getHardwareInfo
  File "/usr/lib64/python3.9/multiprocessing/managers.py", line 825, in _callmethod
    raise convert_to_error(kind, result)
RuntimeError: [src/dmidecodemodule.c:331] Error decoding DMI data


The system is a VM with UEFI Bios.


# rpm -qa |grep dmi
dmidecode-3.3-7.el9.x86_64
python3-dmidecode-3.12.2-27.el9.x86_64

Comment 1 Sandro Bonazzola 2022-05-04 09:49:26 UTC
According to man page SysRq+x should disable the kernel lockdown but running:

echo 1 > /proc/sys/kernel/sysrq
echo x > /proc/sysrq-trigger

shows in dmesg:
sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) force-fb(v) show-blocked-tasks(w) dump-ftrace-buffer(z)

so looks like the x option is not there.

Comment 2 Dave Young 2022-05-25 01:59:54 UTC
(In reply to Sandro Bonazzola from comment #1)
> According to man page SysRq+x should disable the kernel lockdown but running:
> 
> echo 1 > /proc/sys/kernel/sysrq
> echo x > /proc/sysrq-trigger
> 
> shows in dmesg:
> sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e)
> memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k)
> show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n)
> poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s)
> show-task-states(t) unmount(u) force-fb(v) show-blocked-tasks(w)
> dump-ftrace-buffer(z)
> 
> so looks like the x option is not there.

"x" does not mean "x" here, it is just refer to any usable options in the kernel sysrq table above.  For lockdown, it is not possible to disable it on runtime unless you disable it in grub kernel cmdline (it may not work for Secure Boot case because kernel will lockdown automatically).

Comment 7 Sandro Bonazzola 2022-06-10 11:30:58 UTC
looks like the issue was known since 2019: https://github.com/nima/python-dmidecode/issues/15

project looks abandoned since a year ago, last merged commit being f0a089a on 30 Jun 2021

Project owner seems to be https://www.linkedin.com/in/nimatalebi/ did you try contacting him?

Comment 19 Guillaume Pavese 2022-10-26 06:57:03 UTC
(In reply to Sandro Bonazzola from comment #7)
> looks like the issue was known since 2019:
> https://github.com/nima/python-dmidecode/issues/15
> 
> project looks abandoned since a year ago, last merged commit being f0a089a
> on 30 Jun 2021
> 
> Project owner seems to be https://www.linkedin.com/in/nimatalebi/ did you
> try contacting him?

The Github issue  was recently updated (Sept 5 2022) with a comment from the developer :
https://github.com/nima/python-dmidecode/issues/15#issuecomment-1236772035
"This issue has been fixed in the smbios-3.3.0 branch. Could you please have a try? If there are any issues, welcome to report it. Thanks."

The issue has since been closed as "completed" today, pointing to commit https://github.com/nima/python-dmidecode/commit/c97d1ca021ddc160d70525d0840b1731f50ac4ca

I hope this can make it soon to Centos/oVirt as I am stuck trying to deploy hosted-engine on a Centos 9 with secure boot ?

Comment 20 Sandro Bonazzola 2022-10-26 07:01:54 UTC
Lichen Liu, any update?

Comment 21 Lichen Liu 2022-10-26 07:20:28 UTC
(In reply to Sandro Bonazzola from comment #20)
> Lichen Liu, any update?

Hello,

We did a scratch build a few days ago, but there are some bugs. The developer pushed some new commits to the GitHub today, we are still working on the testing work.

Thanks,
Lichen

Comment 26 Guillaume Pavese 2023-01-03 05:53:29 UTC
Just to note that I have manually installed the new version v3.12.3 from the python-dmidecode github repo and that resolved my ovirt deployment problem.
Please consider releasing the fixed packages to rhel/centos

Comment 35 eddie lopez 2023-05-04 22:16:41 UTC
(In reply to Guillaume Pavese from comment #26)
> Just to note that I have manually installed the new version v3.12.3 from the
> python-dmidecode github repo and that resolved my ovirt deployment problem.
> Please consider releasing the fixed packages to rhel/centos

The v3.12.3 resolved my RHEL v9.1 issue as well with RuntimeError: >>> Error decoding DMI data in VMware virtual machine environment.

Comment 37 errata-xmlrpc 2023-05-09 08:25:01 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 (python-dmidecode 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-2023:2562


Note You need to log in before you can comment on or make changes to this bug.