update-manager crashed with FileNotFoundError in _execute_child(): [Errno 2] No such file or directory: 'lsb_release'

Bug #2053174 reported by Brian Murray
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Unassigned
Jammy
Triaged
Low
Unassigned

Bug Description

I removed the lsb_release binary to recreate a crash I'd seen in the Error Tracker, so that we have a Launchpad bug to track this.

https://errors.ubuntu.com/problem/cb53b24a4527ac41429086509360e3b6b049c74f

ProblemType: Crash
DistroRelease: Ubuntu 22.04
Package: update-manager 1:22.04.19 [origin: unknown]
ProcVersionSignature: Ubuntu 6.5.0-17.17~22.04.1-generic 6.5.8
Uname: Linux 6.5.0-17-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckMismatches: ./boot/grub/grub.cfg
CasperMD5CheckResult: fail
CurrentDesktop: ubuntu:GNOME
Date: Wed Feb 14 12:46:01 2024
ExecutablePath: /usr/bin/update-manager
ExecutableTimestamp: 1706278231
GsettingsChanges:
 b'com.ubuntu.update-manager' b'first-run' b'false'
 b'com.ubuntu.update-manager' b'launch-count' b'7'
 b'com.ubuntu.update-manager' b'launch-time' b'int64 1707943561'
 b'com.ubuntu.update-manager' b'show-details' b'true'
 b'com.ubuntu.update-manager' b'window-width' b'593'
InstallationDate: Installed on 2023-11-02 (104 days ago)
InstallationMedia: Ubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230807.2)
InterpreterPath: /usr/bin/python3.10
JournalErrors:
 Feb 14 12:45:58 clean-jammy-amd64 gnome-calculato[10382]: search-provider.vala:140: Failed to spawn Calculator: Child process killed by signal 9
 Feb 14 12:45:58 clean-jammy-amd64 gnome-calculato[10382]: search-provider.vala:140: Failed to spawn Calculator: Child process killed by signal 9
 Feb 14 12:45:58 clean-jammy-amd64 gnome-calculato[10382]: search-provider.vala:140: Failed to spawn Calculator: Child process killed by signal 9
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/update-manager
ProcCwd: /home/bdmurray
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Python3Details: /usr/bin/python3.10, Python 3.10.12, python3-minimal, 3.10.6-1~22.04
PythonArgs: ['/usr/bin/update-manager']
PythonDetails: N/A
SourcePackage: update-manager
Title: update-manager crashed with FileNotFoundError in _execute_child(): [Errno 2] No such file or directory: 'lsb_release'
UpgradeStatus: Upgraded to None on 2024-02-14 (0 days ago)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo

Revision history for this message
Brian Murray (brian-murray) wrote :
information type: Private → Public
Revision history for this message
Brian Murray (brian-murray) wrote :

The Traceback in the Error Tracker is slightly different but that's just because of how it was called.

Traceback (most recent call last):
  File "/usr/bin/do-release-upgrade", line 133, in <module>
    m = MetaReleaseCore(useDevelopmentRelease=options.devel_release,
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 106, in __init__
    self.current_dist_name = get_dist()
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/utils.py", line 220, in get_dist
    p = Popen(["lsb_release", "-c", "-s"], stdout=PIPE,
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'lsb_release'

tags: added: rls-jj-incoming
tags: removed: need-duplicate-check
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

I'm flagging this because while it's easy to say those systems are borked we should think about how this code happen and if there is a more resilient approach to figuring out what release the system is running.

Maybe like what was done in this commit.

commit d2634ad1b1022b76a4defd99738eb1652860cf70
Author: Benjamin Drung <email address hidden>
Date: Mon Feb 13 14:12:47 2023 +0100

    Replace lsb_release call with reading /etc/os-release directly

Changed in update-manager (Ubuntu):
status: New → Fix Released
tags: added: foundations-todo
removed: rls-jj-incoming
Changed in update-manager (Ubuntu Jammy):
importance: Undecided → Low
status: New → Triaged
Changed in update-manager (Ubuntu Jammy):
milestone: none → jammy-updates
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.