OverFlow error when using cnf-extractor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
Undecided
|
Julian Andres Klode | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Large files can't be downloaded as we use a 32-bit integer in AcquireFile constructor, this breaks e.g. command-not-found generator:
I'm trying to update the command-not-found indexes (bin/cnf-extract.py $MIRROR $suite $component $arch) on the production cnf extractor system (running bionic) and have encountered Tracebacks when generating them for Jammy and Lunar. This is causing the command not found indexes to be out of date for all(?) releases of Ubuntu.
The lunar failure:
Get:1 dotnet-
Fetched 79.1 MB in 0s (0 B/s)
Traceback (most recent call last):64... 7%
File "./bin/
mirror_root, suite, component, arch)
File "/srv/cnf-
debpath = pkg.candidate.
File "/usr/lib/
self.size, base, destfile=destfile)
OverflowError: signed integer is greater than maximum
I'll get more context for the Jammy failure but it wouldn't surprise me if it was the same package.
[Test plan]
I have included a test for the AcquireFile constructor to accept a large file size, and then a test that ensures it can read the file size.
Run the autopkgtest suite.
[Where problems could occur]
It could fail in other places now.
For kinetic, the package was copied in from lunar without changes. This upload is actually built in kinetic and hence there is additional regression potential from toolchain changes.
[Other info]
Also including some auxiliary changes as we move back to proper upstream releases to enable testing, mostly around
d/gbp.conf, .gitlab-ci.yml - being updated to point at right places
d/t/control - adding a missing test dependency
data/ - updated mirror lists
The mirror lists are standard updates; the debian/
is needed to enable testing on more minimal autopkgtest images (our images
accidentally include binutils); the other changes have zero impact on the Ubuntu infra or end user side as they only run during development.
Changed in python-apt (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Julian Andres Klode (juliank) |
Changed in python-apt (Ubuntu Bionic): | |
status: | New → In Progress |
description: | updated |
Changed in python-apt (Ubuntu Focal): | |
status: | New → In Progress |
description: | updated |
Well the context for the Jammy traceback isn't as useful:
Traceback (most recent call last):verse/ amd64.. . 8% cnf-extract. py", line 54, in <module> extractor/ extractor/ extractor. py", line 174, in command_ not_found_ extract fetch_binary( destdir= tmpdir) python3/ dist-packages/ apt/package. py", line 883, in fetch_binary
File "./bin/
mirror_root, suite, component, arch)
File "/srv/cnf-
debpath = pkg.candidate.
File "/usr/lib/
self.size, base, destfile=destfile)
OverflowError: signed integer is greater than maximum