$DISPLAY not set in some cases, resulting in cryptic traceback

Bug #848915 reported by miked
184
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Fix Released
Undecided
Unassigned
update-manager (Ubuntu)
Triaged
High
Unassigned
Oneiric
Won't Fix
High
Michael Vogt
Precise
Won't Fix
High
Unassigned

Bug Description

win7 wubi 11.04 w/update to o.o. 11.10 Beta 1 crash at start-up

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: update-manager 1:0.152.17
ProcVersionSignature: Ubuntu 2.6.38-11.49-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic x86_64
ApportVersion: 1.22.1-0ubuntu2
Architecture: amd64
Date: Mon Sep 12 23:26:51 2011
ExecutablePath: /usr/bin/update-manager
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/update-manager -d
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/update-manager', '-d']
SourcePackage: update-manager
Title: update-manager crashed with RuntimeError in /usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py: Gtk couldn't be initialized
UpgradeStatus: Upgraded to oneiric on 2011-09-12 (1 days ago)
UserGroups:

Revision history for this message
miked (miked11) wrote :
visibility: private → public
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
Changed in update-manager (Ubuntu Oneiric):
importance: Undecided → High
tags: added: rls-mgr-o-tracking
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I don't think this is a bu in update-manager. Its crashing in " from gi.repository import Gtk" already.

Is this still a problem? Is this still reproducible ?

Changed in update-manager (Ubuntu Oneiric):
status: Confirmed → Incomplete
Revision history for this message
Michael Vogt (mvo) wrote :

I managed to get this kind of error is DISPLAY is not set, but how could that happen for a "normal" user?

tags: added: bugpattern-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Duplicate bug 869320 has a testcase and indicates that this is likely a bug in gksu and it unsetting the DISPLAY variable.

Changed in update-manager (Ubuntu Oneiric):
status: Incomplete → Triaged
assignee: nobody → Michael Vogt (mvo)
Revision history for this message
Steve Langasek (vorlon) wrote :

Marking for -updates. I think we want this in as a 0-day SRU if we can get it.

Michael, do we have a reproducer for this issue? Is there a workaround we should be documenting in the release notes?

Changed in update-manager (Ubuntu Oneiric):
milestone: none → oneiric-updates
Changed in ubuntu-release-notes:
status: New → Incomplete
Changed in update-manager (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
tags: added: rls-mgr-p-tracking
removed: rls-mgr-o-tracking
Revision history for this message
Michael Vogt (mvo) wrote :

From bug #867629:

1) Start Update Manager
2) Only a partial upgrade is possible -> Click "Partial Upgrade"
3) Enter the user password
4) Partial Upgrade window appears
5) It crashes when it is showin "Calculating changes" below the status ba

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

Fwiw, I tried the above steps (and created a situation where a partial upgrade is needed) but it worked for me, I could not make it crash.

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

I am not aware of a way to reproduce this currently, but if someone can, I'm very keen on hearing about it.

Revision history for this message
Dominik Boehi (dboehi) wrote :

I reported the duplicate bug, but I can't reproduce it at the moment.

Is there a way to manually force update manager to do a partial upgrade?

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

Internally it just runs:
$ gksu --desktop /usr/share/applications/update-manager.desktop -- update-manager --dist-upgrade
when a partial upgrade needs to be performed.

Changed in ubuntu-release-notes:
status: Incomplete → Fix Committed
Changed in update-manager (Ubuntu Oneiric):
status: Triaged → Fix Released
Changed in ubuntu-release-notes:
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

no explanation why this bug was closed for oneiric..

Changed in update-manager (Ubuntu Oneiric):
status: Fix Released → Triaged
tags: added: rls-p-tracking
Steve Langasek (vorlon)
Changed in update-manager (Ubuntu Precise):
assignee: nobody → Barry Warsaw (barry)
Steve Langasek (vorlon)
Changed in update-manager (Ubuntu Precise):
milestone: none → ubuntu-12.04
Revision history for this message
Barry Warsaw (barry) wrote :

It's not clear to me what we can or should do here. This is easily reproducible by starting update-manager in an environment without a $DISPLAY, e.g. from an ssh session where the display is not forwarded.

The error message is perhaps too cryptic to be useful, so one fix might be to catch the exception and print a more helpful error message. If that fairly easy fix is enough, let me know and I'll work on that.

summary: - update-manager crashed with RuntimeError in /usr/lib/python2.7/dist-
- packages/gi/overrides/Gtk.py: Gtk couldn't be initialized
+ cryptic traceback when running update-manager w/no X $DISPLAY
monica v. (lun4tik484)
security vulnerability: no → yes
Barry Warsaw (barry)
Changed in update-manager (Ubuntu Precise):
assignee: Barry Warsaw (barry) → nobody
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Steve Langasek (vorlon) wrote : Re: cryptic traceback when running update-manager w/no X $DISPLAY

