Package: python3-minimal
Version: 3.11.8-1
Severity: important
User: de...@kali.org
Usertags: origin-kali

Dear Maintainer,

Apologies for taking so long to track this down... but here we go.

In Kali Linux, between 11 November 2023, and 30 November 2023, the installation 
time of an emulated arm64 build on amd64 host jumped exponentially.

On 11 November, the time that it took to run this build was 1 hour 31 minutes.
On 30 November, the time that it took to run this build was 5 hours 47 minutes.

Initially, I blamed it on texlive, and even submitted bug 1070150 to report the 
increase in time that it took to install, however, as someone else pointed out 
in the bug report, using a minimal testcase of

$ podman run --arch arm64 --rm -it --pull always debian:stable /bin/bash
$ apt update &&
  apt install -y moreutils &&
  apt install -y --download-only python3-minimal
$ time apt install -y python3-minimal | ts

You end up with an install time around 52s (on my machine here, its actually 
around 1 minute 30 seconds).

Doing the same, but pointing at sid, the time is around 3 minutes 52 seconds.

Since I knew that Kali was affected by this from some time in November, I 
decided to ty to track it down in Debian, since it was something coming to us 
indirectly.

I used debootstrap to create chroots from 14 October to 30 November, as our 
britney is allowed to hold packages for 20 days, after my coworker pointed out 
that our britney is allowed to hold packages for up to 20 days.  Initially I 
had only been looking between 08 November and 30 November.  All of them showed 
roughtly the same time here - 3 minutes 42 seconds, on average.

After a lot of chroots (roughly 100), I finally tracked the issue down to being 
on the 14th of October, and it looks like the change being python 3.11.5 moving 
to 3.11.6 is what is causing the issue.  For completeness, I also tested 
python3.12-minimal to see if it has the same slow speed, and unfortunately it 
does.

The fastest way to reproduce this is to use the following commands on an amd64 
host:

$ debootstrap --arch arm64 --components=main,contrib,non-free,non-free-firmware 
testing 20231114 https://snapshot.debian.org/archive/debian/20231114T1502172Z/
systemd-nspawn -D 20231114 /bin/bash
# echo "Acquire::Check-Valid-Until false;" > 
/etc/apt/apt.conf.d/99no-check-valid-until
# apt update
# apt-get install python3-minimal eatmydata moreutils -y --download-only
# apt-get install eatmydata moreutils -y
# time eatmydata apt-get install python3-minimal -y | ts

Then repeat it again, but using 20231113T085432Z instead of the 20231114 url.

$ debootstrap --arch arm64 --components=main,contrib,non-free,non-free-firmware 
testing 20231113 https://snapshot.debian.org/archive/debian/20231113T085432Z/
# echo "Acquire::Check-Valid-Until false;" > 
/etc/apt/apt.conf.d/99no-check-valid-until
# apt update
# apt-get install python3-minimal eatmydata moreutils -y --download-only
# apt-get install eatmydata moreutils -y
# time eatmydata apt-get install python3-minimal -y | ts

This slowdown only occurs during emulating arm64 on an amd64 host, and does not 
occur when emulating armhf, or armel, nor on an arm64 host itself.

I have not tested emulating any other 64bit architectures.


-- System Information:
Debian Release: kali-rolling
  APT prefers unstable
  APT policy: (1, 'unstable')
Architecture: arm64 (aarch64)

Kernel: Linux 6.9.1 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-minimal depends on:
ii  dpkg                1.22.6+kali1
ii  python3.11-minimal  3.11.9-1

python3-minimal recommends no packages.

python3-minimal suggests no packages.

-- no debconf information

Reply via email to