apport fails to collect nvram specific information -- attach_root_command_outputs() does not work for binary data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Undecided
|
Martin Pitt | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
---Problem Description---
apport fails to collect nvram specific information
---uname output---
3.16.0-10-generic
Machine Type = POWER8
---Steps to Reproduce---
1) Install Ubuntu 14.10 in Power non-virtualized environment.
2) Install apport package
3) Run following command to verify if apport collects power specific information.
apport-cli -f -p linux-generic --save=
The command fails with following error :
root@lep8d:
*** Collecting problem information
The collected information can be sent to the developers to improve the
application. This might take a few minutes.
.......tar: Removing leading `/' from member names
....ERROR: hook /usr/share/
Traceback (most recent call last):
File "/usr/lib/
symb[
File "/usr/share/
'nvram': 'cat /dev/nvram',
File "/usr/lib/
buf = f.read().strip()
File "/usr/lib/
(result, consumed) = self._buffer_
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 1: invalid start byte
...
root@lep8d:
Userspace tool common name: apport
Following version of apport is installed.
root@lep8d:
ii apport 2.14.7-0ubuntu1 all automatically generate crash reports for debugging
ii apport-symptoms 0.20 all symptom scripts for apport
ii python-apport 2.14.7-0ubuntu1 all Python library for Apport crash report handling
ii python3-apport 2.14.7-0ubuntu1 all Python 3 library for Apport crash report handling
root@lep8d:
Looking at the code we are doing a cat /dev/nvram to the apport output file which doesn't sounds right to me. I would think using the function add_tar() creating a tar file and copying the content as a ascii file at end of apport output file more appropriate.
One dummy question remaining, how getting the tar file from the ascii output file if we need to ? ( that's also true to validate the content of the DeviceTree tar file).
Would suggest following patch:
--- powerpc.py 2014-09-10 10:28:18.824002770 -0400
+++ powerpc.py.old 2014-09-04 06:33:16.000000000 -0400
@@ -69,8 +69,8 @@
+ 'nvram': 'cat /dev/nvram',
})
- add_tar(report, '/dev/nvram', 'nvram.tar')
if ispSeries and not isPowerKVM:
thanks
diff -urN powerpc.py.old powerpc.py
--- powerpc.py.old 2014-09-04 06:33:16.000000000 -0400
+++ powerpc.py 2014-09-10 10:28:18.824002770 -0400
@@ -69,8 +69,8 @@
- 'nvram': 'cat /dev/nvram',
})
+ add_tar(report, '/dev/nvram', 'nvram.tar')
if ispSeries and not isPowerKVM:
Initial Launchpad bug id #1336462 implemented feature support
tags: | added: architecture-ppc64le bugnameltc-115470 severity-high targetmilestone-inin1410 |
tags: |
added: targetmilestone-inin1504 removed: targetmilestone-inin1410 |
Please ignore the first diff. The second diff is the correct one. Thanks.