[Bug 1652641] Re: crash in indexer.py, AttributeError: 'NoneType' object has no attribute 'unlink'

Brian Murray brian at ubuntu.com
Thu Mar 1 18:37:32 UTC 2018


Hello Carlo, or anyone else affected,

Accepted apt-xapian-index into xenial-proposed. The package will build
now and be available at https://launchpad.net/ubuntu/+source/apt-xapian-
index/0.47ubuntu8.4 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-xenial to verification-done-xenial. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-xenial. In either case, without details of
your testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: apt-xapian-index (Ubuntu Xenial)
       Status: In Progress => Fix Committed

** Tags added: verification-needed-xenial

-- 
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/1652641

Title:
  crash in indexer.py, AttributeError: 'NoneType' object has no
  attribute 'unlink'

Status in apt-xapian-index package in Ubuntu:
  Fix Released
Status in apt-xapian-index source package in Xenial:
  Fix Committed
Status in apt-xapian-index source package in Zesty:
  Fix Released

Bug description:
  [Impact]

  When the apt-xapian-index is already up to date, and under certain
  conditions, update-apt-xapian-index throws an exception.

  The index /var/lib/apt-xapian-index is up to date
  Exception ignored in: <bound method ServerProgress.__del__ of
  <axi.indexer.ServerProgress object at 0x7f04a5ae4c18>>
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/axi/indexer.py", line 306, in __del__
  AttributeError: 'NoneType' object has no attribute 'unlink'

  This happens more frequently when it is run with nice and ionice,
  which is the case in the cron.weekly/apt-xapian-index cron job.

  This is not severe, since the exception is thrown on exit, and depends
  on the way python3 cleans up the environment. Anyway, this leaves a
  socket file behind, and creates noise in cron logs (see comment #2).

  The patch uses a weakref finalizer in order to remove the socket file.

  [Test Case]

  * `sudo nice -n 19 ionice -c 3 update-apt-xapian-index --quiet`
  * may need to run 4 times or more
  * no exception is thrown

  [Regression Potential]

  * If the os module is unloaded anyway and os.unlink becomes unreachable, we get the same exception again.
  * We import the `weakref` module, which was not used before.

  [Other Info]

  * This description was updated to reflect the changes in the behavior
  of the patch that was released in Zesty. It still needs sponsoring for
  Xenial.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt-xapian-index/+bug/1652641/+subscriptions



More information about the foundations-bugs mailing list