Apt update against Katello repositories throws threading.py exception

Problem:
When performing “apt update” on Ubuntu 22.04.5 LTS I see the error:
Exception ignored in: <module ‘threading’ from ‘/usr/lib/python3.10/threading.py’>
Traceback (most recent call last):
File “/usr/lib/python3.10/threading.py”, line 1518, in _shutdown
def _shutdown():
KeyboardInterrupt:

This usually happens on the first line of output after running “apt update”. I have one time witnessed it happening between grabbing repository information and just before “Reading package lists… Done”

Strangely, this doesn’t always happen. Sometimes it doesn’t happen when I run "apt update.

Even more strange, if I run “apt clean” first, and then “apt update”, the error happens much more infrequently, but it does happen now and then, about 20-30% of the time.

Expected outcome:
Running “apt update” should not throw any errors.

Foreman and Proxy versions:
Foreman 3.11.2
Katello 4.13.1

Foreman and Proxy plugin versions:
foreman-3.11.2-1.el8.noarch
foreman-cli-3.11.2-1.el8.noarch
foreman-debug-3.11.2-1.el8.noarch
foreman-dynflow-sidekiq-3.11.2-1.el8.noarch
foreman-installer-3.11.2-1.el8.noarch
foreman-installer-katello-3.11.2-1.el8.noarch
foreman-obsolete-packages-1.9-1.el8.noarch
foreman-postgresql-3.11.2-1.el8.noarch
foreman-proxy-3.11.2-1.el8.noarch
foreman-redis-3.11.2-1.el8.noarch
foreman-release-3.11.2-1.el8.noarch
foreman-selinux-3.11.2-1.el8.noarch
foreman-service-3.11.2-1.el8.noarch
katello-4.13.1-1.el8.noarch
katello-ca-consumer-prmanforeman01v.rsyd.net-1.0-3.noarch
katello-certs-tools-2.10.0-1.el8.noarch
katello-client-bootstrap-1.7.9-2.el8.noarch
katello-common-4.13.1-1.el8.noarch
katello-debug-4.13.1-1.el8.noarch
katello-host-tools-4.2.3-5.el8.noarch
katello-host-tools-tracer-4.2.3-5.el8.noarch
katello-repos-4.13.1-1.el8.noarch
katello-selinux-5.0.2-1.el8.noarch

Distribution and version:
Rocky Linux release 8.10 (Green Obsidian)

Other relevant data:
Client distribution and apt-transport-katello:

  • Ubuntu 22.04.5 LTS
  • apt-transport-katello_1.29.35-4_all.deb

The apt-transport-katello package used is from oss.atix.de.

Client is a virtual machine, running on VMware 8.0.

In testing, when disabling all repositories that use the Foreman/Katello repository server, the error disappears. Suspects it’s related to something with the apt-transport-katello package, or libraries it uses. I cannot reproduce this error when just using non-Katello repositories.

@quba42 or @Bernhard_Suttner , have you seen issues like this before with other Debian content type users?

@iballou Forgot to mention in the original post, I’ve seen another user mention something similar here on Debian 11.

1 Like

I don’t remember encountering anything like this before, but apparently I was involved in discussing it in the other thread…

It would be interesting to find out if this only happens as apt upgrade is updating specific repositories, or if it just happens randomly for arbitrary Katello APT repos. The full output of an affected apt upgrade command might hold some more clues. You could test around with disabling all but one Katello APT repository at a time.

My other question is if this actually has any consequences other than an ugly error message in the output, though I reckon it might be quite difficult to figure out whether anything was not updated that should have been.

My best guess gut feeling is that there is some bug somewhere deep in a particular version of some python dependency, in which case I am not sure there is much we can do.

1 Like

Hey there,

I was actually also experiencing that in our orcharhino environment in the shorter past (3 months at least), wasn’t urgent enough to mention it at all up to now.
It looks like it does not have any functional impact.
Ubuntu (20.04, 22.04, 24.04) but as it’s hard to reproduce, I’m not sure if it really affects all 3 versions.

And always only at the beginning of apt update, not with apt upgrade.

1 Like