[Bug 1060353] Re: DistUpgradeApport.py causes an apport assertion error
Brian Murray
brian at ubuntu.com
Mon Oct 8 22:49:55 UTC 2012
** Changed in: update-manager (Ubuntu Precise)
Status: Triaged => In Progress
** Changed in: update-manager (Ubuntu Precise)
Assignee: (unassigned) => Brian Murray (brian-murray)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1060353
Title:
DistUpgradeApport.py causes an apport assertion error
Status in “ubuntu-release-upgrader” package in Ubuntu:
Fix Released
Status in “update-manager” package in Ubuntu:
Invalid
Status in “ubuntu-release-upgrader” source package in Oneiric:
Invalid
Status in “update-manager” source package in Oneiric:
Triaged
Status in “ubuntu-release-upgrader” source package in Precise:
Invalid
Status in “update-manager” source package in Precise:
In Progress
Status in “ubuntu-release-upgrader” source package in Quantal:
Fix Released
Status in “update-manager” source package in Quantal:
Invalid
Bug description:
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()
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/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'.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1060353/+subscriptions
More information about the foundations-bugs
mailing list