apport-bug crashing on server install
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apparmor (Ubuntu) |
Fix Released
|
Medium
|
Steve Beattie | ||
Bug Description
[impact]
This bug prevents apport from reporting apparmor bugs on systems with
non-UTF-8 characters showing up in syslog (the kernel reporting raw
information from hardware is a common culprit).
[steps to reproduce]
1) on a system with non-UTF-8 characters in syslog, run 'apport -p apparmor -f'
if the bug has been addressed, this should generate a report as
expected instead of causing apport to crash.
[regression potential]
The change in the patch for this bug solely modifies the apparmor
apport hook. It could potentially introduce more breakage there (but
couldn't affect apparmor mediation); also the lp:qa-regression-testign
test-apparmor.py attempts to exercise the apport hook, and this is
exercised in as part of every linux kernel update by the kernel team
(who frequently hit this issue due to the quirkiness of some of
their hardware).
[original description]
jenkins@dagmar:~$ sudo apport-bug apparmor --save testlib.apport
*** 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/
Traceback (most recent call last):
File "/usr/lib/
symb[
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/
symb[
File "/usr/share/
report[
File "/usr/share/
for line in open(file):
File "/usr/lib/
(result, consumed) = self._buffer_
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 6574: invalid continuation byte
Changed in apparmor (Ubuntu): | |
assignee: | nobody → Steve Beattie (sbeattie) |
The first part of the traceback is a bit of a red herring; it's an expected exception that is being handled: apport now wants to pass two arguments to add_info(), but the apparmor hook hasn't been updated to take into account the added ui argument, so apport falls back to invoking add_info() with one argument. This wouldn't be an issue except that the second exception is being raised. That said, the apparmor hook add_info() method should be updated to take the additional ui argument.
The second exception is because non-utf-8 strings are in /var/log/kern.log and the apparmor apport hook isn't handling that properly (the non-utf-8 strings are specific to the hardware the tests are being run on, hence the reason it doesn't fail everywhere).