Bug#679419: apt: Funny time overflow when clock is set during apt-get update
Hi!
This issue is most probably fixed with
https://salsa.debian.org/apt-team/apt/-/commit/79b61ae7673eb6213493e2cb202f0d70c390932d.
There are also other commits that address the problem of durations (see
https://salsa.debian.org/apt-team/apt/-/commit/ef50424be1586b91a99d28bf5108f3999cc908fb),
but 79b61ae seems to be the main one.
I was able to reproduce the issue in a last commit before 79b61ae, i.e.
in 484babb.
Reproduction scenario:
1. Have a Debian 11 machine,
2. Disable automatic time syncs by disabling appropriate service with
systemctl
3. Install apt* packages built from source,
4. Open two ssh sessions to the machine,
5. In first session change "bullseye" to "bookworm" in /etc/apt/
sources.list, so that "apt-get update" will have lots of data to
download.
6. In first session do "apt-get update",
7. While apt is downloading updates, in second session change current
time by one hour back with "date -s xx:yy",
8. In first session wait for end of downloading of updates,
9. In first session observe duration reported in summary by apt-get.
When the problem reproduces in code before fix (commit 484babb), the
report looks like this:
root@debian:~# apt-get update
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm/main Sources [9,496 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 Packages [8,792 kB]
Get:4 http://deb.debian.org/debian bookworm/main Translation-en [6,109 kB]
Fetched 24.5 MB in 213503982334601d 5h 59min 34s (0 B/s)
<---- here
Reading package lists... Done
When the problem no longer reproduces in code after fix (commits 79b61ae
and ef50424), the report looks like this:
root@debian:~# apt-get update
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm/main Sources [9,496 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 Packages [8,792 kB]
Get:4 http://deb.debian.org/debian bookworm/main Translation-en [6,109 kB]
Fetched 24.5 MB in 31s (779 kB/s)
<---- here
Reading package lists... Done
Kamil
Reply to: