/usr/bin/update-manager:TypeError:/usr/bin/update-manager@118:start_update:start_available:refresh_cache:update:_make_groups:__contains__

Bug #1913476 reported by errors.ubuntu.com bug bridge
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
High
William Wilson
Focal
Fix Released
High
William Wilson
Groovy
Fix Released
High
William Wilson

Bug 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:20.04.10.3, the problem page at https://errors.ubuntu.com/problem/b4e18d21aa7526e3a98130b1556e4d38ffaff9e0 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/.

[Impact]

 * With update-manager versions 1:20.04.10.3 or 1:20.10.2,
   update-manager would crash while processing the apt
   cache.

[Test Case]

 * Look at the Error Tracker issues and make sure the
   versions 1:20.04.11 and 1:20.10.3 do not cause this
   same error.

[Where problems could occur]

 * If apt is ever processing a package without the name
   field, it couldcause a crash. This scenario would likely
   cause a crash in many other parts of the code other than
   what is being changed here

Related branches

Revision history for this message
William Wilson (jawn-smith) wrote :

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 220, in start_update
    self.start_available()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 238, in start_available
    self.refresh_cache()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 435, in refresh_cache
    duplicate_packages=self.duplicate_packages)
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 531, in update
    eventloop_callback)
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 444, in _make_groups
    if pkg in cache:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 350, in __contains__
    return self.__is_real_pkg(self._cache[key])
TypeError: Expected a string or a pair of strings

This is due to apt.package.Package objects being added to a list of strings.

Changed in update-manager (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
William Wilson (jawn-smith) wrote :

Attached is a patch to SRU focal.

Revision history for this message
William Wilson (jawn-smith) wrote :

Attached is a patch to SRU groovy.

Mathew Hodson (mhodson)
Changed in update-manager (Ubuntu Focal):
importance: Undecided → High
Changed in update-manager (Ubuntu Groovy):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
update-manager (1:21.04.5) hirsute; urgency=medium

  * Fix crash caused by adding apt package objects to a list of
    strings (LP: #1913476)

 -- William 'jawn-smith' Wilson <email address hidden> Wed, 27 Jan 2021 13:25:29 -0600

Changed in update-manager (Ubuntu):
status: Triaged → Fix Released
description: updated
Changed in update-manager (Ubuntu):
assignee: nobody → Tiago Stürmer Daitx (tdaitx)
Changed in update-manager (Ubuntu Focal):
status: New → In Progress
Changed in update-manager (Ubuntu Groovy):
status: New → In Progress
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Patch for Focal is ok, the one on Groovy had an unnecessary removal of .bzrignore so I didn't apply those bits.

Build and lintian are ok for both Focal and Groovy.

Changed in update-manager (Ubuntu):
assignee: Tiago Stürmer Daitx (tdaitx) → nobody
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

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

Accepted update-manager into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:20.10.3 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-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (update-manager/1:20.10.3)

All autopkgtests for the newly accepted update-manager (1:20.10.3) for groovy have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-release-upgrader/1:20.10.14 (ppc64el)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/groovy/update_excuses.html#update-manager

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

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

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

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

  * Revert to 1:20.10.1 (LP: #1912718)

 -- Julian Andres Klode <email address hidden> Fri, 29 Jan 2021 12:53:08 +0100

Changed in update-manager (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

The version 1:20.10.3 has been reverted with 1:20.10.4, so this will need to be re-uploaded.

Changed in update-manager (Ubuntu Groovy):
status: Fix Released → In Progress
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 groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:20.10.5 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-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 Groovy):
status: In Progress → Fix Committed
Revision history for this message
William Wilson (jawn-smith) wrote :

The verification passed for focal. The attached image shows the latest version has staged many packages for upgrade without crashing.

Revision history for this message
William Wilson (jawn-smith) wrote :

The verification passed for Groovy. The attached image shows update-manager has staged many packages for upgrade without crashing.

Changed in update-manager (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-done verification-done-focal verification-done-groovy
removed: verification-needed verification-needed-groovy
Changed in update-manager (Ubuntu):
assignee: nobody → William Wilson (jawn-smith)
Changed in update-manager (Ubuntu Focal):
assignee: nobody → William Wilson (jawn-smith)
Changed in update-manager (Ubuntu Groovy):
assignee: nobody → William Wilson (jawn-smith)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * UpdateManager/Core/UpdateList.py: change to a regex from a static list
    of packages to be grouped under Ubuntu Base (LP: #1902025)
  * Clean up apt cache binary files left behind by tests
  * Rename meta_pkgs to ubuntu_base_pkgs to make it more clear to the
    reader which packages should be included
  * Add tests in to ensure Ubuntu base packages are not grouped when
    staged for removal (LP: #1912718)
  * Fix crash caused by adding apt package objects to a list of
    strings (LP: #1913476)

 -- William 'jawn-smith' Wilson <email address hidden> Wed, 10 Feb 2021 14:22:58 -0600

Changed in update-manager (Ubuntu Groovy):
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
Brian Murray (brian-murray) wrote :

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

  * UpdateManager/Core/UpdateList.py: change to a regex from a static list
    of packages to be grouped under Ubuntu Base (LP: #1902025)
  * Clean up apt cache binary files left behind by tests
  * Rename meta_pkgs to ubuntu_base_pkgs to make it more clear to the
    reader which packages should be included
  * Add tests in to ensure Ubuntu base packages are not grouped when
    staged for removal (LP: #1912718)

 -- William 'jawn-smith' Wilson <email address hidden> Wed, 10 Feb 2021 14:39:27 -0600

Changed in update-manager (Ubuntu Focal):
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.