[Bug 1964828] Re: /usr/share/apport/general-hooks/ubuntu.py crashed: KeyError: 'CasperMD5json'
Benjamin Drung
1964828 at bugs.launchpad.net
Wed Nov 23 11:19:23 UTC 2022
** Changed in: apport (Ubuntu Focal)
Status: Fix Committed => New
** Changed in: apport (Ubuntu Jammy)
Status: Fix Committed => New
** Tags added: foundations-todo
** Changed in: apport (Ubuntu)
Assignee: (unassigned) => Benjamin Drung (bdrung)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1964828
Title:
/usr/share/apport/general-hooks/ubuntu.py crashed: KeyError:
'CasperMD5json'
Status in apport package in Ubuntu:
Fix Released
Status in apport source package in Focal:
New
Status in apport source package in Jammy:
New
Bug description:
[Impact]
If the user reports a bug and rejects to enter the root password for
collecting information (like the CasperMD5json), the Ubuntu add_info
hook will fail with a stack trace. The remaining code for collecting
more information is not executed. So the resulting bug reports will be
less helpful. The check_for_disk_error call is not reached and
therefore skipped.
[Test Plan]
1. Launch the Ubuntu installer (i.e. ubuntu-22.04-desktop-amd64.iso)
2. Select "Try Ubuntu"
3. Open a terminal
4. Run: ubuntu-bug -f
5. Select "installer" and click on OK
6. Click on "abort" when ask for the password
7. The terminal should not show a stacktrace
[Where problems could occur]
The changed code is the Ubuntu add_info hook. So this hook could fail
due to a regression or reveal bugs in the later code path. The later
code path could cause more more load on the users machine (but only
when the user wants to report the issue). Apport will catch failing
add_info hooks and store the failure in the report.
[Orinial report]
ERROR: hook /usr/share/apport/general-hooks/ubuntu.py crashed:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport/report.py", line 228, in _run_hook
symb['add_info'](report, ui)
File "/usr/share/apport/general-hooks/ubuntu.py", line 81, in add_info
apport.hookutils.attach_casper_md5check(report,
File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 1016, in attach_casper_md5check
check = json.loads(report['CasperMD5json'])
File "/usr/lib/python3.10/collections/__init__.py", line 1102, in __getitem__
raise KeyError(key)
KeyError: 'CasperMD5json'
kubuntu at kubuntu:~$ Gtk-Message: 21:22:43.923: Failed to load module "colorreload-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubiquity 22.04.7
ProcVersionSignature: Ubuntu 5.15.0-22.22-generic 5.15.19
Uname: Linux 5.15.0-22-generic x86_64
ApportVersion: 2.20.11-0ubuntu79
Architecture: amd64
CasperVersion: 1.467
CurrentDesktop: KDE
Date: Mon Mar 14 21:22:23 2022
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/kubuntu.seed maybe-ubiquity quiet splash ---
LiveMediaBuild: Kubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220314)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1964828/+subscriptions
More information about the foundations-bugs
mailing list