** Description changed: - While installing Muon the following exception was raised. + [Impact] - Ophalen:1 http://nl.archive.ubuntu.com/ubuntu zesty/universe amd64 muon amd64 - 4:5.6.0-0ubuntu2 [332 kB] - Ophalen:2 http://nl.archive.ubuntu.com/ubuntu zesty/universe amd64 muon-updater - all 4:5.8.4-0ubuntu1 [3268 B] - 335 kB opgehaald in 0s (861 kB/s) - Voorheen niet geselecteerd pakket muon wordt geselecteerd. - (Database wordt ingelezen ... 238429 bestanden en mappen momenteel - geïnstalleerd.) - Uitpakken van .../0-muon_4%3a5.6.0-0ubuntu2_amd64.deb wordt voorbereid... - Bezig met uitpakken van muon (4:5.6.0-0ubuntu2) ... - Voorheen niet geselecteerd pakket muon-updater wordt geselecteerd. - Uitpakken van .../1-muon-updater_4%3a5.8.4-0ubuntu1_all.deb wordt voorbereid... - Bezig met uitpakken van muon-updater (4:5.8.4-0ubuntu1) ... - Bezig met afhandelen van triggers voor mime-support (3.60ubuntu1) ... - Instellen van muon-updater (4:5.8.4-0ubuntu1) ... - Instellen van muon (4:5.6.0-0ubuntu2) ... + 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. - Bezig met afhandelen van triggers voor hicolor-icon-theme (0.15-1) ... - done.. + 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 keeps a reference to the os.unlink function in the + ServerProgress instance, such that it has the same lifespan. - This bug was originally reported against Muon as https://bugs.kde.org/show_bug.cgi?id=374084 but the crash actually happens in a-x-i. + [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 self.os_unlink becomes + unreachable, we get the same exception again. + + [Other Info] + + * There is probably a more "pythonic" way to fix this. For instance, + avoiding __del__. That requires a larger change.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1652641 Title: crash in indexer.py, AttributeError: 'NoneType' object has no attribute 'unlink' To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt-xapian-index/+bug/1652641/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
