dmlc / dmlc/decord

Deadlock due to something weird with multi-threading

Open
#220 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

Recently I'm training a video model using torch DDP.
I found it's okay to load video frames with OpenCV, but when I switch to decord, the training process will randomly hang (deadlock) forever after several iterations (usually after a long period, i.e., 10K or more iterations).
After reading a lot of issues, I found one in torchvision (https://github.com/pytorch/vision/issues/4392) that may help, which is described as "Note that I think decord does something weird with multi-threading bc I get utilization on all my cores when running the benchmark." The undesirable behavior of multi-threading may lead to the deadlock, could someone tell me whether it can be solved or not?
I have set `vr=decord.VideoReader('\path\to\video', num_threads=1)` but it doesn't work for me :( @zhreshold

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.