The issue here is not that the error message is unclear; the issue is that update-manager is being run with $DISPLAY unset, when this shouldn't ever happen on the desktop. So something is wrong in the privilege handling stack when we try to do a partial upgrade.

summary: - cryptic traceback when running update-manager w/no X $DISPLAY
+ Partial upgrade results in cryptic traceback because $DISPLAY is not set
Revision history for this message
Barry Warsaw (barry) wrote : Re: Partial upgrade results in cryptic traceback because $DISPLAY is not set

Dominik asks as good question in comment #10: if this has only been observed during a partial upgrade, how can we force a partial upgrade to try to reproduce the problem?

Revision history for this message
Barry Warsaw (barry) wrote :

Colin suggests to just hack the code to think it always has to do a partial upgrade. I'll give that a try and see if I can reproduce the problem that way.

Colin Watson (cjwatson)
Changed in update-manager (Ubuntu Precise):
assignee: Canonical Foundations Team (canonical-foundations) → Barry Warsaw (barry)
Revision history for this message
Colin Watson (cjwatson) wrote :

My observations so far:

 * Even with a hacked-up update-manager that always enters partial upgrade mode, I can't currently reproduce this bug, either directly or via update-notifier.
 * I think partial upgrade mode is a red herring anyway. Of this bug and its 16 duplicates, only two show "--dist-upgrade" in PythonArgs. Two have "--no-focus-on-map" (indicating a launch by update-notifier). Two have no arguments at all, and the others have "-d", suggesting launch from a menu/dash/launcher/terminal/whatever.
 * Only one of these bugs is from the final oneiric version of update-manager or newer, and there appears to be no bug pattern that might have prevented further reports.
 * All but three of these bugs are from systems recently upgraded from natty to oneiric, and two of the remainder from oneiric beta to oneiric.
 * Of the eight bugs with full update-manager logs attached, all eight have unity and unity-2d installed (though I can't really tell what desktop environment they're actually running), and seven have ubuntu-desktop installed. One has kde-window-manager installed, although not kubuntu-desktop. One has edubuntu-desktop installed.
 * I'm trying a natty install to see if I can reproduce this on upgrade from that.

My feeling so far is that this was probably a bug in some bit of desktop infrastructure which has since been fixed, and I expect to remove the rls-p-tracking tag if further reproduction attempts fail, due to the paucity of recent reports.

Changed in update-manager (Ubuntu Precise):
assignee: Barry Warsaw (barry) → Colin Watson (cjwatson)
Colin Watson (cjwatson)
summary: - Partial upgrade results in cryptic traceback because $DISPLAY is not set
+ $DISPLAY not set in some cases, resulting in cryptic traceback
Revision history for this message
Colin Watson (cjwatson) wrote :

I've been unable to reproduce this in my testing; and as I said in my previous comment I don't think this actually has anything particular to do with partial upgrades, so I've retitled the bug accordingly.

With the exception of bug 929752, the only reports we've had of this are from natty->oneiric upgrades prior to release (the latest reported date is 2011-10-09). If this were still a major problem, I'd expect to have seen a similar number of reports from oneiric->precise upgrades. I can't identify a specific change that might have fixed this, so I'm not prepared to close the bug, but I'm removing the rls-p-tracking tag as it doesn't appear to be release-critical. We can revisit this if we start seeing more duplicates of this.

Changed in update-manager (Ubuntu Precise):
assignee: Colin Watson (cjwatson) → nobody
tags: added: rrls-p-nottracking
removed: rls-mgr-p-tracking rls-p-tracking
tags: added: rls-p-nottracking
removed: rrls-p-nottracking
Changed in update-manager (Ubuntu Precise):
milestone: ubuntu-12.04 → none
Revision history for this message
Brian Murray (brian-murray) wrote :

Colin, I found some duplicates that seem to be from upgrades from Oneiric to Precise and I've marked them as duplicates of this bug report. The reason they weren't automatically marked was due to line numbers in the tracebacks changing.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/848915

tags: added: iso-testing
security vulnerability: yes → no
tags: added: precise
Noek vanBiljon (noekvb)
Changed in update-manager (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Bob Bib (bobbib) wrote :

Noek vanBiljon (noekvb),

please don't mark bugs as "In Progress" if you have no plans for working on them: https://wiki.ubuntu.com/Bugs/Status

 In Progress:
* If you are working on fixing a bug, set it to In Progress so people know what's going on
* In Progress bugs should be assigned to the person working on them

Changed in update-manager (Ubuntu Precise):
status: In Progress → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

oneiric has seen the end of its life and is no longer receiving any updates. Marking the oneiric task for this ticket as "Won't Fix".

Changed in update-manager (Ubuntu Oneiric):
status: Triaged → Won't Fix
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in update-manager (Ubuntu Precise):
status: Confirmed → Won't Fix
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.