False apt_pkg.CacheMismatchError

Bug #1871149 reported by errors.ubuntu.com bug bridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Python-apt throws CacheMismatchError which is almost certainly false:

Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 2512, in <module>
    sys.exit(main(options))
  File "/usr/bin/unattended-upgrade", line 1986, in main
    res = run(options, rootdir, mem_log, logfile_dpkg,
  File "/usr/bin/unattended-upgrade", line 2398, in run
    new_pending_autoremovals = get_auto_removable(cache)
  File "/usr/bin/unattended-upgrade", line 1789, in get_auto_removable
    return {pkg.name for pkg in cache
  File "/usr/bin/unattended-upgrade", line 1790, in <setcomp>
    if pkg.is_auto_removable}
  File "/usr/lib/python3/dist-packages/apt/package.py", line 1269, in is_auto_removable
    self._pcache._depcache.is_garbage(self._pkg))
apt_pkg.CacheMismatchError: Object of different cache passed as argument to apt_pkg.DepCache method

The relevant code in u-u:

def get_auto_removable(cache):
    # type: (apt.Cache) -> AbstractSet[str]
    return {pkg.name for pkg in cache
            if pkg.is_auto_removable}

---

The Ubuntu Error Tracker has been receiving reports about a problem
regarding unattended-upgrades. This problem was most recently seen with package version 2.1, the problem page at https://errors.ubuntu.com/problem/ff08f6aa104f8e3233da3081835ecc2e9f0452f5 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/.

Balint Reczey (rbalint)
summary: - /usr/bin/unattended-
- upgrade:apt_pkg.CacheMismatchError:/usr/bin/unattended-
- upgrade@2512:main:run:get_auto_removable:<setcomp>:is_auto_removable
+ False apt_pkg.CacheMismatchError
description: updated
affects: unattended-upgrades (Ubuntu) → python-apt (Ubuntu)
Balint Reczey (rbalint)
tags: added: rls-ff-incoming
Revision history for this message
Julian Andres Klode (juliank) wrote :

Needs a reproducer

Changed in python-apt (Ubuntu):
status: New → Incomplete
Balint Reczey (rbalint)
tags: removed: rls-ff-incoming
tags: added: id-5e8dd41b421c45209b1bd8e6
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python-apt (Ubuntu) because there has been no activity for 60 days.]

Changed in python-apt (Ubuntu):
status: Incomplete → Expired
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.