update-manager exits on dist-upgrade when tmp is mounted "noexec" and gives useless error message

Bug #461744 reported by Stef Sijben
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt
Karmic
Fix Released
Medium
Unassigned
Lucid
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: update-manager

Today I tried to upgrade my system from 9.04 to 9.10 RC via update-manager -d. When I clicked the button for the dist-upgrade, I got the release notes and then a dialog which sais it's downloading 2 files. After that, update-manager just crashed, without any notice.

TEST CASE:

Steps to reproduce:
run update-manager -d
click the "Upgrade" button in the top right.
click "Upgrade" in the dialog showing the release notes.
enter your password when asked for it.

What should happen:
the system is upgraded to the new distribution release, or a proper error message is shown.

What actually happens:
update-manager crashes.

When I run update-manager -d from the command line, this is the output:
$ update-manager -d
extracting 'karmic.tar.gz'
authenticate 'karmic.tar.gz' against 'karmic.tar.gz.gpg'
/var/lib/python-support/python2.6/dbus/connection.py:242: DeprecationWarning: object.__init__() takes no parameters
  super(Connection, self).__init__(*args, **kwargs)
sudo: unable to execute /tmp/tmpx8L0A4/karmic: Permission denied

Since it said something about permissions, I also tried to run it as root directly from the command line instead of entering my password when update-manager asks for it. This is the output:
$ sudo update-manager -d
extracting 'karmic.tar.gz'
authenticate 'karmic.tar.gz' against 'karmic.tar.gz.gpg'
/var/lib/python-support/python2.6/dbus/connection.py:242: DeprecationWarning: object.__init__() takes no parameters
  super(Connection, self).__init__(*args, **kwargs)
/usr/lib/python2.6/dist-packages/UpdateManager/DistUpgradeFetcher.py:79: GtkWarning: gtk_scrolled_window_add: assertion `bin->child == NULL' failed
  self.parent.scrolled_notes.add(textview_release_notes)
extracting 'karmic.tar.gz'
authenticate 'karmic.tar.gz' against 'karmic.tar.gz.gpg'

But now I also got an error message in the GUI:
Can not run the upgrade
This usually is caused by a system were /tmp is mounted noexec. Please remount without noexec and run the upgrade again.

This error message is right, I do have /tmp mounted with noexec. The problem is that it doesn't show up when I don't run update-manager as root, so many users will not know what's the problem when their upgrade fails.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: update-manager 1:0.111.9
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: update-manager
Uname: Linux 2.6.28-16-generic x86_64

Revision history for this message
Stef Sijben (stef-sijben) wrote :
Michael Vogt (mvo)
summary: - update-manager crashes on dist-upgrade
+ update-manager crashes on dist-upgrade when tmp is mounted "noexec"
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Michael Vogt (mvo)
Changed in update-manager (Ubuntu):
status: Confirmed → In Progress
summary: - update-manager crashes on dist-upgrade when tmp is mounted "noexec"
+ update-manager exits on dist-upgrade when tmp is mounted "noexec" and
+ gives useless error message
Revision history for this message
to be removed (liw) wrote :

I note that this can easily be verified using kvm with /tmp mounted on a separate partition and marked noexec. (I've just done this.)

Revision history for this message
to be removed (liw) wrote :

And I confirm that Michael's fix works: I now get an error message rather than a mysterious crash.

Revision history for this message
to be removed (liw) wrote :

I don't seem to be able to edit the description, so I'll add the SRU testing instructions here.

TEST CASE:

1. Set up jaunty in a virtual machine. Put /tmp on its own partition.
2. After installation, change /etc/fstab to use the noexec option for /tmp.
3. Reboot and verify that /tmp is mounted with noexec.
4. Start dist upgrade (update-manager -d).
5. Verify that the dist upgrade starts, but crashes without error message.
6. Install update from Michael.
7. Re-run dist-upgrade. You should now get an error message.

Michael Vogt (mvo)
description: updated
Revision history for this message
Michael Vogt (mvo) wrote :

Pitti just suggested to just run "python ./karmic" to workaround noexec entirely. I think we should do that (at least for lucid).

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted update-manager into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in update-manager (Ubuntu Karmic):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.126.9

---------------
update-manager (1:0.126.9) karmic-proposed; urgency=low

  * DistUpgrade/DistUpgrade.cfg:
    - really stop enabling apport during the upgrade (LP: #465619)

update-manager (1:0.126.8) karmic-proposed; urgency=low

  * when the server is overloaded and no Release file information
    can be obtained, show a better error message instead of the
    bogus "ubuntu-minimal" is missing (LP: #446956)

update-manager (1:0.126.7) karmic-proposed; urgency=low

  * po/*.po:
    - update translations from LP (LP: #460547)
  * UpdateManager/Core/DistUpgradeFetcherCore.py:
    - check if running on a system with noexec /tmp and give a propper
      error message (LP: #461744)
  * DistUpgrade/DistUpgradeViewGtk.py:
    - add missing locale.bindtextdomain() (LP: #460547)

 -- Brian Murray <email address hidden> Fri, 30 Oct 2009 13:54:08 -0700

Changed in update-manager (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Michael, can't copy to lucid because lucid's version is newer than karmic's. Please fix in lucid ASAP.

Changed in update-manager (Ubuntu Lucid):
assignee: nobody → Michael Vogt (mvo)
milestone: none → lucid-alpha-1
Michael Vogt (mvo)
Changed in update-manager (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Shofi Islam (shofi-islam) wrote :

Confirm this bug is in Jaunty NBR when upgrading to Karmic. Can this be backported into Jaunty?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.