This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_multiprocessing_fork.test_mymanager fails and hangs
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: SilentGhost, jnoller, sbt, tobytobkin
Priority: normal Keywords:

Created on 2015-12-05 14:02 by SilentGhost, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg255953 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2015-12-05 14:02
When running either of the test_multiprocessing_fork, test_multiprocessing_spawn or test_multiprocessing_forkserver I get error in test_mymanager that leads to hanging. Here is the fragment:

test_mymanager (test.test_multiprocessing_fork.WithManagerTestMyManager) ... Unhandled exception in thread started by <bound method Thread._bootstrap of <Thread(MainProcess, started daemon 140251183703808)>>
Traceback (most recent call last):
  File "cpython/Lib/multiprocessing/managers.py", line 235, in serve_client
    (methodname, type(obj), exposed)
AttributeError: method '_h' of <class 'test._test_multiprocessing.FooBar'> object is not in exposed={'g', 'f'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cpython/Lib/multiprocessing/managers.py", line 258, in serve_client
    fallback_func = self.fallback_mapping[methodname]
KeyError: '_h'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cpython/Lib/multiprocessing/managers.py", line 195, in handle_request
    result = func(c, *args, **kwds)
  File "cpython/Lib/multiprocessing/managers.py", line 386, in accept_connection
  File "cpython/Lib/multiprocessing/managers.py", line 264, in serve_client
    msg = ('#TRACEBACK', format_exc())
  File "cpython/Lib/traceback.py", line 163, in format_exc
    return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
  File "cpython/Lib/traceback.py", line 117, in format_exception
    type(value), value, tb, limit=limit).format(chain=chain))
  File "cpython/Lib/traceback.py", line 474, in __init__
    capture_locals=capture_locals)
  File "cpython/Lib/traceback.py", line 358, in extract
    f.line
  File "cpython/Lib/traceback.py", line 282, in line
    self._line = linecache.getline(self.filename, self.lineno).strip()
  File "cpython/Lib/linecache.py", line 16, in getline
    lines = getlines(filename, module_globals)
  File "cpython/Lib/linecache.py", line 47, in getlines
    return updatecache(filename, module_globals)
  File "cpython/Lib/linecache.py", line 137, in updatecache
    lines = fp.readlines()
  File "cpython/Lib/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaa in position 4096: invalid start byte

This UnicodeDecodeError repeats couple more times and then everything stops. It doesn't seem to matter how the tests run, either directly or as part of a test suite.
msg256132 - (view) Author: Toby Tobkin (tobytobkin) * Date: 2015-12-09 01:54
Do you have more information on the environment you're running tests on? I did not reproduce the crash by running the tests on a stock Ubuntu 14 64-bit.
msg256145 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2015-12-09 08:25
Hm, after doing "make clean" and rebuilding anew I'm not able to reproduce the bug myself. I guess I just had a stale version of the module still hanging around. Sorry for the mistaken report.
History
Date User Action Args
2022-04-11 14:58:24adminsetgithub: 69993
2015-12-09 08:25:59SilentGhostsetstatus: open -> closed
resolution: not a bug
messages: + msg256145

stage: resolved
2015-12-09 01:55:00tobytobkinsetnosy: + tobytobkin
messages: + msg256132
2015-12-05 14:02:33SilentGhostcreate