[Bug 1583279] Re: apport package hook for mdadm causes a Traceback
Steve Beattie
sbeattie at ubuntu.com
Wed May 18 23:50:30 UTC 2016
** Description changed:
As we can see in bug 1581940 (attachment HookError_source_mdadm.py) the
apport package hook for mdadm causes a traceback.
Here's the Traceback:
Traceback (most recent call last):
- File "/usr/lib/python3/dist-packages/apport/report.py", line 197, in _run_hook
- symb['add_info'](report, ui)
+ File "/usr/lib/python3/dist-packages/apport/report.py", line 197, 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 202, in _run_hook
- symb['add_info'](report)
- File "/usr/share/apport/package-hooks/source_mdadm.py", line 53, in add_info
- report['initrd.files'] = get_initrd_files(initrd_re)
- File "/usr/share/apport/package-hooks/source_mdadm.py", line 30, in get_initrd_files
- out = cpio.communicate(fd.read())[0]
- File "/usr/lib/python3.5/subprocess.py", line 1065, in communicate
- stdout, stderr = self._communicate(input, endtime, timeout)
- File "/usr/lib/python3.5/subprocess.py", line 1681, in _communicate
- self._save_input(input)
- File "/usr/lib/python3.5/subprocess.py", line 1754, in _save_input
- self._input = self._input.encode(self.stdin.encoding)
+ File "/usr/lib/python3/dist-packages/apport/report.py", line 202, in _run_hook
+ symb['add_info'](report)
+ File "/usr/share/apport/package-hooks/source_mdadm.py", line 53, in add_info
+ report['initrd.files'] = get_initrd_files(initrd_re)
+ File "/usr/share/apport/package-hooks/source_mdadm.py", line 30, in get_initrd_files
+ out = cpio.communicate(fd.read())[0]
+ File "/usr/lib/python3.5/subprocess.py", line 1065, in communicate
+ stdout, stderr = self._communicate(input, endtime, timeout)
+ File "/usr/lib/python3.5/subprocess.py", line 1681, in _communicate
+ self._save_input(input)
+ File "/usr/lib/python3.5/subprocess.py", line 1754, in _save_input
+ self._input = self._input.encode(self.stdin.encoding)
AttributeError: 'bytes' object has no attribute 'encode'
+
+ [Impact]
+
+ Makes diagnosing issues around mdadm more difficult, as it won't be
+ shown whether the generated initrd for the running kernel includes the
+ bits relevant to mdadm.
+
+ [Test Case]
+
+ NOTE: an md device is not needed to reproduce the apport failure, the stacktrace is reproducable without setting up software raid.
+ 1. sudo apt-get install mdadm
+ 2. sudo apport-cli -f -p mdadm
+
+ For the failure case, a traceback like the above will be seen. For the
+ successful case, no traceback will be seen, and (V)iewing the report
+ will show a section titled 'initrd.files'
+
+ [Regression Potential]
+
+ Changes involved are only to the apport hook for mdadm, so the only risk
+ is due to the rebuild of the mdadm package itself, and any toolchain
+ changes that have occurred since it was last rebuilt.
** Tags added: trusty wily
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/1583279
Title:
apport package hook for mdadm causes a Traceback
Status in mdadm package in Ubuntu:
New
Status in mdadm source package in Trusty:
New
Status in mdadm source package in Wily:
New
Status in mdadm source package in Xenial:
New
Status in mdadm source package in Yakkety:
New
Bug description:
As we can see in bug 1581940 (attachment HookError_source_mdadm.py)
the apport package hook for mdadm causes a traceback.
Here's the Traceback:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport/report.py", line 197, 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 202, in _run_hook
symb['add_info'](report)
File "/usr/share/apport/package-hooks/source_mdadm.py", line 53, in add_info
report['initrd.files'] = get_initrd_files(initrd_re)
File "/usr/share/apport/package-hooks/source_mdadm.py", line 30, in get_initrd_files
out = cpio.communicate(fd.read())[0]
File "/usr/lib/python3.5/subprocess.py", line 1065, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/usr/lib/python3.5/subprocess.py", line 1681, in _communicate
self._save_input(input)
File "/usr/lib/python3.5/subprocess.py", line 1754, in _save_input
self._input = self._input.encode(self.stdin.encoding)
AttributeError: 'bytes' object has no attribute 'encode'
[Impact]
Makes diagnosing issues around mdadm more difficult, as it won't be
shown whether the generated initrd for the running kernel includes the
bits relevant to mdadm.
[Test Case]
NOTE: an md device is not needed to reproduce the apport failure, the stacktrace is reproducable without setting up software raid.
1. sudo apt-get install mdadm
2. sudo apport-cli -f -p mdadm
For the failure case, a traceback like the above will be seen. For the
successful case, no traceback will be seen, and (V)iewing the report
will show a section titled 'initrd.files'
[Regression Potential]
Changes involved are only to the apport hook for mdadm, so the only
risk is due to the rebuild of the mdadm package itself, and any
toolchain changes that have occurred since it was last rebuilt.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1583279/+subscriptions
More information about the foundations-bugs
mailing list