On Dec 16, 2015, at 11:07 AM, Iain Lane wrote: Thanks for fixing the other binary open. I saw that while I was testing but forgot to come back to it.
>laney@raleigh> sudo PYTHONDONTWRITEBYTECODE=1 >/usr/sbin/update-apt-xapian-index --force --quiet >Exception ignored in: <bound method ServerProgress.__del__ of ><axi.indexer.ServerProgress object at 0x7f79fe963f28>> >Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/axi/indexer.py", line 306, in __del__ >TypeError: 'NoneType' object is not callable I saw this one too, and another related traceback: 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' Note that this one is complaining that the os module has no unlink() function. Both of these happen in ServerProgress.__del__() and are seen at process shutdown time. When Python exits, it goes through a rather complicated dance to finalize and free things, including assigning module attributes to None first to break loops and free references, before coming back and destroying the module objects. But there are no ordering guarantees. __del__() is notorious for seeing problems like this, and it's clear a ServerProgress object is surviving until module finalization. When its __del__() gets called, it's likely the os module (and very possibly others) have been None-ified, leading to this exception. Another thing I've noticed is that in update-apt-xapian-index, it grabs a lock but the lock is never explicitly released. lock() is also the place where the ServerProgress object gets created. So the code is expecting that process exit is also releasing the lock, which is reasonable. To be completely clean, I think u-a-x-i should explicitly call something like an unlock method that would both release the lockf and cleanly destroy the ServerProgress object, ensuring its __del__() would get called before Python's finalization process. OTOH, given that this happens at process shutdown, it's probably harmless, and given that it doesn't seem like upstream a-x-i is getting much love in Debian, I'm inclined to hold my nose and ignore this. If you disagree though, let me know and it probably wouldn't be too difficult to whip up something cleaner. What's another Ubuntu delta in the scheme of things? :) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1526450 Title: /usr/sbin/update-apt-xapian-index:ImportError:/usr/sbin/update-apt- xapian- index@104:setupIndexing:__init__:__init__:load_source:_load:_load_unlocked:exec_module:_call_with_frames_removed:/usr/share /apt-xapian-index/plugins/software_center.py@13:/usr/share/software- center/softwarecenter/db/update.py@33:/usr/share/software- center/softwarecenter/backend/scagent.py@26 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1526450/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
