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/”, 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/”, line 637, in exit
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/concurrent/futures/”, line 235, in shutdown
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/”, line 1060, in join
File “/home/tongyuz/.conda/envs/deepvo_zty/lib/python3.9/”, 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/”, line 66, in handler
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?