many tests fail on darwin due to too many open files
Bug #1037433 reported by
Mike McCracken
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Client |
New
|
High
|
Roberto Alsina |
Bug Description
when running the full test suite on darwin, many of the offload queue tests fail with this error or similar
fd = _os.open(file, flags, 0600)
exceptions.OSError: [Errno 24] Too many open files: '/var/folders/
We may need to limit the number of concurrently run tests somehow.
To post a comment you must log in.
FTR, we had similar issues with bzr on windows and osx, one cause was tests opening files but never closing them.
I.e. stuff like:
f = open('xxx', 'w') 'tagada' )
f.write(
or
content = open('xxx').read()
were fixed by doing:
with open('xxx') as f: write(' tagada' )
f.
or
with open('xxx') as f:
content = f.read()
Also, 'Too many open files' is also raised on osx when sockets are not timely closed.
Since this kind of leaks is tedious to track down, we worked around the issue for quite some time by running tests in parallel. I..e the test suite is split and processes are launched to run a subset. This spreads the leaks across multiple processes allowing more tests to be run... until a subset hits the limit again of course.