使用多个工作人员时,我使用 PyTorch DataLoader 收到此错误。Python 通过启动许多进程进行多处理,其中一个进程在以只读模式读取文件时出现此错误(对于 CIFAR10 数据集)。只需重新运行脚本即可解决问题,所以我相信这是某种零星的罕见操作系统错误。如果您设置了 PyTorch num_workers=0
,也可能有助于解决错误。
如果有人感兴趣,下面是完整的错误:
Inconsistency detected by ld.so dl-open.c 272 dl_open_worker Assertion `_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT' failed!
Traceback (most recent call last):
File "/miniconda/envs/petridishpytorchcuda92/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 724, in _try_get_data
data = self._data_queue.get(timeout=timeout)
File "/miniconda/envs/petridishpytorchcuda92/lib/python3.6/queue.py", line 173, in get
self.not_empty.wait(remaining)
File "/miniconda/envs/petridishpytorchcuda92/lib/python3.6/threading.py", line 299, in wait
gotit = waiter.acquire(True, timeout)
File "/miniconda/envs/petridishpytorchcuda92/lib/python3.6/site-packages/torch/utils/data/_utils/signal_handling.py", line 66, in handler
_error_if_any_worker_fails()
RuntimeError DataLoader worker (pid 272) exited unexpectedly with exit code 127. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.