[Bug 1969786] Re: Upgrade from 20.04 to 22.04 failed: AttributeError: 'DistUpgradeController' object has no attribute 'tasks'
Ryo Onodera
1969786 at bugs.launchpad.net
Fri Jun 6 13:49:16 UTC 2025
Hi, I'm affected by this bug as well.
To large extent, I've tracked down the real issue. It looks like the
culprit is the existence of `nsight-systems:amd64` on affected systems
before the 20.04 => 22.04 upgrade.
That package causes cascades of package removals (including the pivotal
`ubuntu-desktop`, leading to the AttributeError) at one of phased
package upgrades of `do-release-upgrades` as part of difficult
dependency resolution. I think the logic is broken or the `nsight-
systems:amd64` is specifying something confusing to it. I'm not that
familiar with internal workings of `do-release-upgrade`, but the big
one-go `apt dist-upgrade` after manual rewrite of `focal` => `jammy`
doesn't cause such large package purge, for reference.
working (just removed `nsight-systems`):
```
MarkInstall libc6:amd64 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib > FU=1
MarkInstall fakeroot:amd64 < 1.24-1 -> 1.28-1ubuntu1 @ii umU Ib > FU=0
Installing libfakeroot as Depends of fakeroot
MarkInstall libfakeroot:amd64 < 1.24-1 -> 1.28-1ubuntu1 @ii umU > FU=0
MarkInstall locales:amd64 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib > FU=0
Installing libc-bin as Depends of locales
MarkInstall libc-bin:amd64 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU > FU=0
new important dependency: libnss-nis:amd64
Installing libnss-nis as Recommends of libc6
MarkInstall libnss-nis:amd64 < none -> 3.1-0ubuntu6 @un uN Ib > FU=0
Installing libnsl2 as Depends of libnss-nis
MarkInstall libnsl2:amd64 < none -> 1.3.0-2build2 @un uN Ib > FU=0
Installing libtirpc3 as Depends of libnsl2
MarkInstall libtirpc3:amd64 < none -> 1.3.2-2ubuntu0.1 @un uN Ib > FU=0
Installing libtirpc-common as Depends of libtirpc3
MarkInstall libtirpc-common:amd64 < none -> 1.3.2-2ubuntu0.1 @un uN > FU=0
MarkInstall libc6:i386 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU IPb > FU=0
new important dependency: libnss-nis:i386
Installing libnss-nis as Recommends of libc6
MarkInstall libnss-nis:i386 < none -> 3.1-0ubuntu6 @un uN Ib > FU=0
Installing libnsl2 as Depends of libnss-nis
MarkInstall libnsl2:i386 < none -> 1.3.0-2build2 @un uN Ib > FU=0
Installing libtirpc3 as Depends of libnsl2
MarkInstall libtirpc3:i386 < none -> 1.3.2-2ubuntu0.1 @un uN > FU=0
new important dependency: libnss-nisplus:i386
Installing libnss-nisplus as Recommends of libc6
MarkInstall libnss-nisplus:i386 < none -> 1.3-0ubuntu6 @un uN > FU=0
new important dependency: libnss-nisplus:amd64
Installing libnss-nisplus as Recommends of libc6
MarkInstall libnss-nisplus:amd64 < none -> 1.3-0ubuntu6 @un uN > FU=0
Starting pkgProblemResolver with broken count: 2
Starting 2 pkgProblemResolver with broken count: 2
Investigating (0) libc6-dev:amd64 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib >
Broken libc6-dev:amd64 Depends on rpcsvc-proto:amd64 < none | 1.4.2-0ubuntu6 @un uH >
Considering rpcsvc-proto:amd64 1 as a solution to libc6-dev:amd64 136
MarkKeep libc6-dev:amd64 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib > FU=0
Re-Instated rpcsvc-proto:amd64
Re-Instated libtirpc-dev:amd64
Re-Instated libnsl-dev:amd64
Re-Instated libc6-dev:amd64
Investigating (0) libc6-dev:i386 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib >
Broken libc6-dev:i386 Depends on libtirpc-dev:i386 < none | 1.3.2-2ubuntu0.1 @un uH >
Considering libtirpc-dev:i386 1 as a solution to libc6-dev:i386 7
MarkKeep libc6-dev:i386 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib > FU=0
Re-Instated libtirpc-dev:i386
Re-Instated libnsl-dev:i386
Re-Instated libc6-dev:i386
Done
```
NOT working (nsight-systems are installed):
```
Starting pkgProblemResolver with broken count: 3
Starting 2 pkgProblemResolver with broken count: 3
Investigating (0) libc6-dev:amd64 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib >
Broken libc6-dev:amd64 Depends on rpcsvc-proto:amd64 < none | 1.4.2-0ubuntu6 @un uH >
Considering rpcsvc-proto:amd64 1 as a solution to libc6-dev:amd64 136
MarkKeep libc6-dev:amd64 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib > FU=0
Re-Instated rpcsvc-proto:amd64
Re-Instated libtirpc-dev:amd64
Re-Instated libnsl-dev:amd64
Re-Instated libc6-dev:amd64
Investigating (0) libc6-dev:i386 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib >
Broken libc6-dev:i386 Depends on libtirpc-dev:i386 < none | 1.3.2-2ubuntu0.1 @un uH >
Considering libtirpc-dev:i386 1 as a solution to libc6-dev:i386 7
MarkKeep libc6-dev:i386 < 2.31-0ubuntu9.18 -> 2.35-0ubuntu3.10 @ii umU Ib > FU=0
Re-Instated libtirpc-dev:i386
Re-Instated libnsl-dev:i386
Re-Instated libc6-dev:i386
Investigating (0) nsight-systems:amd64 < 10.1.243-3 -> 2021.3.3.2~11.5.1-1ubuntu1 @ii umU Ib >
Broken nsight-systems:amd64 Depends on nsight-systems-target:amd64 < none | 2021.3.3.2~11.5.1-1ubuntu1 @un uH > (= 2021.3.3.2~11.5.1-1ubuntu1)
Considering nsight-systems-target:amd64 0 as a solution to nsight-systems:amd64 0
MarkKeep nsight-systems:amd64 < 10.1.243-3 -> 2021.3.3.2~11.5.1-1ubuntu1 @ii umU Ib > FU=0
Re-Instated libssl3:amd64
Re-Instated libnvidia-compute-535:amd64
Re-Instated libnvidia-compute-510:amd64
Re-Instated libnvidia-compute-495:amd64
Re-Instated nsight-systems-target:amd64
Re-Instated libicu70:amd64
Re-Instated gcc-12-base:amd64
Re-Instated gcc-12-base:i386
Re-Instated libstdc++6:i386
Re-Instated libstdc++6:amd64
Re-Instated libqt5core5a:amd64
Re-Instated libqt5dbus5:amd64
Re-Instated libqt5network5:amd64
Re-Instated libx11-6:i386
Re-Instated libx11-xcb1:i386
Re-Instated libx11-6:amd64
Re-Instated libx11-xcb1:amd64
Re-Instated nsight-systems:amd64
... (4000 lines later with many MarkRemove) ...
Done
```
Additionally, I confirmed existence of `nsight-systems:amd64` from the
logs at bug 1985966
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1969786
Title:
Upgrade from 20.04 to 22.04 failed: AttributeError:
'DistUpgradeController' object has no attribute 'tasks'
Status in ubuntu-release-upgrader package in Ubuntu:
Fix Released
Status in ubuntu-release-upgrader source package in Jammy:
Triaged
Bug description:
On focal 20.04 I executed the following commands:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install update-manager-core -y
sudo apt-get dist-upgrade -y
sudo apt-get autoremove
also I disabled 3rd party repositories (Google, FreeCad and some other)
in /etc/apt/sources.list.d/
Checking the version I have
uname -mrs
> Linux 5.13.0-40-generic x86_64
lsb_release -a
> No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
Then I run the following command to execute the distribution upgrade
procedure
sudo do-release-upgrade -d
And deep down into the process (95%) I hit the following "bug"
...
Installing new version of config file /etc/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop ...
Processing triggers for dbus (1.12.20-2ubuntu4) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating the changes
Calculating the changes
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/jammy", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeMain.py", line 241, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeController.py", line 2038, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeController.py", line 1992, in fullUpgrade
if not self.calcDistUpgrade():
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeController.py", line 1101, in calcDistUpgrade
if not self.cache.installTasks(self.tasks):
AttributeError: 'DistUpgradeController' object has no attribute 'tasks'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/problem_report.py", line 477, in add_to_existing
self.write(f)
File "/usr/lib/python3/dist-packages/problem_report.py", line 430, in write
block = f.read(1048576)
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/jammy", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeMain.py", line 241, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeController.py", line 2038, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeController.py", line 1992, in fullUpgrade
if not self.calcDistUpgrade():
File "/tmp/ubuntu-release-upgrader-ql9_ymmz/DistUpgrade/DistUpgradeController.py", line 1101, in calcDistUpgrade
if not self.cache.installTasks(self.tasks):
AttributeError: 'DistUpgradeController' object has no attribute 'tasks'
I have to admit of this is really a but or if it is "self-made"
that I broke the python installation myself as I see that is using
python38 from my system.
I haven' t rebooted the computer ... The computer is "functional" but many Apps (file browser, LibreOffice to mention 2) have disappeared. I am scared that if I reboot I am going to be left without notebook to work with.
Any guidance to get out of this issue would be much appreciated.
Thank you for reading.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.23
Architecture: amd64
CasperMD5CheckResult: skip
CrashDB: ubuntu
CrashReports:
640:1000:125:3187472:2022-04-21 11:52:05.895499130 +0100:2022-04-21 11:52:04.499463693 +0100:/var/crash/_usr_libexec_tracker-extract.1000.crash
640:0:125:55315:2022-04-21 11:57:28.128352842 +0100:2022-04-21 11:57:28.120352608 +0100:/var/crash/_usr_bin_do-release-upgrade.0.crash
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-12-22 (484 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
Package: ubuntu-release-upgrader (not installed)
ProcVersionSignature: Ubuntu 5.13.0-40.45~20.04.1-generic 5.13.19
Tags: focal wayland-session dist-upgrade
Uname: Linux 5.13.0-40-generic x86_64
UpgradeStatus: Upgraded to focal on 2022-04-21 (0 days ago)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
VarLogDistupgradeAptclonesystemstate.tar.gz: Error: command ['cat', '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'] failed with exit code 1: cat: /var/log/dist-upgrade/apt-clone_system_state.tar.gz: Permission denied
_MarkForUpload: True
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1969786/+subscriptions
More information about the foundations-bugs
mailing list