[py-dev] py.test --looponfailing IOError
Baptiste Lepilleur
blep at users.sourceforge.net
Sun Jul 20 17:25:32 CEST 2008
Attached is the VERY dirty patch I made to try to diagnose the problem (I
running with it). It adds debug traces and a magic number at the begginning
of each packet header. Though, I haven't been able to reproduce it since the
last time it occurred. The probability of occurrence seems to be reduced
with the added trace, but it still occurred a few times with the traces.
The main possible source I see to explain this random behavior is a race
condition. I find it is suspicious that it always occurs on the first byte
following the bootstrap code send on stdin. The only candidate I've seen in
the code is that stdin/stdout are set to binary mode at the end of the
bootstrap code, but I don't know if this could cause a byte to be lost.
You'll need to create a c:\temp\_execnet directory (debug traces are dumped
there).
----- Original Message -----
From: "holger krekel" <holger at merlinux.de>
To: "Matthew Edwards" <monopocalypse+py-dev at gmail.com>
Cc: <py-dev at codespeak.net>
Sent: Saturday, July 12, 2008 7:01 AM
Subject: Re: [py-dev] py.test --looponfailing IOError
> Hello Matthew,
>
> this seems to be a problem with the lower level network communication
> part.
> also had other reports pointing to that. I aim to look into
> this next week when i am back from EuroPython ...
>
> can you meanwhile post your Python version and attach the test
> file that triggered the problems?
>
> best & thanks,
>
> holger
>
>
> On Sat, Jul 12, 2008 at 10:50 +1200, Matthew Edwards wrote:
>> Hi
>>
>> I'm running py 0.9.1 (from tarfile) on Windows XP. I've written a
>> couple of simple tests, which are in a folder called test. Whenever I
>> do "py.test --looponfailing test/" I get the following output:
>>
>>
>> inserting into sys.path: C:\Program Files\Python\Lib\site-packages
>> * opening PopenGateway: C:\Program Files\Python\python.exe
>> Traceback (most recent call last):
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\bin\win32\\..\py.test", line 4, in
>> <module>
>> py.test.cmdline.main()
>> File "C:\Program Files\Python\Lib\site-packages\py\test\cmdline.py",
>> line 15, in main
>> failures = session.main()
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\test\terminal\remote.py", line 82,
>> in main
>> failures = self.run_remote_session(failures)
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\test\terminal\remote.py", line 100,
>> in run_remote_session
>>
>> gw, topdir = self._initslavegateway()
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\test\terminal\remote.py", line 97,
>> in _initslavegateway
>> return py.execnet.PopenGateway(self.executable), topdir
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\execnet\register.py", line 66, in
>> __init__
>> super(PopenGateway, self).__init__(cmd)
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\execnet\register.py", line 55, in
>> __init__
>> super(PopenCmdGateway, self).__init__(io=io)
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\execnet\register.py", line 29, in
>> __init__
>> self._remote_bootstrap_gateway(io)
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\execnet\register.py", line 80, in
>> _remote_bootstrap_gateway
>> super(PopenGateway, self)._remote_bootstrap_gateway(io, s)
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\execnet\register.py", line 49, in
>> _remote_bootstrap_gateway
>> io.write('%r\n' % source)
>> File "C:\Program
>> Files\Python\Lib\site-packages\py\execnet\inputoutput.py", line 95, in
>> write
>> self.outfile.write(data)
>> IOError: [Errno 22] Invalid argument
>>
>> I can run the tests without --looponfailing.
>>
>> Any help appreciated
>> Matthew
>> _______________________________________________
>> py-dev mailing list
>> py-dev at codespeak.net
>> http://codespeak.net/mailman/listinfo/py-dev
>>
>
> --
> collaborative expert contracting: http://merlinux.eu
> pylib py.test/greenlets/svn APIs: http://pylib.org
> PyPy Python/Compiler tool chain: http://codespeak.net/pypy
> _______________________________________________
> py-dev mailing list
> py-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/py-dev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: execnet.patch
Type: application/octet-stream
Size: 5615 bytes
Desc: not available
Url : http://codespeak.net/pipermail/py-dev/attachments/20080720/192f1e20/attachment.obj
More information about the py-dev
mailing list