session-installer crashed with AlreadyCalledDeferred in callback()

Bug #848605 reported by Khairul Nizam
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
sessioninstaller (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
High
Michael Terry

Bug Description

[IMPACT]

 * This can prevent users from installing helper packages needed to do their work (for example, can prevent opening rar, 7z, or jnlp files).

 * In addition, this is a highly reported crash on errors.ubuntu.com, so we know it affects many users.

 * The proposed fix just makes a certain deferral callback not be called twice, avoiding the assertion crash.

[TESTCASE]

 * Unfortunately, I could not reproduce. So the patch is only based on code analysis. Someone that can reproduce needs to test it. I'm hoping by being accepted into precise-proposed, that will make it easier for the affected audience to test.

 * But the indicated reproduction steps as reported are:
0) Make sure you don't have rar installed: sudo apt-get purge rar unrar
1) Download a rar file. Try http://www.philipp-winterberg.com/download/example.rar
2) Open that file with file-roller
3) Try to install the necessary packages to open it

[Regression Potential]

 * Regression potential is low. In the worst case, I could imagine if the patch is bogus, I could imagine the installation dialog would just stay open indefinitely because the deferral callback never got called.

[Patch]

The patch is simple:

--- sessioninstaller-0.20+bzr128.orig/sessioninstaller/backends/aptd.py
+++ sessioninstaller-0.20+bzr128/sessioninstaller/backends/aptd.py
@@ -44,12 +44,11 @@ class AptDaemonBackend(object):
     def _run_trans(self, trans, parent, interaction):
         deferred = defer.Deferred()
         dia = aptdaemon.gtk3widgets.AptProgressDialog(trans)
- dia.connect("finished", lambda x: deferred.callback())
         if parent:
             dia.realize()
             dia.set_transient_for(parent)
         dia.run(close_on_finished=True, show_error=True,
- reply_handler=lambda: True,
+ reply_handler=deferred.callback,
                 error_handler=deferred.errback)
         return deferred

=========================================================

unable to do partial upgrade

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: sessioninstaller 0.20+bzr120-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-11.17-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
ApportVersion: 1.22.1-0ubuntu2
Architecture: i386
Date: Tue Sep 13 12:58:04 2011
ExecutablePath: /usr/bin/session-installer
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110901)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/session-installer
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
PythonArgs: ['/usr/bin/session-installer']
SourcePackage: sessioninstaller
Title: session-installer crashed with AlreadyCalledDeferred in callback()
UpgradeStatus: Upgraded to oneiric on 2011-09-13 (0 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Khairul Nizam (khoirulniezam) wrote :
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 sessioninstaller (Ubuntu):
status: New → Confirmed
visibility: private → public
Revision history for this message
HaddadR (hr-haddad) wrote :

 uname -a : Linux HP-Ub 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I tried to open a .rar file -> Ubuntu proposed to install Rar package -> installation crached

Revision history for this message
Håvard Gulldahl (havard) wrote :

Ditto -- in my case a 7z archive

Revision history for this message
Corey Whitaker (whitaker-corey) wrote :

I just had the same bug. As someone else stated, I was using the Ubuntu tool for finding software to open a file (in this case a JNLP file.) I was asked to authenticate, I'm positive I typed my password correctly but it didn't authenticate. I tried 2 more times and then the program crashed.

tags: added: precise
Changed in sessioninstaller (Ubuntu):
importance: Undecided → Medium
Revision history for this message
willam's de carvalho (willamscarvalho) wrote :

I installed the 12 version of ubuntu and after a few hours the message of internal error in a first locked the notebook and a desktop, could not even operate more machines. Because of this reinstalled the OS and the same problem persists .. what is happening ... need to respond because I want to install ubuntu on the machines of the school work

Revision history for this message
Sebastien Bacher (seb128) wrote :

Hey Michael, that bug is one of the frequent issue we get on errors.ubuntu.com, is there any chance you could have a look to it?

Changed in sessioninstaller (Ubuntu Precise):
importance: Undecided → High
milestone: none → ubuntu-12.04.1
assignee: nobody → Michael Terry (mterry)
Changed in sessioninstaller (Ubuntu Precise):
status: New → Triaged
Changed in sessioninstaller (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Steve Kroon (kroon) wrote :

I got referred to this bug by my system. Before that, Rhythmbox had prompted me if I wanted to install plugins, and it was trying to install them. This failed with the error message below. Other possibly relevant information: at the time this happened, the Update Manager was open (but not active - i.e. not downloading/installing updates).

Error message:

session-installer (Window Title)

An unhandlable error occured

There seems to be a programming error in aptdaemon, the software that allows you to install/remove software and to perform other package management related tasks.

Details:

org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Revision history for this message
Michael Terry (mterry) wrote :

I just can't reproduce this, using the try-to-open-a-rar method. Does anyone have reliable reproduction steps?

I do have a guess though. Will upload a package to precise-proposed for testing for those that this does affect.

Revision history for this message
Michael Terry (mterry) wrote :

Before that package lands for testing, the adventurous can try putting this file in /usr/share/pyshared/sessioninstaller/backends/aptd.py

Changed in sessioninstaller (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote :

Needs to have the proper elements of an SRU in the bug before accepting:

https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

Changed in sessioninstaller (Ubuntu Precise):
status: In Progress → Incomplete
Michael Terry (mterry)
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Khairul, or anyone else affected,

Accepted sessioninstaller into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/sessioninstaller/0.20+bzr128-0ubuntu1.1 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 sessioninstaller (Ubuntu Precise):
status: Incomplete → Fix Committed
tags: added: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote :

errors.ubuntu.com shows no instances of this error with the version in precise-proposed, vs. over 3000 in the month of August with the previous version. As we do see numerous crash reports for bugs present in precise-proposed, the fact that there have been no reports at all seems to be ample evidence that the bug is fixed.

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

This bug was fixed in the package sessioninstaller - 0.20+bzr128-0ubuntu1.1

---------------
sessioninstaller (0.20+bzr128-0ubuntu1.1) precise-proposed; urgency=low

  * debian/patches/fix-defer-callback.patch:
    - Make sure not to accidentally call defer.callback() twice
      (LP: #848605)
 -- Michael Terry <email address hidden> Mon, 23 Jul 2012 16:18:37 -0400

Changed in sessioninstaller (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sessioninstaller - 0.20+bzr128-0ubuntu1.1

---------------
sessioninstaller (0.20+bzr128-0ubuntu1.1) precise-proposed; urgency=low

  * debian/patches/fix-defer-callback.patch:
    - Make sure not to accidentally call defer.callback() twice
      (LP: #848605)
 -- Michael Terry <email address hidden> Mon, 23 Jul 2012 16:18:37 -0400

Changed in sessioninstaller (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

This was not yet in trunk, I committed it now under Michael's name (r130).

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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