New submission from Amr Ali:
Using `multiprocessing.Manager` to share a `dict` between two processes raises
the below exception at main process termination. Child process is joined and
terminates gracefully before the main process.
Replacing multiprocessing/forking.py:135 with `from multiprocessing.connection
import wait` fixes the issue.
Python 3.3.1 (default, Sep 25 2013, 19:29:01)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'3.3.1 (default, Sep 25 2013, 19:29:01) \n[GCC 4.7.3]'
# multiprocessing/forking.py:135
132 def wait(self, timeout=None):
133 if self.returncode is None:
134 if timeout is not None:
135 from .connection import wait
136 if not wait([self.sentinel], timeout):
137 return None
138 # This shouldn't block if wait() returned successfully.
139 return self.poll(os.WNOHANG if timeout == 0.0 else 0)
140 return self.returncode
# Traceback
Traceback (most recent call last):
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/util.py",
line 255, in _run_finalizers
finalizer()
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/util.py",
line 188, in __call__
res = self._callback(*self._args, **self._kwargs)
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/managers.py",
line 588, in _finalize_manager
process.join(timeout=1.0)
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/process.py",
line 127, in join
res = self._popen.wait(timeout)
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/forking.py",
line 135, in wait
from .connection import wait
SystemError: Parent module 'multiprocessing' not loaded, cannot perform
relative import
Traceback (most recent call last):
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/util.py",
line 255, in _run_finalizers
finalizer()
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/util.py",
line 188, in __call__
res = self._callback(*self._args, **self._kwargs)
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/managers.py",
line 588, in _finalize_manager
process.join(timeout=1.0)
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/process.py",
line 127, in join
res = self._popen.wait(timeout)
File
"/home/d4de/work/redacted/redacted-engine/venv/lib/python3.3/multiprocessing/forking.py",
line 135, in wait
from .connection import wait
SystemError: Parent module 'multiprocessing' not loaded, cannot perform
relative import
----------
components: Library (Lib)
messages: 211262
nosy: Amr.Ali, jnoller, sbt
priority: normal
severity: normal
status: open
title: SystemError: Parent module 'multiprocessing' not loaded, cannot perform
relative import
type: crash
versions: Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20633>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com