Comment 1 for bug 2007234

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

AFAICS this is odd at the first look.

We have the error being:
ModuleNotFoundError: No module named 'yaml'

But OTOH clearly yaml is installed and the dependency is correct.

$ apt-cache show ubuntu-advantage-tools
Package: ubuntu-advantage-tools
Architecture: amd64
Version: 27.13.5~22.04.1
Priority: important
Section: misc
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 877
Depends: debconf (>= 0.5) | debconf-2.0, python3-yaml ...

Yet on a second look this might be related to an upgrade scenario.
I've found all that are affected by this to be of the following scenario:

Examples on 22.04:
https://errors.ubuntu.com/oops/cdd35f74-aae8-11ed-9e26-fa163e993415
https://errors.ubuntu.com/oops/ac520bde-aae8-11ed-9e26-fa163e993415
https://errors.ubuntu.com/oops/defe9d0e-abd1-11ed-9e34-fa163e993415

1. installed Focal (not too long ago)
2. upgraded to Jammy just now
3. the crash shows
  3.1 the UAT version of Jammy (packages got upgraded, so most likely did python3-yaml)
  3.2 the python3.8 of focal

I wonder (and this is a theory only, might be very wrong) if we have a long running process to update the cache still running with python3.8 of focal, but when it reaches out to do work after the upgrade it will try to import yaml and the installed version is only for the py3.10 of jammy and no more for the 3.8 interpreter of focal which this still runs in.

And if that would be true, should we stop and restart those background jobs on upgrade (like services are restarted, unless we already do that - as I said just a theory).