[New-bugs-announce] [issue14084] test_imp resource leak

Stefan Krah report at bugs.python.org
Wed Feb 22 09:37:48 CET 2012


New submission from Stefan Krah <stefan-usenet at bytereef.org>:

I tried to reproduce the failure from #14080 using this:

./python -m test -uall -v -F test_imp


After around 500 iterations the test fails:


======================================================================
ERROR: test_find_module_encoding (test.test_imp.ImportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stefan/pydev/cpython/Lib/test/test_imp.py", line 58, in test_find_module_encoding
    with imp.find_module('module_' + mod, self.test_path)[0] as fd:
OSError: [Errno 24] Too many open files

======================================================================
ERROR: test_issue1267 (test.test_imp.ImportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stefan/pydev/cpython/Lib/test/test_imp.py", line 70, in test_issue1267
    self.test_path)
OSError: [Errno 24] Too many open files

======================================================================
ERROR: test_issue3594 (test.test_imp.ImportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stefan/pydev/cpython/Lib/test/test_imp.py", line 92, in test_issue3594
    file, filename, info = imp.find_module(temp_mod_name)
OSError: [Errno 24] Too many open files

======================================================================
ERROR: test_issue9319 (test.test_imp.ImportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stefan/pydev/cpython/Lib/test/test_imp.py", line 182, in test_issue9319
    imp.find_module, "badsyntax_pep3120", [path])
  File "/home/stefan/pydev/cpython/Lib/unittest/case.py", line 571, in assertRaises
    return context.handle('assertRaises', callableObj, args, kwargs)
  File "/home/stefan/pydev/cpython/Lib/unittest/case.py", line 135, in handle
    callable_obj(*args, **kwargs)
OSError: [Errno 24] Too many open files

----------
components: Interpreter Core
messages: 153935
nosy: brett.cannon, pitrou, skrah
priority: normal
severity: normal
status: open
title: test_imp resource leak
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14084>
_______________________________________


More information about the New-bugs-announce mailing list