Issue #152 wontfix

Test fails if it loads multiprocessing + logging

Nikolaus Rath avatarNikolaus Rath created an issue

It seems that importing the multiprocessing and logging module in a test case results in strange interpreter errors during shutdown. The problem does not appear if the modules are imported in the setup script before the test cases are loaded.

I have attached a simple example that reproduces the problem.

$ ./setup.py test
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.12.tar.gz
Extracting in /tmp/tmph358ES
Now working in /tmp/tmph358ES/distribute-0.6.12
Building a Distribute egg in /home/nikratio/tmp/d
/home/nikratio/tmp/d/distribute-0.6.12-py2.6.egg
running test
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
writing top-level names to UNKNOWN.egg-info/top_level.txt
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
reading manifest file 'UNKNOWN.egg-info/SOURCES.txt'
writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
running build_ext
test_getattr_root (tests.t3_fs_api.fs_api_tests) ... INFO:fsck:Woops!
ok

----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.6/multiprocessing/util.py", line 258, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.6/multiprocessing/util.py", line 258, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable

.

Comments (8)

  1. Nikolaus Rath

    Tarek, I'm not quite sure what you mean. I already attached a very simple test case to this issue, and yes, it fails for me (as you can see from the pasted output). Did you add a different test? And where did you add it? There is nothing else attached to this issue.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.