[Python-Dev] Mysterious Python pyc file corruption problems
barry at python.org
Thu May 16 17:40:02 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
On May 15, 2013, at 06:06 PM, Tres Seaver wrote:
>On 05/15/2013 04:58 PM, Barry Warsaw wrote:
>> This leads me to hypothesize that the bug is due to an as yet
>> unidentified race condition during installation of Python source code
>> on Ubuntu, which is normally when we automatically byte compile the
>> source to .pyc files.
>Any chance you are using 'detox' or the equivalent to run tests on
>mutliple interpreters in parallel? The only "bad marshall data" errors I
>have seen lately seemed to be provoked by that kind of practice.
Nope. PyPI's detox isn't even available in Ubuntu currently. (The detox
package in Ubuntu is something else.)
Tests should only be run at package build time, not installation time, and the
byte compiling of source files at installation time *should* be single
threaded and single process.
We've since found a few cases where Python 3.3 pyc files are probably
corrupted, so that shoots down my theory about a race condition on
reading/writing pyc files, since 3.3 implements atomic-rename and *should* be
immune to that kind of thing.
It's still a mystery though.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Python-Dev