[Cython] Cython 0.20 beta 2

Stefan Behnel stefan_ml at behnel.de
Fri Jan 17 07:24:32 CET 2014

Christoph Gohlke, 17.01.2014 03:21:
> On 1/13/2014 2:24 AM, Stefan Behnel wrote:
>> Christoph Gohlke, 13.01.2014 09:46:
>>> I have trouble running the tests (`runtests.py`) on Windows:
>>> [...]
>>> There are hundreds of test errors, most of kind `IOError: [Errno 24] Too
>>> many open files`.
>> The tests start consistently failing at some point, which hints at a file
>> handle leak, either in the test runner or in the compiler.
>>> The test output for 64 bit Python 2.7 with numpy 1.7.2 and msvc9 is at
>>> <http://www.lfd.uci.edu/~gohlke/pythonlibs/tests/cython/Cython-0.20.x-win-amd64-py2.7_test.txt>.
> According to Process Explorer
> <http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx>,
> `\Device\ConDrv` (the Windows Console Driver) file handles are leaked
> during `Doctest`. When the number of open file handles reaches about 2000,
> all kind of things start to fail, including the compiler not being able to
> open/find files such as 'pyconfig.h'. No file handles are leaked when
> testing Cython 0.19.2.

That sounds like it's a problem in the test runner, maybe leaking
subprocesses. On unixish systems, it forks out for each test, but not on
Windows. That makes it likely that you wouldn't notice the problem under
Unix, because the ending child process would clean up the leak. On Windows,
it would add up instead as everything is run by the mainprocess. And since
there are more tests now than in Cython 0.19.x, also more "srctree" tests
that unfold whole directories and run multiple shell commands on them, it's
not impossible that we simply reached the maximum number of file handles
now and stayed a bit below before.

I pushed a couple of fixes to the master branch, but I don't think I found
the problem yet. If you say it's in the doctests, then we'll have to dig
over there a bit more.


More information about the cython-devel mailing list