plugin/sizes.py crashes on 32 bit system for big packages

Bug #1527744 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-xapian-index (Ubuntu)
New
Undecided
Unassigned

Bug Description

We're seeing crashes in /usr/sbin/update-apt-xapian-index on 32bit Xenial machines since the switch to Python 3. There's a sizes.py plugin that tries to record the installed and package size on the document describing the package. astrometry-data-2mass-00 has an installed size of 14215209984 which is > 32 bits.

When the plugin calls xapian.sortable_serialise(instSize), we get a SystemError as shown in

https://launchpadlibrarian.net/230423992/buildlog_ubuntu_xenial_i386_ubuntu_BUILDING.txt.gz

and this is easily reproducible on a 32 bit system:

$ python3
>>> from xapian import *
>>> sortable_serialise(14215209984)

You first get an OverflowError for the conversion past 32 bits, and then a SystemError because sortable_serialise() is not checking some error code, so it returns a value with an exception set.

Both ultimately are bugs in Xapian, which I will report upstream. For now, in discussion with @cyphermox, it was decided that we'll catch the exception and treat the values as == -1, which the code already handles and declines to add the size for.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.