/usr/bin/update-manager:AttributeError:/usr/bin/update-manager@118:start_update:start_available:refresh_cache:update

Bug #1826213 reported by errors.ubuntu.com bug bridge
108
This bug affects 54 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
High
Brian Murray
Bionic
Fix Released
Undecided
Brian Murray
Eoan
Fix Released
Undecided
Brian Murray
Focal
Fix Released
Undecided
Brian Murray

Bug Description

[Impact]
update-manager is crashing frequently causing a bad user experience.

[Test Case]
The crash happens when an AssertionError is raised in MyCache but I haven't figure out how to recreate that. So here's a way to force an assertion error.

1) edit the MyCache class's __init__ function (found in UpdateManager/Core/MyCache.py) to 'raise AssertionError' which will simulate having a dirty journal or broken packages
2) run update-manager and observe the Traceback in comment #1

With the version of update-manager from -proposed you'll no longer receive a Traceback you'll instead see a "Not all updates can be installed" dialog. Additionally, after clicking continue in that dialog you'll be presented with another dialog that says "Software index is broken".

We can also use the bucket in the Error Tracker to confirm that there are no crashes with the version of the package from -proposed.

[Regression Potential]

Original Description
--------------------
The Ubuntu Error Tracker has been receiving reports about a problem regarding update-manager. This problem was most recently seen with package version 1:19.04.5, the problem page at https://errors.ubuntu.com/problem/1bcfccc6ceab83c6e401f14c655c1cd5045be5d4 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Related branches

tags: added: rls-ff-incoming
tags: added: focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Here's the Traceback:

Traceback (most recent call last):
  File "/usr/bin/update-manager", line 118, in <module>
    app.start_update()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 215, in start_update
    self.start_available()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 233, in start_available
    self.refresh_cache()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 390, in refresh_cache
    self.update_list.update(self.cache, eventloop_callback=iterate)
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 479, in update
    self.distUpgradeWouldDelete = cache.saveDistUpgrade()
AttributeError: 'NoneType' object has no attribute 'saveDistUpgrade'

tags: removed: rls-ff-incoming
tags: added: id-5e4591c86f580c588732b8d3
Revision history for this message
Brian Murray (brian-murray) wrote :

I made a spot check of the first few crashes in the Error Tracker and curiously they all have:

ProcCmdline /usr/bin/python3 /usr/bin/update-manager --no-update

Changed in update-manager (Ubuntu Focal):
milestone: none → ubuntu-20.04.1
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in update-manager (Ubuntu Focal):
status: New → Confirmed
Changed in update-manager (Ubuntu):
status: New → Confirmed
Changed in update-manager (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

A hackish test case for this bug involves the following:

1) edit the MyCache class's __init__ function (found in UpdateManager/Core/MyCache.py) to 'raise AssertionError' which will simulate having a dirty journal or broken packages
2) comment out 'self.window_main.duplicate_packages = self.get_deb2snap_dups()' in UpdateManager/backend/__init__.py as that will also Traceback on an AssertionError with the Traceback seen in bug 1880987

Having made those changes you'll get the Traceback in this bug and with the version from -proposed you'll see a 'Not all updates can be installed' dialog.

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

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

---------------
update-manager (1:20.04.12) groovy; urgency=medium

  * Fix hang in apturl-gtk. (LP: #1874591)
  * Fix crash in snap updates when refreshing the cache fails. (LP: #1880987)

 -- Marcus Tomlinson <email address hidden> Thu, 28 May 2020 10:11:51 +0100

Changed in update-manager (Ubuntu):
status: In Progress → Fix Released
Changed in update-manager (Ubuntu Bionic):
status: New → Confirmed
Changed in update-manager (Ubuntu Eoan):
status: New → Confirmed
Changed in update-manager (Ubuntu Focal):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
description: updated
Changed in update-manager (Ubuntu Eoan):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
Changed in update-manager (Ubuntu Bionic):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted update-manager into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:20.04.10.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 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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 Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted update-manager into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:19.04.8.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 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, what testing has been performed on the package and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. 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 Eoan):
status: In Progress → Fix Committed
tags: added: verification-needed-eoan
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello errors.ubuntu.com, 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.13 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, what testing has been performed on the package 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-bionic
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

I followed the test case on Ubuntu 20.04 LTS with update-manager version 20.04.10.1 from focal-proposed and saw the dialog boxes instead of the Traceback - setting to verification-done.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

I also followed the test case on Ubuntu 19.10 and update-manager version 1:19.04.8.1 from eoan-proposed. When the AssertionError was raised I saw the dialog boxes instead of the Traceback.

tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested the version of update-manger, 1:18.04.11.13, from bionic-proposed and did not receive the Traceback when I forced an AssertionError. I also saw the dialog boxes with the version of update-manager from -proposed.

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

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

---------------
update-manager (1:20.04.10.1) focal; urgency=medium

  * UpdateManager/UpdateManager.py: when refreshing the cache and encountering
    an error return rather than trying to use the undefined cache which causes
    crashes. Additionally, don't present the dialog with a "Try Again" button
    which won't do anything. (LP: #1826213)
  * Fix hang in apturl-gtk. (LP: #1874591)
  * Fix crash in snap updates when refreshing the cache fails. (LP: #1880987)

 -- Brian Murray <email address hidden> Wed, 03 Jun 2020 10:18:00 -0700

Changed in update-manager (Ubuntu Focal):
status: Fix Committed → Fix Released
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 is now being 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:19.04.8.1

---------------
update-manager (1:19.04.8.1) eoan; urgency=medium

  * UpdateManager/UpdateManager.py: when refreshing the cache and encountering
    an error return rather than trying to use the undefined cache which causes
    crashes. Additionally, don't present the dialog with a "Try Again" button
    which won't do anything. (LP: #1826213)

 -- Brian Murray <email address hidden> Wed, 03 Jun 2020 11:23:38 -0700

Changed in update-manager (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * UpdateManager/UpdateManager.py: when refreshing the cache and encountering
    an error return rather than trying to use the undefined cache which causes
    crashes. Additionally, don't present the dialog with a "Try Again" button
    which won't do anything. (LP: #1826213)

 -- Brian Murray <email address hidden> Wed, 03 Jun 2020 11:41:50 -0700

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