many tests fail on darwin due to too many open files

Bug #1037433 reported by Mike McCracken
8
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/sn/knffnnd96s9c237ktkb4llxm0000gn/T/tmp_2xSSy'

We may need to limit the number of concurrently run tests somehow.

Revision history for this message
Vincent Ladeuil (vila) wrote :

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')
   f.write('tagada')

or

   content = open('xxx').read()

were fixed by doing:

   with open('xxx') as f:
     f.write('tagada')

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.