** Description changed:
In the event that a distribution upgrade crashes apport_crash from
DistUpgradeApport.py is called which then tries to attach files to the
crash report (_apport_append_logfiles). However, key name for the file
attachment in the report is formed using the directory '/var/log/dist-
upgrade' which includes '/' in the key name. This causes apport to
crash as seen here:
Traceback (most recent call last):
- File "DistUpgrade/DistUpgradeApport.py", line 120, in <module>
- apport_crash(None, None, None)
- File "DistUpgrade/DistUpgradeApport.py", line 57, in apport_crash
- _apport_append_logfiles(report)
- File "DistUpgrade/DistUpgradeApport.py", line 30, in _apport_append_logfiles
- report[ident] = (open(f), )
- File "/usr/lib/python2.7/dist-packages/problem_report.py", line 561, in
__setitem__
- assert k.replace('.', '').replace('-', '').replace('_', '').isalnum()
+ File "DistUpgrade/DistUpgradeApport.py", line 120, in <module>
+ apport_crash(None, None, None)
+ File "DistUpgrade/DistUpgradeApport.py", line 57, in apport_crash
+ _apport_append_logfiles(report)
+ File "DistUpgrade/DistUpgradeApport.py", line 30, in _apport_append_logfiles
+ report[ident] = (open(f), )
+ File "/usr/lib/python2.7/dist-packages/problem_report.py", line 561, in
__setitem__
+ assert k.replace('.', '').replace('-', '').replace('_', '').isalnum()
AssertionError
because '/' is not alpha numeric. Apport should probably replace '/'
but u-r-u / update-manager previously attached these files with specific
names, like VarLogDistUpgradeApttermlog.txt, and the u-r-u / update-
manager package hooks uses those same names. Subsequently, I thought it
best to fix u-r-u to use the same key / attachment names.
= Impact =
When update-manager / u-ru crashes we are not receiving the log files we want
from apport and probably we aren't even receiving crash reports from it.
= Test Case =
A simple test case is to manually call DistUpgradeApport.py:
- 1) sudo python /usr/lib/python3/dist-
+ 1) sudo python /usr/lib/python2.7/dist-
packages/DistUpgrade/DistUpgradeApport.py (you need to do this via sudo
to access the files)
With unfixed version of DistUpgradeApport.py you'll receive an assertion
error, with the fixed version you won't. Additionally, if you look in
'/var/crash' you'll find a file named '_usr_bin_do-release-
upgrade.0.crash' which will include attachments and key names like
'VarLogDistUpgradeApporttermlog.txt'.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1060353
Title:
DistUpgradeApport.py causes an apport assertion error
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1060353/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs