Show reason of TransactionFailed and let the user try again instead of crashing

Bug #1317164 reported by Brian Murray on 2014-05-07
This bug affects 127 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
High
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 shows the reason of the transaction failure then asks offers the user to try again.

[Test Case ]
 (with Bionic's package names)

 * Revert the patch for LP: #1791931 since it shadows the issue by filtering the package operations in advance.

 * Install older kernel packages, downgrade a few packages and mark the kernels autoremovable:
   $ sudo eatmydata apt install -y --allow-downgrades linux-headers-4.15.0-32 linux-headers-4.15.0-32-generic libpoppler73=0.62.0-2ubuntu2 poppler-utils=0.62.0-2ubuntu2 ; sudo /etc/kernel/postinst.d/apt-auto-removal ; sudo apt-mark auto linux-headers-4.15.0-32 linux-headers-4.15.0-32-generic

 * 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-4.15.0-32

 * Start the update on update-manager's GUI and observe it not crashing with the fixed version but showing the reason of the update failing and offering trying it again.

[Regression Potential]

 * Inaccurate exception handling could shadow other problems.

[Original bug text]

On errors.ubuntu.com there are multiple crashes reported about update-manager that end in a Traceback like the following:

aptdaemon.errors.TransactionFailed: Transaction failed: The package system is broken
 The following packages have unmet dependencies:

rhythmbox-plugin-magnatune: Depends: rhythmbox (= 3.0.2-0ubuntu2) but 3.0.2-0ubuntu1 is installed

Naturally, the package name varies. I don't believe these are actually crashes about update-manager or aptdaemon. Rather there is something wrong with the users package system. Subsequently, it'd be better if these were not reported to the error tracker and clogging up the bug lists.

Related branches

tags: added: trusty utopic
Changed in update-manager (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-14.10
Launchpad Janitor (janitor) wrote :

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

Changed in update-manager (Ubuntu):
status: New → Confirmed

The bug report being referred to is bug #1097946 software-center crashed with TransactionFailed in _run_transaction(): <unprintable TransactionFailed object>

Changed in update-manager (Ubuntu):
milestone: ubuntu-14.10 → ubuntu-15.04
tags: added: rls-v-incoming
tags: added: rls-v-notfixing
removed: rls-v-incoming
Martin Pitt (pitti) on 2015-04-20
Changed in update-manager (Ubuntu):
milestone: ubuntu-15.04 → vivid-updates
Brian Murray (brian-murray) wrote :

Thinking about this some more I think there is actually something wrong here, possibly people trying to install updates who have an outdated package list, and that we should not mask these issue by not reporting them.

Changed in update-manager (Ubuntu):
milestone: vivid-updates → none
peterstan (stasnel) on 2015-08-22
Changed in update-manager (Ubuntu):
status: Confirmed → Fix Released
Changed in update-manager (Ubuntu):
status: Fix Released → Confirmed
tags: added: id-5b97ab08c18adb87fe7517e3
Balint Reczey (rbalint) on 2018-09-12
Changed in update-manager (Ubuntu):
status: Confirmed → In Progress
summary: - update-manager / aptdaemon TransactionFailed crashes are not problems
- with update-manager
+ Show reason of TransactionFailed and let the user try again instead of
+ crashing
Balint Reczey (rbalint) on 2018-09-12
description: updated
Balint Reczey (rbalint) on 2018-09-13
Changed in update-manager (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

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

Changed in update-manager (Ubuntu):
status: Fix Committed → Fix Released
Download full text (3.2 KiB)

Thanks for the update. IT was my error / I never believe, i would get a
reply.

On Thu, Sep 13, 2018 at 11:25 AM Balint Reczey <email address hidden>
wrote:

> ** Changed in: update-manager (Ubuntu)
> Status: In Progress => Fix Committed
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1764746).
> https://bugs.launchpad.net/bugs/1317164
>
> Title:
> Show reason of TransactionFailed and let the user try again instead of
> crashing
>
> Status in update-manager package in Ubuntu:
> Fix Committed
>
> 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 shows the reason of the transaction failure then asks
> offers the user to try again.
>
> [Test Case ]
> (with Bionic's package names)
>
> * Revert the patch for LP: #1791931 since it shadows the issue by
> filtering the package operations in advance.
>
> * Install older kernel packages, downgrade a few packages and mark the
> kernels autoremovable:
> $ sudo eatmydata apt install -y --allow-downgrades
> linux-headers-4.15.0-32 linux-headers-4.15.0-32-generic
> libpoppler73=0.62.0-2ubuntu2 poppler-utils=0.62.0-2ubuntu2 ; sudo
> /etc/kernel/postinst.d/apt-auto-removal ; sudo apt-mark auto
> linux-headers-4.15.0-32 linux-headers-4.15.0-32-generic
>
> * 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-4.15.0-32
>
> * Start the update on update-manager's GUI and observe it not
> crashing with the fixed version but showing the reason of the update
> failing and offering trying it again.
>
> [Regression Potential]
>
> * Inaccurate exception handling could shadow other problems.
>
> [Original bug text]
>
> On errors.ubuntu.com there are multiple crashes reported about update-
> manager that end in a Traceback like the following:
>
> aptdaemon.errors.TransactionFailed: Transaction failed: The package
> system is broken
> The following packages have unmet dependencies:
>
> rhythmbox-plugin-magnatune: Depends: rhythmbox (= 3.0.2-0ubuntu2) but
> 3.0.2-0ubuntu1 is installed
>
> Naturally, the package name varies. I don't believe these are actually
> crashes about update-manager or aptdaemon. Rather there is something
> wrong with the users package system. Subsequently, it'd be better if
> these were not reported to the error tracker and clogging up the bug
> lists.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1317164/+subscriptions
>

--
*GOD BLESS AMERICA**! ...

Read more...

To post a comment you must log in.