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
Bugs, which is subscribed to 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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/2098615/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to