Actually, I think this bug is in line with many other related bugs Brian has identified in Python 2. All of them seem to come down to corrupted .pyc files, and all can be solved by essentially deleting the corrupted pyc and regenerating it, as is the effect of the steps in comment #1.
What's interesting about this bug is that it's the first so far identified for Python 3, but what's also interesting is that it's reported against Python 3.2 not 3.3. So far, we've seen this bug reported primarily against 2.7. The thing is that 3.2 and 2.7 share the same algorithm for writing pyc files, attempting to get an exclusive open on the file but *not* doing an atomic rename. In Python 3.3, with the switch to importlib, the atomic rename has been added. So far, I haven't seen this bug reported against Python 3.3 so I'm still going with my working hypothesis which is that *something* as yet unidentified is causing a race condition on writing the pyc files, thus truncating or corrupting them. I need to analyze write_compiled_module() in import.c in more detail to see if that's really possible. In parallel, more analysis is needed to try to identify whether there are indeed multiple writers to pyc files possible, e.g. during installation via ubiquity as Colin pointed out in IRC, or because of some later case. There has to be two processes that see the bare .py file and think they need to write a .pyc file at the same time, *and* that the protections against overwriting in import.c are not enough. The dual-writer process is as yet still unidentified. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1093071 Title: can't import lsb_release in python3 anymore To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/1093071/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
