RuntimeError: DataLoader worker exited unexpectedly while using ThreadPoolExecutor in concurrent.futures

Traceback (most recent call last):
File “/home/sduu1/userspace/zhangtongyu/DEEPVO_KITTI/deepvo_direct_on_real2/main.py”, line 194, in
futures = [executor.submit(test_meanwhile,M_deepvo, test_video,device) for test_video in test_video_list]
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/concurrent/futures/_base.py”, line 637, in exit
self.shutdown(wait=True)
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/concurrent/futures/thread.py”, line 235, in shutdown
t.join()
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/threading.py”, line 1060, in join
self._wait_for_tstate_lock()
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/threading.py”, line 1080, in _wait_for_tstate_lock
if lock.acquire(block, timeout):
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/site-packages/torch/utils/data/_utils/signal_handling.py”, line 66, in handler
_error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 15516) exited unexpectedly with exit code 1. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.
Dear all,
I tried to use mutiple thread(3 threads) when test the model.In most time, it went on perfectly well.However ,sometime it threw this error sometimes.I wonder why this occurs?