Running ndrive test under Windows (which launches nosetests) causes the ndrive.exe process to continuously increase the system memory usage, which sometimes leads to a MemoryError, see NXP-13228.
In fact it looks like a memory leak in the logcapture plugin for nose, as we can see in the logs of NXP-13228:
22:39:48 File "D:\cygwin\home\Nuxeo\Python\Python27\site-packages\nose\plugins\logcapture.py", line 82, in emit
22:39:48 self.buffer.append(self.format(record))
22:39:48 MemoryError
This is strange because looking at logcapture.py, the log buffer should be truncated after each test.
def afterTest(self, test): """Clear buffers after test. """ self.handler.truncate()
Temporarily we can run the tests with the --nologcapture option under Windows, but we need to understand why the buffer is not flushed and how we can solve the issue, maybe by implementing a FileHandler to be used instead of the default MemoryHandler with the nosetests runner, which would also allow us to keep the logs after test execution.
We might need to be able to debug the running python program to inspect the memory, here's an example:
http://blog.devork.be/2009/07/how-to-bring-running-python-program.html