update-manager crashed with TypeError in _on_synaptic_exit()

Bug #631328 reported by Sjoerd Hemminga
92
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Software Updater
Fix Committed
High
Barry Warsaw
update-manager (Ubuntu)
Fix Released
High
Barry Warsaw
Maverick
Fix Released
Medium
Unassigned
Natty
Fix Released
High
Barry Warsaw

Bug Description

TEST CASE:
1. use maverick
2. remove aptdaemon
3. open update-manager (in a terminal) and click on "check"
4. verify that it hangs and shows a error on the terminal
5. kill update-manager (e.g. ctrl-c)
6. install the version from maverick-proposed
7. repeat step 3 and verify that it works this time

Binary package hint: update-manager

Update-manager crashes when a "check" (the equivalent of apt-get update) or an "install updates" (equivalent to apt-get (dist-)upgrade) ends. The action completes successfully, but pops up the crash report dialog.

Update-manager remains grayed out, and ignores close commands from the window manager. The window manager does not pop-up the "application is not responding" dialog. A SIGINT properly ends the program.

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: update-manager 1:0.142.13
ProcVersionSignature: Ubuntu 2.6.35-19.28-generic 2.6.35.3
Uname: Linux 2.6.35-19-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon Sep 6 08:32:37 2010
ExecutablePath: /usr/bin/update-manager
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python2.6 /usr/bin/update-manager
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.utf8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/update-manager']
SourcePackage: update-manager
Title: update-manager crashed with TypeError in _on_synaptic_exit()
Traceback:
 Traceback (most recent call last):
   File "/usr/lib/python2.6/dist-packages/UpdateManager/backend/InstallBackendSynaptic.py", line 37, in _on_synaptic_exit
     self.emit("action-done", action)
 TypeError: 2 parameters needed for signal action-done; 1 given
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev pulse pulse-access sambashare video wheel

Related branches

Revision history for this message
Sjoerd Hemminga (sjoerd-hemminga) wrote :
visibility: private → public
tags: removed: need-duplicate-check
Revision history for this message
Mike Holland (z-launchpad-myk-id-au) wrote :

Workaround is to use the command-line instead. e.g. "# apt-get update".

Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Sjoerd Hemminga (sjoerd-hemminga) wrote :

Installing python-aptdaemon-gtk (and perhaps aptdaemon) works around this issue. It will use an aptdaemon backend, instead of the buggy Synaptics backend.

Barry Warsaw (barry)
Changed in update-manager:
status: New → Confirmed
Changed in update-manager (Ubuntu):
importance: Undecided → High
Changed in update-manager:
importance: Undecided → High
assignee: nobody → Barry Warsaw (barry)
Changed in update-manager (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
milestone: none → natty-alpha-1
Barry Warsaw (barry)
Changed in update-manager:
status: Confirmed → In Progress
Changed in update-manager (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Barry, the second argument of the signal indicates whether the action is authorized or not. For the synaptic backend it must be True because synaptic must be run as root to perform the update and is always authorized. I can't think of a way to know if synaptic has been authorized or not to do the check.

I think your fix is incorrect because you set the second argument to 0 which is "False", and the package list won't be refreshed. Unless my boolean math is wrong, the patch should be :

--- /usr/lib/python2.7/dist-packages/UpdateManager/backend/InstallBackendSynaptic.py 2010-09-07 17:30:58.000000000 +0200
+++ UpdateManager/backend/InstallBackendSynaptic.py 2010-11-11 19:24:34.000000000 +0100
@@ -34,7 +34,7 @@
         action, tempf = data
         if tempf:
             tempf.close()
- self.emit("action-done", action)
+ self.emit("action-done", action,True)

     def update(self):
         opt = ["--update-at-startup"]

Please also consider bug 674175, which prevent the aptdaemon backend to be loaded in Natty.
Thanks.

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

Jean-Baptiste,

Thanks! I found it surprisingly difficult to find any documentation about the semantics of that second argument. Do you have a reference for that?

I just pushed an update with your suggested change. I'll start another PPA build and then test it in my Natty VM. If that works, I'll ask Michael for a merge proposal.

ppa:pythoneers/py27stack4

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Well, the only piece of "reference documentation" I'm aware of is ... the source code, thanks to the explicit naming of the arguments of the callback _on_backend_done in UpdateManager/UpdateManager.py

Thanks for your help on this fix.

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

/me sees the light bulb go on!

Now I get it. Thanks. :)

Revision history for this message
Noel J. Bergman (noeljb) wrote :

I confirm that the patch fixes the problem.

Michael Vogt (mvo)
Changed in update-manager (Ubuntu):
status: In Progress → Fix Committed
Changed in update-manager:
status: In Progress → Fix Committed
Michael Vogt (mvo)
description: updated
Changed in update-manager (Ubuntu Maverick):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted update-manager into maverick-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 Maverick):
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.145.2

---------------
update-manager (1:0.145.2) natty; urgency=low

  [ Barry Warsaw ]
  * Add required details to .emit() call. (LP: #631328)

  [ Michael Vogt ]
  * debian/control:
    - add or-dependency for python-aptdaemon-gtk and drop gksu
      dependency (its either brought in via synaptic or not needed)
  * UpdateManager/Core/utils.py:
    - add get_arch() call
  * DistUpgrade/DistUpgradeController.py, DistUpgrade/DistUpgradeQuirks.py:
    - use new utils.get_arch() call
  * merged fixes from lp:~ubuntu-core-dev/update-manager/maverick
  * debian/rules:
    - push EOLReleaseAnnouncement to the server too
 -- Michael Vogt <email address hidden> Fri, 12 Nov 2010 15:56:32 +0100

Changed in update-manager (Ubuntu Natty):
status: Fix Committed → Fix Released
tags: added: mago
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Verified that update-manager no longer hangs. I installed Ubuntu 10.10 in VirtualBox, and ran updates. I then reproduced the original issue following the TestCase given. I then installed -proposed, installed the fixed update-manager, and ran test case again. The error no longer prints in terminal, and update manager completes the check for new updates.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
update-manager (1:0.142.22) maverick-proposed; urgency=low

  [ Barry Warsaw ]
  * Add required details to .emit() call when running with
    synaptic as the backend (LP: #631328)

  [ Michael Vogt ]
  * DistUpgrade/DistUpgradeQuirks.py:
    - fixes in the cmov quirks handler (LP: #587186)
      (thanks to Jean-Baptiste Lallement)
 -- Michael Vogt <email address hidden> Fri, 12 Nov 2010 09:30:28 +0100

Changed in update-manager (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
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.