multiprocessing.Manager() + cd leads to EOFError · Issue #890 · nedbat/coveragepy (original) (raw)
Describe the bug
Change of directory + multiprocessing.Manager() entrance results to EOFError with coverage 5.0
To Reproduce
- What version of Python are you using?
Python 3.8.0rc1
It also fails on travis withPython 3.6.3
- What version of coverage.py are you using? coverage debug sys
-- sys -------------------------------------------------------
version: 5.0
coverage: /mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/lib/python3.8/site-packages/coverage/__init__.py
tracer: -none-
CTracer: available
plugins.file_tracers: -none-
plugins.configurers: -none-
plugins.context_switchers: -none-
configs_attempted: .coveragerc
configs_read: .coveragerc
config_file: .coveragerc
config_contents: '[run]\nconcurrency = multiprocessing'
data_file: -none-
python: 3.8.0rc1 (default, Oct 1 2019, 21:48:24) [GCC 7.4.0]
platform: Linux-4.15.0-70-generic-x86_64-with-glibc2.27
implementation: CPython
executable: /mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/bin/python
def_encoding: utf-8
fs_encoding: utf-8
pid: 11108
cwd: /mnt/md0/Documents/PycharmProjects/remote-runner
path: /mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/bin
/mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/lib/python38.zip
/mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/lib/python3.8
/mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/lib/python3.8/lib-dynload
/usr/lib/python3.8
/mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/lib/python3.8/site-packages
/mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/lib/python3.8/site-packages/remote_runner-0.2.0-py3.8.egg
environment: -none-
command_line: /mnt/md0/Documents/PycharmProjects/remote-runner/venv-3.8/bin/coverage debug sys
sqlite3_version: 2.6.0
sqlite3_sqlite_version: 3.22.0
- --
- What code are you running?
import multiprocessing import os
if not os.path.exists("./tmp"): os.mkdir("./tmp") os.chdir("./tmp")
with multiprocessing.Manager() as manager: pass
print("ok")
- What commands did you run? python -m coverage run repro.py
Traceback (most recent call last):
File "repro.py", line 7, in <module>
with multiprocessing.Manager() as manager:
File "/usr/lib/python3.8/multiprocessing/context.py", line 57, in Manager
m.start()
File "/usr/lib/python3.8/multiprocessing/managers.py", line 583, in start
self._address = reader.recv()
File "/usr/lib/python3.8/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
File "/usr/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
buf = self._recv(4)
File "/usr/lib/python3.8/multiprocessing/connection.py", line 383, in _recv
raise EOFError
EOFError
python repro.py
Expected behaviorok
message
Additional context
Seems like bug was introduced with 5.0 release