[Bug 2098615] [NEW] command-not-found database update (cnf-update-db) crashes with a Python refcount error in apt_pkg on Ubuntu 24.04
Ulrik
2098615 at bugs.launchpad.net
Sun Feb 16 19:03:36 UTC 2025
Public bug reported:
Running /usr/lib/cnf-update-db on Ubuntu 24.04 results in a Python crash
with the following error:
Fatal Python error: none_dealloc: deallocating None: bug likely caused by a refcount error in a C extension
Python runtime state: initialized
Current thread 0x00007fdd70bdf080 (most recent call first):
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 201 in _parse_single_commands_file
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 143 in _fill_commands
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 96 in create
File "/usr/lib/cnf-update-db", line 32 in <module>
Extension modules: apt_pkg (total: 1)
Aborted
Reinstalling command-not-found, python3-commandnotfound, and python3-apt does not resolve the issue.
This appears to be a regression in Ubuntu 24.04.
Steps to Reproduce:
Run:
sudo /usr/lib/cnf-update-db
Observe the crash.
Expected Behavior:
The command should update the command-not-found database without errors.
Workaround Attempted:
Reinstalling command-not-found, python3-commandnotfound, and python3-apt
Running the script manually in Python's debugger (pdb)
Issue persists across reinstalls
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: command-not-found 23.04.0
Uname: Linux 5.15.167.4-microsoft-standard-WSL2 x86_64
ApportVersion: 2.28.1-0ubuntu3.3
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Sun Feb 16 19:57:38 2025
PackageArchitecture: all
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>
SourcePackage: command-not-found
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: command-not-found (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug noble wayland-session
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to command-not-found in Ubuntu.
https://bugs.launchpad.net/bugs/2098615
Title:
command-not-found database update (cnf-update-db) crashes with a
Python refcount error in apt_pkg on Ubuntu 24.04
Status in command-not-found package in Ubuntu:
New
Bug description:
Running /usr/lib/cnf-update-db on Ubuntu 24.04 results in a Python
crash with the following error:
Fatal Python error: none_dealloc: deallocating None: bug likely caused by a refcount error in a C extension
Python runtime state: initialized
Current thread 0x00007fdd70bdf080 (most recent call first):
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 201 in _parse_single_commands_file
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 143 in _fill_commands
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 96 in create
File "/usr/lib/cnf-update-db", line 32 in <module>
Extension modules: apt_pkg (total: 1)
Aborted
Reinstalling command-not-found, python3-commandnotfound, and python3-apt does not resolve the issue.
This appears to be a regression in Ubuntu 24.04.
Steps to Reproduce:
Run:
sudo /usr/lib/cnf-update-db
Observe the crash.
Expected Behavior:
The command should update the command-not-found database without errors.
Workaround Attempted:
Reinstalling command-not-found, python3-commandnotfound, and python3-apt
Running the script manually in Python's debugger (pdb)
Issue persists across reinstalls
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: command-not-found 23.04.0
Uname: Linux 5.15.167.4-microsoft-standard-WSL2 x86_64
ApportVersion: 2.28.1-0ubuntu3.3
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Sun Feb 16 19:57:38 2025
PackageArchitecture: all
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>
SourcePackage: command-not-found
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/2098615/+subscriptions
More information about the foundations-bugs
mailing list