[Bug 1060353] Re: DistUpgradeApport.py causes an apport assertion error

Adam Conrad adconrad at 0c3.net
Wed Oct 10 15:29:20 UTC 2012


Hello Brian, or anyone else affected,

Accepted update-manager into precise-proposed. The package will build
now and be available at http://launchpad.net/ubuntu/+source/update-
manager/1:0.156.14.11 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from
verification-needed to verification-done.  If it does not, change the
tag to verification-failed.  In either case, details of your testing
will help us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: update-manager (Ubuntu Precise)
       Status: In Progress => Fix Committed

** Tags added: verification-needed

-- 
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:
  Fix Committed
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