dmitest_server traceback on ARM system

Bug #1655155 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Medium
Jeff Lane 

Bug Description

Traceback (most recent call last):
  File "/tmp/nest-hyphl422.f560b0c3c4d1041df8787845ec97e7b73f906ae22d34577dbec75961f309eff8/dmitest", line 279, in <module>
    sys.exit(main())
  File "/tmp/nest-hyphl422.f560b0c3c4d1041df8787845ec97e7b73f906ae22d34577dbec75961f309eff8/dmitest", line 246, in main
    universal_newlines=True).splitlines()
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 695, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "/usr/lib/python3.5/subprocess.py", line 1059, in communicate
    stdout = self.stdout.read()
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 2639: invalid start byte

This was the output of dmitest_server, something in dmi on this system is wonky. Need to get a dump of dmidecode to see what the deal is...

Revision history for this message
Jeff Lane  (bladernr) wrote :

The problem is some weird data in DMI from the manufacturer.

Handle 0x0007, DMI type 39, 22 bytes
System Power Supply
        Power Unit Group: 1
        Location: Default string
        Name: YM-2401R
        Manufacturer: 3Y POWER
        Serial Number: <FF><F6><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><80>nfiguration
        Asset Tag: Default string
        Model Part Number: YM-2401R
        Revision: A
        Max Power Capacity: 350 W
        Status: Present, Other
        Type: Switching
        Input Voltage Range Switching: Wide Range
        Plugged: Yes
        Hot Replaceable: Yes

Handle 0x0008, DMI type 39, 22 bytes
System Power Supply
        Power Unit Group: 1
        Location: Default string
        Name: YM-2401R
        Manufacturer: 3Y POWER
        Serial Number: <FF><E4><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><FF><80>nfiguration
        Asset Tag: Default string
        Model Part Number: YM-2401R
        Revision: A
        Max Power Capacity: 350 W
        Status: Present, Other
        Type: Switching
        Input Voltage Range Switching: Wide Range
        Plugged: Yes
        Hot Replaceable: Yes

When looked at in VIM, those lines look like so:
Serial Number: ÿöÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ<80>nfiguration

A bunch of weird non-ascii characters

I don't think there's anything special to do here, just add some error handling to catch these DMI errors and warn the user.

Changed in plainbox-provider-checkbox:
status: Confirmed → Triaged
status: Triaged → In Progress
Revision history for this message
Jeff Lane  (bladernr) wrote :

Changed the way the lines from dmidecode are decoded from bytes to utf-8 to trap the UnicodeDecodeError that this generates which was causing the traceback initially.

Also added output so when this does happen, you'll know exactly what text was causing the trouble. This isn't a common occurrence, but this also isn't the first time that strange chars appeared in DMI data causing issues.

Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
milestone: none → 0.34.0
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.