uncaught python exception : UnicodeDecodeError: 'utf-8' codec can't decode byte; invalid continuation byte
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
High
|
Brian Murray | ||
Bionic |
Fix Released
|
High
|
Brian Murray |
Bug Description
[Impact]
Ubuntu crash reports and package installation failures may not include DpkgTerminalLog.txt if there is a UnicodeDecodeError trying to read the dpkg log file.
[Test Case]
Because the fix is simple and its complicated to have a dpkg log file with unicode in it we'll just test that truncating of a dpkg log file still works.
1) Install 2vcard (so we have a recent dpkg log entry)
2) Run update-manager
3) Kill it with signal 11 e.g. kill -11 $PID of update-manager
4) Run ubuntu-bug /var/crash/
5) Observe DpkgTerminalLog.txt only contains a log entry regarding the installation of 2vcard and matches the content in /var/log/
[Regression Potential]
Its possible that the code to replace the DpkgTerminalLog contents of the report is wrong but the test case above ensures that it isn't.
[Original Description]
Hi,
here is a python exception I got while reporting a bug:
Traceback (most recent call last):
File "/usr/lib/
symb[
File "/usr/share/
check_
File "/usr/share/
trim_
File "/usr/share/
report[
File "/usr/share/
report[
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 3070: invalid continuation byte
It can also be seen here:
https:/
ProblemType: BugDistroRelease: Ubuntu 18.04
Package: apport 2.20.9-0ubuntu6
Uname: Linux 4.16.3-
ApportLog:
ApportVersion: 2.20.9-0ubuntu6
Architecture: amd64
CurrentDesktop: MATE
Date: Mon Apr 23 20:13:24 2018
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
tags: | added: id-5ae35ea55ac10e9203cade8d |
Changed in apport (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in apport (Ubuntu Bionic): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in apport (Ubuntu Bionic): | |
status: | In Progress → Triaged |
assignee: | Brian Murray (brian-murray) → nobody |
Changed in apport (Ubuntu Bionic): | |
assignee: | nobody → Brian Murray (brian-murray) |
status: | Triaged → In Progress |
description: | updated |
This bug was fixed in the package apport - 2.20.10-0ubuntu1
---------------
apport (2.20.10-0ubuntu1) cosmic; urgency=medium
* New upstream release: packaging- apt-dpkg. py: when using a permanent sandbox better $kvers- $flavor is now built from the linux-signed hooks/ubuntu. py: Fix UnicodeDecodeError when processing lLog. (LP: #1766337) hooks/ubuntu. py: Don't display a messy error if python or apport. links: source_ linux-signed. py -> source_linux.py package hooks/source_ linux.py: Redirect bugs filed about the
- backends/
check for the package being already available thereby reducing quantity
of downloads.
- apport/report.py: Use timeout parameter in subprocess to limit how long
we'll wait for gdb to return information as gdb can hang with some core
files.
- data/apport: Fix PEP8 issues
- apport/ui.py: Include ProblemType in reports which are updated as
package hooks may expect the report to have a ProblemType. (LP: #1766794)
- test/test_ui.py: modify run_crash_kernel test to account for the fact
that linux-image-
source package on amd64 and ppc64el. (LP: #1766740)
* data/general-
DpkgTermina
* data/general-
python3 is not installed. (LP: #1769262)
* debian/
hook (LP: #1766740)
* data/package-
linux-signed source package to linux. (LP: #1766740)
-- Brian Murray <email address hidden> Thu, 10 May 2018 09:31:34 -0700