[Bug 1527744] [NEW] plugin/sizes.py crashes on 32 bit system for big packages

Barry Warsaw 1527744 at bugs.launchpad.net
Fri Dec 18 21:13:11 UTC 2015


Public bug reported:

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.

** Affects: apt-xapian-index (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt-xapian-index in Ubuntu.
https://bugs.launchpad.net/bugs/1527744

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

Status in apt-xapian-index package in Ubuntu:
  New

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 manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt-xapian-index/+bug/1527744/+subscriptions



More information about the foundations-bugs mailing list