Update-manager crashes in _show_transaction due to packages being already removed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-manager (Ubuntu) |
Fix Released
|
High
|
Balint Reczey | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Update-manager crashes when it tries to remove a package that was already removed since update-manager refreshed its cache. A typical scenario is when the list of available packages is updated, then update-manager pops up to notify the user about the updates. The user is not in front of the screen and unattended-upgrades installs the security updates and removes unused kernels making the list of updates shown to the user outdated. User clicks "Install now" and update-manager crashes.
* The fix obtains a fresh cache and skips package operations that would be obsolete and result an exception.
[Test Case ]
(with Bionic's package names)
* Install older kernel packages, downgrade a few packages and mark the kernels autoremovable:
$ sudo eatmydata apt install -y --allow-downgrades linux-headers-
* Start update-manager in a different terminal and _don't_ start the upgrade
* Remove kernel packages behind u-m's back:
$ sudo eatmydata apt remove -y linux-headers-
* Start the update on update-manager's GUI and observe it not crashing with the fixed version
[Regression Potential]
* Too eager filtering could let packages not updated/not removed, but the next run of update-manager would retry updating/removing them.
* Obtaining a fresh cache takes a ~100 milliseconds and the GUI may freeze for that time. For this short time u-m could show itself busy but IMO it would be more disturbing than the potentially not noticeable freeze.
[Original bug text]
The Ubuntu Error Tracker has been receiving reports about a problem regarding update-manager. This problem was most recently seen with package version 1:18.04.11.4, the problem page at https:/
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://
Related branches
- Julian Andres Klode: Approve
- Brian Murray: Pending requested
-
Diff: 159 lines (+50/-14)5 files modifiedUpdateManager/Core/MyCache.py (+2/-0)
UpdateManager/UpdateManager.py (+2/-2)
UpdateManager/backend/InstallBackendAptdaemon.py (+9/-1)
UpdateManager/backend/__init__.py (+23/-11)
debian/changelog (+14/-0)
- Brian Murray: Pending requested
- Julian Andres Klode: Pending requested
- Ubuntu Core Development Team: Pending requested
-
Diff: 159 lines (+50/-14)5 files modifiedUpdateManager/Core/MyCache.py (+2/-0)
UpdateManager/UpdateManager.py (+2/-2)
UpdateManager/backend/InstallBackendAptdaemon.py (+9/-1)
UpdateManager/backend/__init__.py (+23/-11)
debian/changelog (+14/-0)
description: | updated |
Changed in update-manager (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Balint Reczey (rbalint) |
summary: |
- /usr/bin/update-manager: Package linux-headers-4.15.0-30 isn't - installed(org.debian.apt.TransactionFailed):_inline_callbacks:commit:_inline_callbacks:_show_transaction + Update-manager crashes in _show_transaction due to packages being + already removed |
description: | updated |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
This bug was fixed in the package update-manager - 1:18.10.8
---------------
update-manager (1:18.10.8) cosmic; urgency=medium
* Print transaction error and let the user try again applying updates
(LP: #1317164)
* Don't ask backend to do package operations aready done.
Aptdaemon cancels the transaction when asked to remove packages already
removed which results the failure being shown to the user. This
is unnecessary as update-manager can just filter the package operations to
be done using a fresh cache and decrease the likelyhood of hitting
a race condition where packages to be removed are already removed.
(LP: #1791931)
-- Balint Reczey <email address hidden> Tue, 11 Sep 2018 13:40:57 +0200