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

Bug #1527745 reported by Barry Warsaw on 2015-12-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-xapian-index (Ubuntu)
High
Barry Warsaw
xapian1.3-bindings (Ubuntu)
High
Barry Warsaw

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.

Barry Warsaw (barry) on 2015-12-18
Changed in apt-xapian-index (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
status: New → In Progress
importance: Undecided → High
Barry Warsaw (barry) wrote :

I think the SystemError will require a fix to xapian1.3-bindings.

Changed in xapian1.3-bindings (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Barry Warsaw (barry)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt-xapian-index - 0.47ubuntu6

---------------
apt-xapian-index (0.47ubuntu6) xenial; urgency=medium

  * debian/patches/06_32bit_sizes.patch: Watch out for package sizes that
    don't fit in 32 bits. (LP: #1527745)

 -- Barry Warsaw <email address hidden> Fri, 18 Dec 2015 16:47:43 -0500

Changed in apt-xapian-index (Ubuntu):
status: In Progress → Fix Released
Barry Warsaw (barry) wrote :

The underlying bug has been reported upstream: http://trac.xapian.org/ticket/703

Amr Ibrahim (amribrahim1987) wrote :

It's fixed upstream in http://trac.xapian.org/ticket/703

平凡 (sysy5435) on 2016-07-12
Changed in xapian1.3-bindings (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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