[Bug 1254447] Re: Upgrade to 13.30 crashes because of hidden file

Bram Moolenaar 1254447 at bugs.launchpad.net
Sun Nov 24 19:16:41 UTC 2013


Fortunately (for reporting the bug), after upgrading to 13.10, trying to
upgrade to 14.04 has the same problem:

/home/mool 30 % sudo update-manager -d
[sudo] password for mool: 
Checking for a new Ubuntu release
authenticate 'trusty.tar.gz' against 'trusty.tar.gz.gpg' 
extracting 'trusty.tar.gz'
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-qwg0du/trusty", line 10, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-qwg0du/DistUpgrade/DistUpgradeMain.py", line 240, in main
    save_system_state(logdir)
  File "/tmp/ubuntu-release-upgrader-qwg0du/DistUpgrade/DistUpgradeMain.py", line 133, in save_system_state
    scrub_sources=True)
  File "/tmp/ubuntu-release-upgrader-qwg0du/DistUpgrade/apt_clone.py", line 149, in save_state
    self._write_state_sources_list(tar, scrub_sources)
  File "/tmp/ubuntu-release-upgrader-qwg0du/DistUpgrade/apt_clone.py", line 241, in _write_state_sources_list
    "./etc/apt/sources.list.d/"+source)
  File "/tmp/ubuntu-release-upgrader-qwg0du/DistUpgrade/apt_clone.py", line 246, in _add_file_to_tar_with_password_check
    for line in f.readlines():
  File "/usr/lib/python2.7/codecs.py", line 296, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9f in position 3: invalid start byte


** Tags added: apport-collected dist-upgrade saucy

** Description changed:

  Following the normal procedure to upgrade with the update manager doesn't work.  No error message, just stops working.
  Starting it from the command line: sudo update-manager -d
  Produces a stack trace in the terminal.  The error is: UnicodeDecodeError: 'utf8' codec can't decode byte ...
  This is in function _add_file_to_tar_with_password_check
  (Sorry, didn't copy the whole stack trace; however you should be able to reproduce it from the instructions below).
  
  The cause was a hidden file in /etc/apt/sources.list.d
  This is a Vim undo file, which has a binary format, thus not utf-8 encoded: .google-chrome.list.un~
  
  1. First of all, if the updater crashes with a stack trace, a dialog should appear to report the error.
      Pointing to the log file, which I later found out to be /var/log/dist-upgrade/main.log, would be helpful.
     I waited several minutes, thinking that it was busy in the background.
  
  2. The update must ignore hidden files.  The user may edit files with Vim, which may leave hidden undo files behind.
      A better solution is to only use files that are known to be relevant, not blindly processing every random file.
  
- 3. If the update fails to read a file there should be an option to
- ignore the error and continue.  Listing the file name and/or contents
- should give the user a hint about what he is skipping.  This is the only
- way the upgrade can continue from a damaged system without the user
- manually hunting around for problems and guessing how to fix them.
+ 3. If the update fails to read a file there should be an option to ignore the error and continue.  Listing the file name and/or contents should give the user a hint about what he is skipping.  This is the only way the upgrade can continue from a damaged system without the user manually hunting around for problems and guessing how to fix them.
+ --- 
+ ApportVersion: 2.12.5-0ubuntu2.1
+ Architecture: i386
+ CrashDB: ubuntu
+ DistroRelease: Ubuntu 13.10
+ InstallationDate: Installed on 2012-11-18 (371 days ago)
+ InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release i386 (20121017.2)
+ MarkForUpload: True
+ NonfreeKernelModules: nvidia
+ Package: ubuntu-release-upgrader (not installed)
+ ProcVersionSignature: Ubuntu 3.11.0-13.20-generic 3.11.6
+ Tags:  saucy dist-upgrade
+ Uname: Linux 3.11.0-13-generic i686
+ UpgradeStatus: Upgraded to saucy on 2013-11-24 (0 days ago)
+ UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
+ VarLogDistupgradeAptclonesystemstate.tar.gz: Error: command ['pkexec', 'cat', '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'] failed with exit code 126: Error executing command as another user: Request dismissed
+ VarLogDistupgradeTermlog:

-- 
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/1254447

Title:
  Upgrade to 13.30 crashes because of hidden file

Status in “ubuntu-release-upgrader” package in Ubuntu:
  New

Bug description:
  Following the normal procedure to upgrade with the update manager doesn't work.  No error message, just stops working.
  Starting it from the command line: sudo update-manager -d
  Produces a stack trace in the terminal.  The error is: UnicodeDecodeError: 'utf8' codec can't decode byte ...
  This is in function _add_file_to_tar_with_password_check
  (Sorry, didn't copy the whole stack trace; however you should be able to reproduce it from the instructions below).

  The cause was a hidden file in /etc/apt/sources.list.d
  This is a Vim undo file, which has a binary format, thus not utf-8 encoded: .google-chrome.list.un~

  1. First of all, if the updater crashes with a stack trace, a dialog should appear to report the error.
      Pointing to the log file, which I later found out to be /var/log/dist-upgrade/main.log, would be helpful.
     I waited several minutes, thinking that it was busy in the background.

  2. The update must ignore hidden files.  The user may edit files with Vim, which may leave hidden undo files behind.
      A better solution is to only use files that are known to be relevant, not blindly processing every random file.

  3. If the update fails to read a file there should be an option to ignore the error and continue.  Listing the file name and/or contents should give the user a hint about what he is skipping.  This is the only way the upgrade can continue from a damaged system without the user manually hunting around for problems and guessing how to fix them.
  --- 
  ApportVersion: 2.12.5-0ubuntu2.1
  Architecture: i386
  CrashDB: ubuntu
  DistroRelease: Ubuntu 13.10
  InstallationDate: Installed on 2012-11-18 (371 days ago)
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release i386 (20121017.2)
  MarkForUpload: True
  NonfreeKernelModules: nvidia
  Package: ubuntu-release-upgrader (not installed)
  ProcVersionSignature: Ubuntu 3.11.0-13.20-generic 3.11.6
  Tags:  saucy dist-upgrade
  Uname: Linux 3.11.0-13-generic i686
  UpgradeStatus: Upgraded to saucy on 2013-11-24 (0 days ago)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
  VarLogDistupgradeAptclonesystemstate.tar.gz: Error: command ['pkexec', 'cat', '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'] failed with exit code 126: Error executing command as another user: Request dismissed
  VarLogDistupgradeTermlog:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1254447/+subscriptions



More information about the foundations-bugs mailing list