[Bug 1874272] Re: Stage "searching for obsolete software" takes a very long time (30 minutes)
Nick Rosbrook
1874272 at bugs.launchpad.net
Mon Aug 12 20:10:14 UTC 2024
I have verified the fix using ubuntu-release-upgrader from noble-
propesed:
First, I upgraded a container without the fix:
nr at six:~$ lxc launch ubuntu:jammy j
nr at six:~$ lxc exec j bash
root at j:~# do-release-upgrade -d
Checking for a new Ubuntu release
= Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =
The Ubuntu team is proud to announce Ubuntu 24.04 LTS 'Noble Numbat'.
To see what's new in this release, visit:
https://wiki.ubuntu.com/NobleNumbat/ReleaseNotes
Ubuntu is a Linux distribution for your desktop or server, with a fast
and easy install, regular releases, a tight selection of excellent
applications installed by default, and almost any other software you
can imagine available through the network.
We hope you enjoy Ubuntu.
== Feedback and Helping ==
If you would like to help shape Ubuntu, take a look at the list of
ways you can participate at
http://www.ubuntu.com/community/participate/
Your comments, bug reports, patches and suggestions will help ensure
that our next release is the best release of Ubuntu ever. If you feel
that you have found a bug please read:
http://help.ubuntu.com/community/ReportingBugs
Then report bugs using apport in Ubuntu. For example:
ubuntu-bug linux
will open a bug report in Launchpad regarding the linux package.
If you have a question, or if you think you may have found a bug but
aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC
channels on Libera.Chat, on the Ubuntu Users mailing list, or on the
Ubuntu forums:
http://help.ubuntu.com/community/InternetRelayChat
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
http://www.ubuntuforums.org/
== More Information ==
You can find out more about Ubuntu on our website, IRC channel and wiki.
If you're new to Ubuntu, please visit:
http://www.ubuntu.com/
To sign up for future Ubuntu announcements, please subscribe to Ubuntu's
very low volume announcement list at:
http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce
Continue [yN] y
Get:1 Upgrade tool signature [833 B]
Get:2 Upgrade tool [1278 kB]
Fetched 1279 kB in 0s (0 B/s)
authenticate 'noble.tar.gz' against 'noble.tar.gz.gpg'
extracting 'noble.tar.gz'
[screen is terminating]
root at j:~# grep "checking for obsolete pkgs" /var/log/dist-upgrade/main.log
2024-08-12 19:48:42,704 DEBUG Start checking for obsolete pkgs
2024-08-12 19:48:51,918 DEBUG Finish checking for obsolete pkgs
root at j:~# grep "The following packages are marked for removal" /var/log/dist-upgrade/main.log
2024-08-12 19:48:51,974 DEBUG The following packages are marked for removal: libperl5.34 python3.10 libctf-nobfd0 libblockdev-part2 libblockdev-swap2 libpcre3 libunistring2 libaio1 libmpdec3 libbinutils python3-jeepney libpython3.10-minimal libblockdev-fs2 libpython3.10-stdlib binutils-x86-64-linux-gnu irqbalance libbpf0 libtss2-mu0 libldap-2.5-0 isc-dhcp-common libisc-export1105 libappstream4 libpython3.10 libblockdev-loop2 libblockdev2 libblockdev-part-err2 isc-dhcp-client libctf0 libnsl2 libblockdev-utils2 python3-jaraco.classes libprocps8 binutils-common libdns-export1110 libsframe1 pkexec python3-keyring libgprofng0 libcbor0.8 python3.10-minimal perl-modules-5.34 ubuntu-advantage-tools gcc-12-base libblockdev-crypto2 libicu70 libnetplan0 policykit-1 binutils python3-secretstorage
Then, in different container, I used the upgrader from noble-proposed:
nr at six:~$ lxc launch ubuntu:jammy j2
nr at six:~$ lxc exec j2 bash
root at j2:~# sed -i 's/Prompt=lts/Prompt=normal/g' /etc/update-manager/release-upgrades
root at j2:~# do-release-upgrade --proposed
Checking for a new Ubuntu release
= Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =
The Ubuntu team is proud to announce Ubuntu 24.04 LTS 'Noble Numbat'.
To see what's new in this release, visit:
https://wiki.ubuntu.com/NobleNumbat/ReleaseNotes
Ubuntu is a Linux distribution for your desktop or server, with a fast
and easy install, regular releases, a tight selection of excellent
applications installed by default, and almost any other software you
can imagine available through the network.
We hope you enjoy Ubuntu.
== Feedback and Helping ==
If you would like to help shape Ubuntu, take a look at the list of
ways you can participate at
http://www.ubuntu.com/community/participate/
Your comments, bug reports, patches and suggestions will help ensure
that our next release is the best release of Ubuntu ever. If you feel
that you have found a bug please read:
http://help.ubuntu.com/community/ReportingBugs
Then report bugs using apport in Ubuntu. For example:
ubuntu-bug linux
will open a bug report in Launchpad regarding the linux package.
If you have a question, or if you think you may have found a bug but
aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC
channels on Libera.Chat, on the Ubuntu Users mailing list, or on the
Ubuntu forums:
http://help.ubuntu.com/community/InternetRelayChat
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
http://www.ubuntuforums.org/
== More Information ==
You can find out more about Ubuntu on our website, IRC channel and wiki.
If you're new to Ubuntu, please visit:
http://www.ubuntu.com/
To sign up for future Ubuntu announcements, please subscribe to Ubuntu's
very low volume announcement list at:
http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce
Continue [yN] y
Get:1 Upgrade tool signature [833 B]
Get:2 Upgrade tool [1280 kB]
Fetched 1281 kB in 0s (0 B/s)
authenticate 'noble.tar.gz' against 'noble.tar.gz.gpg'
extracting 'noble.tar.gz'
[screen is terminating]
root at j2:~# grep "checking for obsolete pkgs" /var/log/dist-upgrade/main.log
2024-08-12 20:02:58,758 DEBUG Start checking for obsolete pkgs
2024-08-12 20:02:59,396 DEBUG Finish checking for obsolete pkgs
root at j2:~# grep "The following packages are marked for removal" /var/log/dist-upgrade/main.log
2024-08-12 20:02:59,468 DEBUG The following packages are marked for removal: libperl5.34 python3.10 libctf-nobfd0 libblockdev-part2 libblockdev-swap2 libpcre3 libunistring2 libaio1 libmpdec3 libbinutils python3-jeepney libpython3.10-minimal libblockdev-fs2 libpython3.10-stdlib binutils-x86-64-linux-gnu irqbalance libbpf0 libtss2-mu0 libldap-2.5-0 isc-dhcp-common libisc-export1105 libappstream4 libpython3.10 libblockdev-loop2 libblockdev2 libblockdev-part-err2 isc-dhcp-client libctf0 libnsl2 libblockdev-utils2 python3-jaraco.classes libprocps8 binutils-common libdns-export1110 libsframe1 pkexec python3-keyring libgprofng0 libcbor0.8 python3.10-minimal perl-modules-5.34 ubuntu-advantage-tools gcc-12-base libblockdev-crypto2 libicu70 libnetplan0 policykit-1 binutils python3-secretstorage
As can be seen from the above, the "searching for obsoletes" stage was
significantly faster in the second upgrade, and the list of removals is
the same.
** Tags removed: verification-needed verification-needed-noble
** Tags added: verification-done verification-done-noble
--
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/1874272
Title:
Stage "searching for obsolete software" takes a very long time (30
minutes)
Status in ubuntu-release-upgrader package in Ubuntu:
Fix Released
Status in ubuntu-release-upgrader source package in Focal:
Won't Fix
Status in ubuntu-release-upgrader source package in Noble:
Fix Committed
Bug description:
[Impact]
Upgrades hang for a long time searching for obsolete software, frustrating users.
[Test plan]
1. With each, update, and proposed version do:
0. launch a container / VM
1. do-release-upgrade
2. Note down the time it took for the obsolete software stage, and the packages marked for removal.
2. Check that the time is now significantly smaller than before
For example with the default ubuntu:jammy lxd container:
before: ~8s
2024-07-16 15:13:25,575 DEBUG Start checking for obsolete pkgs
2024-07-16 15:13:33,847 DEBUG Finish checking for obsolete pkgs
after: ~0.5s
2024-07-16 15:22:21,977 DEBUG Start checking for obsolete pkgs
2024-07-16 15:22:22,508 DEBUG Finish checking for obsolete pkgs
3. Compare the list of packages marked for removal: It should be the
same or more packages.
before:
2024-07-16 15:13:33,907 DEBUG The following packages are marked for removal: libperl5.34 python3.10 libctf-nobfd0 libblockdev-part2 libblockdev-swap2 libpcre3 libunistring2 libaio1 libmpdec3 libbinutils python3-jeepney libpython3.10-minimal libblockdev-fs2 libpython3.10-stdlib binuti
ls-x86-64-linux-gnu irqbalance libbpf0 libtss2-mu0 libldap-2.5-0 isc-dhcp-common libisc-export1105 libappstream4 libpython3.10 libblockdev-loop2 libblockdev2 libblockdev-part-err2 isc-dhcp-client libctf0 libnsl2 libblockdev-utils2 python3-jaraco.classes libprocps8 binutils-common libdns-export1110 libsframe1 pkexec python3-keyring libgprofng0 libcbor0.8 python3.10-minimal perl-modules-5.34 ubuntu-advantage-tools gcc-12-base libblockdev-crypto2 libicu70 libnetplan0 policykit-1 binutils python3-secretstorage
after:
2024-07-16 15:22:22,555 DEBUG The following packages are marked for removal: libperl5.34 python3.10 libctf-nobfd0 libblockdev-part2 libblockdev-swap2 libpcre3 libunistring2 libaio1 libmpdec3 libbinutils python3-jeepney libpython3.10-minimal libblockdev-fs2 libpython3.10-stdlib binuti
ls-x86-64-linux-gnu irqbalance libbpf0 libtss2-mu0 libldap-2.5-0 isc-dhcp-common libisc-export1105 libappstream4 libpython3.10 libblockdev-loop2 libblockdev2 libblockdev-part-err2 isc-dhcp-client libctf0 libnsl2 libblockdev-utils2 python3-jaraco.classes libprocps8 binutils-common libdns-export1110 libsframe1 pkexec python3-keyring libgprofng0 libcbor0.8 python3.10-minimal perl-modules-5.34 ubuntu-advantage-tools gcc-12-base libblockdev-crypto2 libicu70 libnetplan0 policykit-1 binutils python3-secretstorage
This small container is not necessarily the best test case to demonstrate it and ensure correctness but the fastest one; it may also be suitable to run it in a desktop VM instead.
[Where problems could occur]
The upgrade process could crash in case the solver fails to solve the request it is being given. This is the last step of the upgrade though, so it is reasonable safe.
One could have skipped on a solver failure but this way we'd get crash reports
in the unlikely case they happen.
[Original bug report]
Test Case:
1. Fresh Bionic installation from 18.04.4 + all updates applied
2. Run: update-manager -d
3. Proceed with the upgrade.
Actual Result:
Everything goes well but the stage "Searching for obsolete software" takes a very long time.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubuntu-release-upgrader-core 1:20.04.18
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CrashDB: ubuntu
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 22 10:34:19 2020
InstallationDate: Installed on 2020-04-20 (2 days ago)
InstallationMedia: Ubuntu 18.04.4 LTS "Bionic Beaver" - Release amd64 (20200203.1)
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: Upgraded to focal on 2020-04-22 (0 days ago)
VarLogDistupgradeTermlog:
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1874272/+subscriptions
More information about the foundations-bugs
mailing list