Crash during upgrade from Mantic to Noble due to Python 3.12

Bug #2058227 reported by Skia
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt-xapian-index (Ubuntu)
Confirmed
Undecided
Unassigned
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Nick Rosbrook

Bug Description

Upgrading from Mantic to Noble often triggers a crash related to Python 3.12 compatibility:
```
Traceback (most recent call last):
  File "/usr/sbin/update-apt-xapian-index", line 66, in <module>
    import axi.indexer
  File "/usr/lib/python3/dist-packages/axi/indexer.py", line 27, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
```

I guess that the crash happens when the indexer code is called while still being in the Mantic version, but the default Python3 package has already been upgraded to 3.12. However, that situation doesn't happen all the time, and the upgrade is sometimes able to complete without crash.

For some reasons, I mostly (only?) see this on Kubuntu upgrades.

Maybe that situation could also happen while upgrading from Jammy, but as the upgrade is currently broken due to some other issues, I haven't seen it yet.

Revision history for this message
Skia (hyask) wrote :
summary: - Crash during upgrade from Mantic to Noble
+ Crash during upgrade from Mantic to Noble due to Python 3.12
tags: added: rls-nn-incoming
Skia (hyask)
description: updated
tags: added: foundations-todo
removed: rls-nn-incoming
Revision history for this message
Brian Murray (brian-murray) wrote :

During the Foundations team meeting we talked about adding a quirk to "turn off" a-x-i.

Changed in ubuntu-release-upgrader (Ubuntu):
milestone: none → ubuntu-24.04-beta
Changed in ubuntu-release-upgrader (Ubuntu):
milestone: ubuntu-24.04-beta → ubuntu-24.04
Nick Rosbrook (enr0n)
Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Nick Rosbrook (enr0n)
Revision history for this message
Nick Rosbrook (enr0n) wrote :

From what I can tell, there is not a systemd service or anything calling update-apt-xapian-index (there were comments in the IRC meeting[1] that suggested that). So is the idea here to just tell apport to ignore crash reports for /usr/sbin/update-apt-xapian-index during the upgrade? We already do the same thing for tracker-extract-3[2].

[1] https://irclogs.ubuntu.com/2024/03/21/%23ubuntu-meeting.html
[2] https://bugs.launchpad.net/ubuntu/+source/tracker-miners/+bug/2049907

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Brian Murray (brian-murray) wrote :

From what I can recall of the meeting there was a more general idea of stopping all systemd user services and cronjobs tha could fall over during a distribution upgrade. For this specific problem we can either stop running update-apt-xapian-index or just suppress the crashes.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:24.04.14

---------------
ubuntu-release-upgrader (1:24.04.14) noble; urgency=medium

  [ Brian Murray ]
  * Set prompt to lts because 24.04 is one (LP: #2061214)

  [ Nick Rosbrook ]
  * DistUpgradeQuirks: tell apport to ignore update-apt-xapian-index
    (LP: #2058227)
  * DistUpgradeQuirk: fix check for linux-image-raspi in cache (LP: #2061181)
  * DistUpgradeQuirks: handle t64 replacement packages (LP: #2061175)
  * Run pre-build.sh: updating mirrors, demotions, and translations.

 -- Nick Rosbrook <email address hidden> Mon, 15 Apr 2024 15:02:26 -0400

Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → Fix Released
Skia (hyask)
Changed in apt-xapian-index (Ubuntu):
status: New → Confirmed
Revision history for this message
Saurabh Minni (the100rabh) wrote :

When can we expect this change to unblock upgrade from Mantis to Noble. https://discourse.ubuntu.com/t/noble-numbat-24-04-release-status-tracking/44043

Revision history for this message
Skia (hyask) wrote :

A quirk has been added to ubuntu-release-upgrader so this issue doesn't appear anymore, and upgrades from Mantic to Noble are already enabled.

Revision history for this message
Saurabh Minni (the100rabh) wrote :

That is weird, when I try release upgrade it shows the following. Its a

```
$ sudo do-release-upgrade -m desktop
Checking for a new Ubuntu release
No new release found.
```

I am on Mantic right now

```
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo
```

Revision history for this message
Skia (hyask) wrote :

Yes, sorry, I got confused, upgrades from Mantic are still hidden behind the `-d` flag. That means you need `do-release-upgrade -d` to get it.
Be advised though that if it's not enabled yet, there might be remaining issues that I'm not aware of, even if from my point of view, the jump from Mantic to Noble has been pretty much stabilized.

Revision history for this message
Joe Fullmer (chssaddct) wrote :

It's just that this bug is listed as the only blocker on the Release Status Tracking page:

https://discourse.ubuntu.com/t/noble-numbat-24-04-release-status-tracking/44043#current-blockers-for-enabling-upgrades-from-mantic-6

Revision history for this message
Vitaliy Kanev (vitalkanev) wrote :

In reply to Comment #10

Apparently not. According to release notes [1], there are more critical bugs blocking the Mantic to Noble upgrades. This include the libglib transitional package with Y2038 handling [2] and Thunderbird DEB-to-Snap conversion [3]

[1]: https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890
[2]: https://pad.lv/2063221
[3]: https://pad.lv/2061918

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.