Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
The latest version of python-dmidecode will produce invalid XML on certain BIOS
namely: Attribute unit redefined
Version-Release number of selected component (if applicable):
python3-dmidecode-3.12.3-1
if you downgrade to python3-dmidecode-3.12.2-27.el9, the problem doesn't occur
How reproducible:
Every-time on affected hardware
(Not all hardware has the problem)
Steps to Reproduce:
1. Run the following program
# cat dmidecode_test.py
#!/usr/bin/python
import lxml
import libxml2
import dmidecode
import lxml.etree
dmixml = dmidecode.dmidecodeXML()
dmixml.SetResultType(dmidecode.DMIXML_DOC)
dmiqry = dmixml.QuerySection('all')
root = dmiqry.getRootElement()
res = lxml.etree.XML(root.serialize('UTF-8'))
# ./dmidecode_test.py
Actual results:
Traceback (most recent call last):
File "/root/./dmidecode_test.py", line 11, in <module>
res = lxml.etree.XML(root.serialize('UTF-8'))
File "src/lxml/etree.pyx", line 3216, in lxml.etree.XML
File "src/lxml/parser.pxi", line 1899, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1780, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1085, in lxml.etree._BaseParser._parseUnicodeDoc
File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
File "<string>", line 1
lxml.etree.XMLSyntaxError: Attribute unit redefined, line 1, column 12281
Expected results:
No Traceback
Additional info:
rteval uses python-dmidecode to provide information about the hardware during testing of real-time performance, so this is important to our customers
I've further enhanced the output now so it looks like this
[DEBUG] ** EXCEPTION Attribute unit redefined, line 1, column 12281 (<string>, line 1), will query BIOS only
...
Model: -
BIOS version: Dell Inc. (ver: 1.6.5, rev :1.6, release date: 04/15/2022)
(In reply to John Kacur from comment #1)
> I've further enhanced the output now so it looks like this
>
> [DEBUG] ** EXCEPTION Attribute unit redefined, line 1, column 12281
> (<string>, line 1), will query BIOS only
> ...
> Model: -
> BIOS version: Dell Inc. (ver: 1.6.5, rev :1.6, release date: 04/15/2022)
Please ignore this comment, it was intended for another bz
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
Description of problem: The latest version of python-dmidecode will produce invalid XML on certain BIOS namely: Attribute unit redefined Version-Release number of selected component (if applicable): python3-dmidecode-3.12.3-1 if you downgrade to python3-dmidecode-3.12.2-27.el9, the problem doesn't occur How reproducible: Every-time on affected hardware (Not all hardware has the problem) Steps to Reproduce: 1. Run the following program # cat dmidecode_test.py #!/usr/bin/python import lxml import libxml2 import dmidecode import lxml.etree dmixml = dmidecode.dmidecodeXML() dmixml.SetResultType(dmidecode.DMIXML_DOC) dmiqry = dmixml.QuerySection('all') root = dmiqry.getRootElement() res = lxml.etree.XML(root.serialize('UTF-8')) # ./dmidecode_test.py Actual results: Traceback (most recent call last): File "/root/./dmidecode_test.py", line 11, in <module> res = lxml.etree.XML(root.serialize('UTF-8')) File "src/lxml/etree.pyx", line 3216, in lxml.etree.XML File "src/lxml/parser.pxi", line 1899, in lxml.etree._parseMemoryDocument File "src/lxml/parser.pxi", line 1780, in lxml.etree._parseDoc File "src/lxml/parser.pxi", line 1085, in lxml.etree._BaseParser._parseUnicodeDoc File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError File "<string>", line 1 lxml.etree.XMLSyntaxError: Attribute unit redefined, line 1, column 12281 Expected results: No Traceback Additional info: rteval uses python-dmidecode to provide information about the hardware during testing of real-time performance, so this is important to our customers