[Bug 1983003] Re: (focal) crashed due to _tryMarkObsoleteForRemoval failed for 'libpackagekit-glib2-18'
Launchpad Bug Tracker
1983003 at bugs.launchpad.net
Mon Oct 3 04:17:27 UTC 2022
[Expired for ubuntu-release-upgrader (Ubuntu) because there has been no
activity for 60 days.]
** Changed in: ubuntu-release-upgrader (Ubuntu)
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1983003
Title:
(focal) crashed due to _tryMarkObsoleteForRemoval failed for
'libpackagekit-glib2-18'
Status in ubuntu-release-upgrader package in Ubuntu:
Expired
Bug description:
Running `sudo do-release-upgrade --mode=server` from Ubuntu 20.04 to
Ubuntu 22.04 failed during the `Searching for obsolete software`.
Viewing `/var/log/dist-upgrade/main.log` (see attached) shows that
when an exception is raised by the `pkg.mark_delete()` from
`self.restore_snapshot()`, the exception handler also calls
`self.restore_snapshot()` and `pkg.mark_delete()`, which crashes `do-
release-upgrade`.
It failed at:
```
DEBUG Start checking for obsolete pkgs
... <removed for brevity, see attachment for full logs>
DEBUG package 'libpackagekit-glib2-18' produces an unwanted removal 'update-manager', skipping
WARNING _tryMarkObsoleteForRemoval failed for 'libpackagekit-glib2-18' (Error('E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'): E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.)
ERROR not handled exception:
...<removed for brevity, see attachment for full logs>
```
Attached is my `/var/log/dist-upgrade/main.log`.
I tried to report the bug via `apport` following the instructions in
https://help.ubuntu.com/community/ReportingBugs, but both `apport-cli`
and `apport-gtk` seemed to do nothing. I tried checking the Ubuntu
error tracker with my `/var/lib/whoopsie/whoopsie-id` and nothing
seems to be uploaded too (maybe I need to open an apport-cli/whoopsie
bug too), so I decided to make a launchpad bug instead.
Potentially useful notes for the device:
- It's originally had Ubuntu 18.04 desktop, before upgrading to Ubuntu 20.04, and I removed a bunch of desktop packages once it became a server.
1) `lsb_release -rd` shows `Release: 22.04` (was 20.04.1 before the upgrade)
2) `apt-cache policy ubuntu-release-upgrader-core` shows `Installed: 1:22.04.12` but according to my `/apt/log/apt/history`, my previously installed version was `1:20.04.38`.
3) I expected the upgrade to succeed successfully
If it failed, I would at least expect an error message (or otherwise graceful exit)
4) Crashed with no obvious error, unhanded python exception can only be seen in logfile.
Not a major issue since my system still works and `sudo apt autoremove` removed most of those
files anyway.
---
Useful excerpt from my `_usr_bin_do-release-upgrade.0.crash` file
PythonArgs: ['/usr/bin/do-release-upgrade', '--mode=server', '--frontend=DistUpgradeViewText']
Traceback:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeCache.py", line 992, in tryMarkObsoleteForRemoval
self.restore_snapshot()
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeCache.py", line 370, in restore_snapshot
pkg.mark_delete()
File "/usr/lib/python3/dist-packages/apt/package.py", line 1524, in mark_delete
apt_pkg.Error: E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-ankkoy9i/jammy", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeMain.py", line 241, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeController.py", line 2042, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeController.py", line 2018, in fullUpgrade
self.doPostUpgrade()
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeController.py", line 1467, in doPostUpgrade
if not self.cache.tryMarkObsoleteForRemoval(pkgname, remove_candidates, self.forced_obsoletes, self.foreign_pkgs):
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeCache.py", line 243, in wrapper
res = f(*args, **kwargs)
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeCache.py", line 996, in tryMarkObsoleteForRemoval
self.restore_snapshot()
File "/tmp/ubuntu-release-upgrader-ankkoy9i/DistUpgrade/DistUpgradeCache.py", line 370, in restore_snapshot
pkg.mark_delete()
File "/usr/lib/python3/dist-packages/apt/package.py", line 1524, in mark_delete
apt_pkg.Error: E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
UserGroups: N/A
_LogindSession: 4
ProblemType: Crash
Date: Thu Jul 28 04:03:55 2022
DistroRelease: Ubuntu 22.04
Package: ubuntu-release-upgrader-core 1:22.04.12
Tags: dist-upgrade
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1983003/+subscriptions
More information about the foundations-bugs
mailing list