do-release-upgrade without the latest version of apt in focal or groovy will crash

Bug #1987452 reported by Brian Murray
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Fix Released
High
Brian Murray

Bug Description

Impact
------
There are many crash reports in the Ubuntu Error tracker (https://errors.ubuntu.com/problem/d7622e91a2afe1c1fc697f6717d45146525825c3 for one) where people experience a crash trying to upgrade from Groovy (and Focal) to Jammy due to having an old version of apt installed. While the release upgrade process ensures they have the latest version of packages installed its possible they don't have -updates enabled or their apt list files are out of date. Whatever the reason this can keep people stuck on a potentially EoL release.

Test Case
---------
1) On an Ubuntu 20.04 (or Ubuntu 20.10) system install the version of libapt-pkg6.0 and apt from the release pocket (not -updates).
2) Disable the -updates pocket in /etc/apt/sources.list. (Or rm /var/lib/apt/lists/* .)
3) Run do-release-upgrade
4) Observe a crash early in the upgrade process

With the version of ubuntu-release-upgrader from -proposed (testable by using do-release-upgrade -p) the release upgrade will not crash and instead you will be notified to install the newer version of apt and libapt-pkg6.0. The message will look like the following:

"Reading state information... Done

Required depends is not installed

The required dependency 'apt (>= 2.0.4)' is not installed."

Regression Potential
--------------------
If the Depends line is improperly formatted the upgrade process could end up crashing in a different way.

ProblemType: Crash
DistroRelease: Ubuntu 22.04
Package: ubuntu-release-upgrader-core 1:22.04.13
ProcVersionSignature: Ubuntu 5.8.0-63.71-generic 5.8.18
Uname: Linux 5.8.0-63-generic x86_64
Architecture: amd64
CasperMD5CheckResult: skip
CrashDB: ubuntu
Date: Tue Aug 23 14:47:18 2022
DuplicateSignature: apt_pkg.Error: E:Could not configure 'libc6:i386'. , E:Could not perform immediate configuration on 'libgcc-s1:i386'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
ExecutablePath: /usr/bin/do-release-upgrade
ExecutableTimestamp: 1621013264
InstallationDate: Installed on 2022-08-03 (20 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
InterpreterPath: /usr/bin/python3.8
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 -s /tmp/ubuntu-release-upgrader-fpldmaum/jammy --mode=server --frontend=DistUpgradeViewText
ProcCwd: /tmp/ubuntu-release-upgrader-fpldmaum
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.6-0ubuntu1
PythonArgs: ['/usr/bin/do-release-upgrade', '--mode=server', '--frontend=DistUpgradeViewText']
PythonDetails: N/ASourcePackage: ubuntu-release-upgrader
Title: do-release-upgrade crashed with apt_pkg.Error: E:Could not configure 'libc6:i386'. , E:Could not perform immediate configuration on 'libgcc-s1:i386'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
Traceback: apt_pkg.Error: E:Could not configure 'libc6:i386'. , E:Could not perform immediate configuration on 'libgcc-s1:i386'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
UpgradeStatus: Upgraded to groovy on 2022-08-23 (0 days ago)
UserGroups: N/A

Revision history for this message
Brian Murray (brian-murray) wrote :
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

This is the specific failure seen in VarLogDistupgradeMainlog.txt:

2022-08-23 14:47:17,971 ERROR not handled exception:
apt_pkg.Error: E:Could not configure 'libc6:i386'. , E:Could not perform immediate configuration on 'libgcc-s1:i386'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)

information type: Private → Public
description: updated
description: updated
description: updated
summary: - do-release-upgrade crashed with apt_pkg.Error: E:Could not configure
- 'libc6:i386'. , E:Could not perform immediate configuration on
- 'libgcc-s1:i386'. Please see man 5 apt.conf under APT::Immediate-
- Configure for details. (2)
+ do-release-upgrade without the latest version of apt in focal or groovy
+ will crash
description: updated
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Invalid
Changed in ubuntu-release-upgrader (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted ubuntu-release-upgrader into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:22.04.14 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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 ubuntu-release-upgrader (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested this using an Ubuntu 20.10 virtual machine as per the bug description and can confirm that the fix works:

bdmurray@clean-groovy-amd64:~$ cat /var/log/dist-upgrade/main.log
2022-09-08 15:34:06,356 INFO Using config files '['./DistUpgrade.cfg.groovy', '/etc/update-manager/release-upgrades.d/ubuntu-advantage-upgrades.cfg']'
2022-09-08 15:34:06,356 INFO uname information: 'Linux clean-groovy-amd64 5.8.0-63-generic #71-Ubuntu SMP Tue Jul 13 15:59:12 UTC 2021 x86_64'
2022-09-08 15:34:06,372 INFO apt version: '2.1.10'
2022-09-08 15:34:06,372 INFO python version: '3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 10.3.0]'
2022-09-08 15:34:06,373 INFO release-upgrader version '22.04.14' started
2022-09-08 15:34:06,377 INFO locale: 'en_US' 'UTF-8'
2022-09-08 15:34:06,447 DEBUG Using 'DistUpgradeViewText' view
2022-09-08 15:34:06,482 DEBUG enable dpkg --force-overwrite
2022-09-08 15:34:06,518 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2022-09-08 15:34:08,096 DEBUG lsb-release: 'groovy'
2022-09-08 15:34:08,096 DEBUG _pythonSymlinkCheck run
2022-09-08 15:34:08,097 DEBUG openCache()
2022-09-08 15:34:08,097 DEBUG quirks: running PreCacheOpen
2022-09-08 15:34:08,097 DEBUG running Quirks.PreCacheOpen
2022-09-08 15:34:08,126 DEBUG Comparing 5.8.0-25 with
2022-09-08 15:34:08,126 DEBUG Comparing 5.8.0-63 with 5.8.0-25
2022-09-08 15:34:08,130 DEBUG /openCache(), new cache size 1655
2022-09-08 15:34:08,131 DEBUG need_server_mode(): run in 'desktop' mode, (because of pkg 'ubuntu-desktop')
2022-09-08 15:34:08,131 DEBUG checkViewDepends()
2022-09-08 15:34:08,131 DEBUG depends: 'apt (>= 2.1.10ubuntu0.3)'
2022-09-08 15:34:08,131 DEBUG checking: '[('apt', '2.1.10ubuntu0.3', '>=')]'
2022-09-08 15:34:08,131 ERROR depends 'apt (>= 2.1.10ubuntu0.3)' is not satisfied
bdmurray@clean-groovy-amd64:~$ apt-cache policy libapt-pkg6.0
libapt-pkg6.0:
  Installed: 2.1.10
  Candidate: 2.1.10
  Version table:
 *** 2.1.10 100
        100 /var/lib/dpkg/status

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:22.04.14

---------------
ubuntu-release-upgrader (1:22.04.14) jammy; urgency=medium

  * When upgrading from Ubuntu 20.04 or Ubuntu 20.10 require a version of apt
    which fixed a bug in apt (LP: 1871268) and prevents an early failure to
    upgrade. (LP: #1987452)
  * In the nvidia driver quirk handle the case where ubuntu-drivers-common is
    not installed on the system to be upgraded. (LP: #1985253)
  * Run pre-build.sh: updating mirrors and translations.

 -- Brian Murray <email address hidden> Tue, 23 Aug 2022 16:25:59 -0700

Changed in ubuntu-release-upgrader (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubuntu-release-upgrader 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.

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.