Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File leaks in nosebook #17

Open
gramster opened this issue Jun 29, 2015 · 1 comment
Open

File leaks in nosebook #17

gramster opened this issue Jun 29, 2015 · 1 comment

Comments

@gramster
Copy link

Make a bunch of notebooks with failing tests and run with nosebook. After a few fail you start getting kernel creation failures along the lines of:

ERROR: Failure: OSError ([Errno 24] Too many open files: '/var/folders/00/17c28000h01000cxqpysvccm004xh9/T/tmpImZYO5.json')

Traceback (most recent call last):
File "/Users/gram/anaconda/lib/python2.7/site-packages/nose/plugins/manager.py", line 154, in generate
for r in result:
File "/Users/gram/anaconda/lib/python2.7/site-packages/nosebook-0.4.0-py2.7.egg/nosebook.py", line 222, in loadTestsFromFile
manager, kernel = self.newKernel(nb)
File "/Users/gram/anaconda/lib/python2.7/site-packages/nosebook-0.4.0-py2.7.egg/nosebook.py", line 53, in newKernel
return utils.start_new_kernel()
File "/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/tests/utils.py", line 49, in start_new_kernel
File "/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/manager.py", line 208, in start_kernel
File "/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/connect.py", line 484, in write_connection_file
File "/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/connect.py", line 98, in write_connection_file
File "/Users/gram/anaconda/lib/python2.7/tempfile.py", line 308, in mkstemp
File "/Users/gram/anaconda/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
OSError: [Errno 24] Too many open files: '/var/folders/00/17c28000h01000cxqpysvccm004xh9/T/tmpImZYO5.json'

It seems like test failures leak files.

I tried adding a manager.shutdown_kernel() in a finally block in loadTestsFromFile but that was insufficient to fix this.

@bollwyvl
Copy link
Owner

Ooh, thanks! I'll look into it!

On 13:21, Mon, Jun 29, 2015 Graham Wheeler [email protected] wrote:

Make a bunch of notebooks with failing tests and run with nosebook. After
a few fail you start getting kernel creation failures along the lines of:
ERROR: Failure: OSError ([Errno 24] Too many open files:
'/var/folders/00/17c28000h01000cxqpysvccm004xh9/T/tmpImZYO5.json')

Traceback (most recent call last):
File
"/Users/gram/anaconda/lib/python2.7/site-packages/nose/plugins/manager.py",
line 154, in generate
for r in result:
File
"/Users/gram/anaconda/lib/python2.7/site-packages/nosebook-0.4.0-py2.7.egg/nosebook.py",
line 222, in loadTestsFromFile
manager, kernel = self.newKernel(nb)
File
"/Users/gram/anaconda/lib/python2.7/site-packages/nosebook-0.4.0-py2.7.egg/nosebook.py",
line 53, in newKernel
return utils.start_new_kernel()
File
"/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/tests/utils.py",
line 49, in start_new_kernel
File
"/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/manager.py",
line 208, in start_kernel
File
"/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/connect.py",
line 484, in write_connection_file
File
"/Users/gram/anaconda/lib/python2.7/site-packages/IPython/kernel/connect.py",
line 98, in write_connection_file
File "/Users/gram/anaconda/lib/python2.7/tempfile.py", line 308, in mkstemp
File "/Users/gram/anaconda/lib/python2.7/tempfile.py", line 239, in
_mkstemp_inner
OSError: [Errno 24] Too many open files:
'/var/folders/00/17c28000h01000cxqpysvccm004xh9/T/tmpImZYO5.json'

It seems like test failures leak files.

I tried adding a manager.shutdown_kernel() in a finally block in
loadTestsFromFile but that was insufficient to fix this.


Reply to this email directly or view it on GitHub
#17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants