nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 395 forks source link

EOFError for multiple tests involving plugintest.py, multiprocessing/managers.py #1063

Closed fersarr closed 6 years ago

fersarr commented 6 years ago

For python Python 2.7.13, on CentOS Linux release 7.3.1611

When running tests for nose/1.3.7 I am having multiple test failures that look very similar:

       | ======================================================================
         | ERROR: runTest (test_attribute_plugin.TestStaticMethod)
         | ----------------------------------------------------------------------
         | Traceback (most recent call last):
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/plugins/plugintest.py", line 272, in setUp
         |     self._execPlugin()
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/plugins/plugintest.py", line 249, in _execPlugin
         |     stream = Buffer()
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/plugins/plugintest.py", line 130, in __init__
         |     self.__queue = Manager().Queue()
         |   File "path2/lib/python2.7/multiprocessing/__init__.py", line 99, in Manager
         |     m.start()
         |   File "path2/lib/python2.7/multiprocessing/managers.py", line 528, in start
         |     self._address = reader.recv()
         | EOFError
         | ======================================================================
         | ERROR: <nose.suite.ContextSuite context=test_multiprocess>
         | test suite for <module 'test_multiprocess' from 'path//nose/1.3.7/medusa-workspace/src/unit_tests/test_multiprocess.pyc'>
         | ----------------------------------------------------------------------
         | Traceback (most recent call last):
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/suite.py", line 209, in run
         |     self.setUp()
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/suite.py", line 292, in setUp
         |     self.setupContext(ancestor)
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/suite.py", line 315, in setupContext
         |     try_run(context, names)
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/util.py", line 469, in try_run
         |     return func(obj)
         |   File "path/nose/1.3.7/medusa-workspace/src/unit_tests/test_multiprocess.py", line 36, in setup
         |     multiprocess._import_mp()
         |   File "path/nose/1.3.7/medusa-workspace/src/nose/plugins/multiprocess.py", line 150, in _import_mp
         |     m = Manager()
         |   File "path2/lib/python2.7/multiprocessing/__init__.py", line 99, in Manager
         |     m.start()
         |   File "path2/lib/python2.7/multiprocessing/managers.py", line 528, in start
         |     self._address = reader.recv()
         | EOFError

All of them end up with EOFError mentioning multiprocessing/managers.py", line 528

Other failing tests with similar error are (just naming a few of them):

-test_attribute_plugin.TestAttributeArray
-test_attribute_plugin.TestAttributeArrayOr
-test_attribute_plugin.TestStatic
-test_failuredetail_plugin.TestFailureDetailWithCapture

Any idea what could be causing this?

fersarr commented 6 years ago

this was apparently related to using a long path, I verified that on shorter paths it works fine. Found this line amongst the errors

File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: AF_UNIX path too long

for reference, the actual path that was causing the error was:

/users/is/xxxxxxxxxxxxx/workspace/xxxxxx-xxxxxx-clean-run-delete/nose/1.3.7/xxxxxx-workspace/pymp-yXGmGd/listener-XY2b62

which is 122 chars long. apparently linux sockets can be up to 108 and this change made it work