TypeError: _action_done() got an unexpected keyword argument 'trans_failed'

Bug #1795898 reported by Balint Reczey
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Balint Reczey

Bug Description

[Impact]

Lazy imports made update-manager crash when an update-manager
update changed the backend API and an updated incompatible backend
was loaded to the not updated running update-manager process.

The issue causes crashes upon update-manager updates harming the upgrade experience for users.

The fix avoids lazy loading of the backend modules but still honors the backend selection options.

[Test Case]

1. Start with a fully upgraded system and downgrade a few packages to let u-m upgrade them:
$ sudo eatmydata apt install -y --allow-downgrades gnome-software=3.28.1-0ubuntu4 gnome-software-common=3.28.1-0ubuntu4

2. Start u-m with:
 $ update-manager --no-update

3. Make a syntax error in /usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py

4. Press "Install Now" on u-m GUI.
 The fixed u-m will successfully perform the installation, the unfixed one will fail with SyntaxError.

[Regression Potential]

Wrong changes to the backend import/selection logic could make u-m unable to find the available backends, but in my testing the fixed version could properly find both aptdaemon and synaptic when they were present.

[Original Bug Text]

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 242, in _on_finished
    trans_failed=trans_failed)
TypeError: _action_done() got an unexpected keyword argument 'trans_failed'

Related branches

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
Balint Reczey (rbalint)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
update-manager (1:18.10.10) cosmic; urgency=medium

  * Stop lazy import of InstallBackends.
    Lazy imports made update-manager crash when an update-manager
    update changed the backend API and an updated incompatible backend
    was loaded to the not updated running update-manager process. (LP: #1795898)
  * Cancel transaction on exit only when Cancel button is active.
    Also ignore exception when cancellation fails. (LP: #1790670)

 -- Balint Reczey <email address hidden> Thu, 04 Oct 2018 21:06:35 +0200

Changed in update-manager (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This would also cause empty panels and hangs in the package resolver actions, I tried your upload from bionic-unapproved and put it to [1].
With that my issue is resolved as well (marekd it as a Dup)

[1]: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3472

Changed in update-manager (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Balint Reczey (rbalint)
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Balint, or anyone else affected,

Accepted update-manager into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:18.04.11.6 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 on 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 add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in update-manager (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Balint Reczey (rbalint) wrote :

Tested with 1:18.04.11.6, the fix works as expected.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for update-manager 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 regressions.

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

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

---------------
update-manager (1:18.04.11.6) bionic; urgency=medium

  * Keep or delete packages after looping over all of them.
    This prevents the resolver from changing the packages in the loop resulting
    in not keeping some phased packages back from being upgraded. (LP: #1072136)
  * Stop lazy import of InstallBackends.
    Lazy imports made update-manager crash when an update-manager
    update changed the backend API and an updated incompatible backend
    was loaded to the not updated running update-manager process. (LP: #1795898)
  * Cancel transaction on exit only when Cancel button is active.
    Also ignore exception when cancellation fails. (LP: #1790670)

 -- Balint Reczey <email address hidden> Thu, 04 Oct 2018 21:33:57 +0200

Changed in update-manager (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Balint, or anyone else affected,

Accepted update-manager into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:16.04.15 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 on 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 add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in update-manager (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
removed: verification-done
Revision history for this message
Balint Reczey (rbalint) wrote :

Verified with 1:16.04.15 on Xenial.

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

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

---------------
update-manager (1:16.04.15) xenial; urgency=medium

  * Keep or delete packages after looping over all of them.
    This prevents the resolver from changing the packages in the loop resulting
    in not keeping some phased packages back from being upgraded. (LP: #1072136)
  * Stop lazy import of InstallBackends.
    Lazy imports made update-manager crash when an update-manager
    update changed the backend API and an updated incompatible backend
    was loaded to the not updated running update-manager process. (LP: #1795898)
  * Cancel transaction on exit only when Cancel button is active.
    Also ignore exception when cancellation fails. (LP: #1790670)
  * Make commit()'s last parameter optional for avoiding crash on upgrade
    (LP: #1771894)

 -- Balint Reczey <email address hidden> Thu, 04 Oct 2018 21:51:10 +0200

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