update-manager crashed with uaclient.exceptions.UserFacingError in get_lscpu_arch()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Critical
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
This will impact all of users that want to run pro status and also any other tool that is depending on the status command through the CLI or through the code itself.
On pro status, users will see the following message:
Failed to parse architecture from output of lscpu
And update-manager will break as reported here.
[Test Case]
1. Launch a lunar container
2. Update the Pro Client to 27.13.6
3. Install the language-
4. Run update-locale LANG=fr_FR.UTF-8
5. Reboot
6. Run pro status and confirm the error message
7. Install the new version of the Pro Client
8. Confirm that pro status no longer breaks
[Regression Potential]
We are no longer relying on lscpu, but on dpkg --print-
Since we have used this command for other architecture related flows, we believe the dpkg command is stable enough to not cause regressions.
We are also confident in that because the command is being replaced in two distinct functions:
* enabled_
This function is responsible for just saying a warning message if the user does not have a support livepatch kernel. The message is as follows:
The current kernel (KERNEL_VERSION, ARCH) is not supported by livepatch.
Since we are also introducing that message on this releases, changes from
x86_64 to amd64 will not matter that much to the user.
* on_supported_kernel
Here we check the Livepatch API to see that we are running on a supported kernel. However, before we send the architecture information to the API, we make the following normalization:
"x86_64" -> "amd64",
"i686" -> "i386",
"ppc64le" -> "ppc64el",
"aarch64" -> "arm64",
"armv7l" -> "armhf",
The name on the right is consistent with the output of dpkg --print-
[Discussion]
The status function from the Pro Client is now relying in the output of lscpu to fetch architecture information for Livepatch. However, the user might be using a locale on their system that changes the output of
lscpu causing our code to fail and raise an Exception.
Our planned release will only fix that specific bug. We are fixing it by relying on dpkg --print-
[Changelog]
* status:
- always use dpkg instead of lscpu for fetching architecture
information (LP: #2012735)
[Proposed MP]
We are addressing this bug fix on this MP here:
https:/
[Original Description]
do nothing and crash
ProblemType: Crash
DistroRelease: Ubuntu 23.04
Package: update-manager 1:23.04.1
ProcVersionSign
Uname: Linux 6.2.0-18-generic x86_64
ApportVersion: 2.26.0-0ubuntu2
Aptdaemon:
Architecture: amd64
CasperMD5CheckR
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
CurrentDesktop: ubuntu:GNOME
Date: Fri Mar 24 15:15:28 2023
ExecutablePath: /usr/bin/
GsettingsChanges:
b'com.
b'com.
InstallationDate: Installed on 2023-03-24 (0 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Alpha amd64 (20230324)
InterpreterPath: /usr/bin/python3.11
JournalErrors: бер 24 15:15:33 hostname gnome-control-
PackageArchitec
ProcCmdline: /usr/bin/python3 /usr/bin/
ProcEnviron:
LANG=uk_UA.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
XDG_RUNTIME_
Python3Details: /usr/bin/
PythonArgs: ['/usr/
PythonDetails: N/A
SourcePackage: update-manager
Title: update-manager crashed with uaclient.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sudo users
tags: | removed: need-duplicate-check |
Changed in update-manager (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: rls-ll-incoming |
description: | updated |
Changed in ubuntu-advantage-tools (Ubuntu): | |
status: | Confirmed → New |
description: | updated |
description: | updated |
description: | updated |
Changed in ubuntu-advantage-tools (Ubuntu): | |
status: | New → Triaged |
Reproduced on a fresh installation of Lunar. There were updates available, I clicked on the notification and got this crash.