[Python-Dev] Mysterious Python pyc file corruption problems

Nick Coghlan ncoghlan at gmail.com
Fri May 17 00:59:05 CEST 2013

On 17 May 2013 08:37, "Guido van Rossum" <guido at python.org> wrote:
> On Thu, May 16, 2013 at 3:27 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>
> > Guido van Rossum wrote:
> >>
> >> This reminds me of the following bug, which can happen when two
> >> processes are both writing the .pyc file and a third is reading it.
> >> ...  I think all the errors are
> >>
> >> actually explainable from this scenario.
> >
> >
> > The second writer will still carry on to write a valid
> > .pyc file, though, won't it? So this wouldn't result in
> > a permanently broken .pyc file being left behind, which
> > is what the original problem description seemed say
> > was happening.
> From the evidence that is not completely clear to me.
> Thomas Wouters' scenario with two different Python versions writing
> the same .pyc file could cause that; I don't know if Barry has ruled
> that possibility out yet.

3.2 uses __pycache__, so it should only potentially conflict within the
same version.

I haven't heard any rumblings about anything like this in Fedora or RHEL,
so my suspicions still lean towards a Debian or Ubuntu specific background
service somehow managing to interfere. However, I'll ask explicitly on the
Fedora Python list to see if anyone has encountered anything similar.


> --
> --Guido van Rossum (python.org/~guido)
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130517/3cc433ab/attachment-0001.html>

More information about the Python-Dev mailing list