ConnectionResetError: [Errno 104] Connection reset by peer

luoxiaoyu: <p>Hi, guys.<br>
I’m reproducing a paper’s code based on habitat-simulator &amp; pytorch.<br>
It’s work good in my local env(ubuntu 20.04), but when I transfer the whole env into the nvidia-docker, it’s always shown that ConnectionResetError: [Errno 104] Connection reset by peer.<br>
here is the error.</p>
<p>File “/PointNav-VO/pointnav_vo/run.py”, line 346, in <br>
main()<br>
File “/PointNav-VO/pointnav_vo/run.py”, line 74, in main<br>
run_exp(**vars(args))<br>
File “/PointNav-VO/pointnav_vo/run.py”, line 340, in run_exp<br>
trainer.eval()<br>
File “/PointNav-VO/pointnav_vo/rl/common/base_trainer.py”, line 125, in eval<br>
checkpoint_index=ckpt_id,<br>
File “/PointNav-VO/pointnav_vo/rl/ppo/ppo_trainer.py”, line 530, in _eval_checkpoint<br>
self.envs = construct_envs(config, get_env_class(config.ENV_NAME))<br>
File “/PointNav-VO/pointnav_vo/rl/common/env_utils.py”, line 97, in construct_envs<br>
make_env_fn=make_env_fn, env_fn_args=tuple(tuple(zip(configs, env_classes))),<br>
File “/habitat-lab/habitat/core/vector_env.py”, line 140, in <strong>init</strong><br>
read_fn() for read_fn in self._connection_read_fns<br>
File “/habitat-lab/habitat/core/vector_env.py”, line 140, in <br>
read_fn() for read_fn in self._connection_read_fns<br>
File “/opt/conda/envs/pointnav-vo/lib/python3.7/multiprocessing/connection.py”, line 250, in recv<br>
buf = self._recv_bytes()<br>
File “/opt/conda/envs/pointnav-vo/lib/python3.7/multiprocessing/connection.py”, line 407, in _recv_bytes<br>
buf = self._recv(4)<br>
File “/opt/conda/envs/pointnav-vo/lib/python3.7/multiprocessing/connection.py”, line 379, in _recv<br>
chunk = read(handle, remaining)<br>
ConnectionResetError: [Errno 104] Connection reset by peer<br>
Exception ignored in: &lt;function VectorEnv.<strong>del</strong> at 0x7fec2fdda710&gt;<br>
Traceback (most recent call last):<br>
File “/habitat-lab/habitat/core/vector_env.py”, line 518, in <strong>del</strong><br>
self.close()<br>
File “/habitat-lab/habitat/core/vector_env.py”, line 400, in close<br>
write_fn((CLOSE_COMMAND, None))<br>
File “/opt/conda/envs/pointnav-vo/lib/python3.7/multiprocessing/connection.py”, line 206, in send<br>
self._send_bytes(_ForkingPickler.dumps(obj))<br>
File “/opt/conda/envs/pointnav-vo/lib/python3.7/multiprocessing/connection.py”, line 404, in _send_bytes<br>
self._send(header + buf)<br>
File “/opt/conda/envs/pointnav-vo/lib/python3.7/multiprocessing/connection.py”, line 368, in _send<br>
n = write(self._handle, buf)<br>
BrokenPipeError: [Errno 32] Broken pipe</p>

ptrblck: <p>Are you seeing any errors when trying to run the code with <code>num_workers=0</code>?<br>
Maybe the actual data loading fails and the workers just reraise it as an unrelated crash?</p>

luoxiaoyu: <p>After set it with num_workers=0, it still not work.<br>
My dataset is connected to the docker in the form of a mount, do you think this will be the problem?</p>

ptrblck: <p>What kind of error are you seeing when you are using <code>num_workers=0</code>?</p>

luoxiaoyu: <p>Totally same as before.</p>

ptrblck: <p>In that case check where <code>multiprocessing</code> is used.<br>
Using <code>num_workers&gt;0</code> will use the <code>multiprocessing</code> module to create workers. If you are using <code>num_workers=0</code> the data loading and processing will be performed in the main process and PyTorch will not try to create other processes unless you are explicitly creating them or another library.</p>