traceback when gathering dmi information

Bug #1762438 reported by Scott Moser on 2018-04-09
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Medium
Brian Murray

Bug Description

# ubuntu-bug systemd

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
.........ERROR: hook /usr/share/apport/package-hooks/systemd.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 198, in _run_hook
    symb['add_info'](report, ui)
TypeError: add_info() takes 1 positional argument but 2 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 203, in _run_hook
    symb['add_info'](report)
  File "/usr/share/apport/package-hooks/systemd.py", line 11, in add_info
    apport.hookutils.attach_hardware(report)
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 265, in attach_hardware
    attach_dmi(report)
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 221, in attach_dmi
    value = fd.read().strip()
  File "/usr/lib/python3.6/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 0: invalid start byte
..

*** Send problem report to the developers?

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: python3-apport 2.20.9-0ubuntu2
ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10
Uname: Linux 4.15.0-13-generic x86_64
ApportVersion: 2.20.9-0ubuntu2
Architecture: amd64
Date: Mon Apr 9 14:32:17 2018
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Scott Moser (smoser) wrote :
Brian Murray (brian-murray) wrote :

Could you give me some more information about the image you are using? I've been unable to recreate this.

Changed in apport (Ubuntu):
status: New → Incomplete
Scott Moser (smoser) wrote :

This was a stock lxc launch.

$ lxc launch ubuntu-daily:bionic b4
$ lxc exec b4 /bin/bash
root@b4:~# cat /etc/cloud/build.info
build_name: server
serial: 20180411

root@b4:~# ubuntu-bug systemd

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
..........ERROR: hook /usr/share/apport/package-hooks/systemd.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 198, in _run_hook
    symb['add_info'](report, ui)
TypeError: add_info() takes 1 positional argument but 2 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 203, in _run_hook
    symb['add_info'](report)
  File "/usr/share/apport/package-hooks/systemd.py", line 11, in add_info
    apport.hookutils.attach_hardware(report)
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 265, in attach_hardware
    attach_dmi(report)
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 221, in attach_dmi
    value = fd.read().strip()
  File "/usr/lib/python3.6/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 0: invalid start byte
.

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (363.3 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): C

Changed in apport (Ubuntu):
status: Incomplete → Confirmed
summary: - stack trace when filing bug (ubuntu-bug systemd)
+ traceback when gathering dmi information
Changed in apport (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → Medium
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.9-0ubuntu5

---------------
apport (2.20.9-0ubuntu5) bionic; urgency=medium

  * apport/hookutils.py: When gathering dmi information use read_file() which
    handles UTF-8. (LP: #1762438)

 -- Brian Murray <email address hidden> Fri, 13 Apr 2018 11:19:31 -0700

Changed in apport (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers