-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VideoReader segfault on SOME videos. #2650
Comments
More information:
The segafults only occur when MMX/SSE/AVX optimizations are enabled on FFmpeg |
I believe this issue might be a bug in FFmpeg introduced in FFmpeg/FFmpeg@fc6a588, and that has been fixed in FFmpeg/FFmpeg@ba3e771 The bug report for this issue was in https://trac.ffmpeg.org/ticket/8747 If that's the case, then recompiling FFmpeg would solve the issue. |
Effectively, this issue is directly related to the regression introduced in 4.3 and fixed in FFmpeg/FFmpeg@ba3e771. On FFmpeg 4.2 video reader tests pass |
Given that this was a known issue from ffmpeg, and is fixed by using a different version, I'm closing this issue |
🐛 Bug
VideoReader segmentation fault on long videos when using video_reader backend. This issue is a continuation of #2259
Torchvision segfaults when reading entire test video.
I used to believe this was the issue with long videos only, but it happens on the test videos we have provided as well suggesting in might related to the FFMPEG version installed on a system (the fact that test don't catch that might suggest that).
To Reproduce
Steps to reproduce the behavior:
vframes, _, _ = torchvision.io.read_video(path, pts_unit="sec")
wherepath=$TVDIR/test/assets/videos/TrumanShow_wave_f_nm_np1_fr_med_26.avi
Backtrace suggests it's an issue in libswscale.
Which I've previously found can be due to conflicting inputs (note, this might be due to new/different FFMPEG version?).
Expected behavior
Video is being read
Environment
Collecting environment information...
PyTorch version: 1.6.0
Is debug build: False
CUDA used to build PyTorch: 10.2
OS: Ubuntu 18.04.4 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: Could not collect
Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: Quadro RTX 8000
GPU 1: Quadro RTX 8000
Nvidia driver version: 440.33.01
cuDNN version: Probably one of the following:
/usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7
/usr/local/cuda-10.2.89/targets/x86_64-linux/lib/libcudnn.so.7
Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] torch==1.6.0
[pip3] torchvision==0.7.0a0+78ed10c
[conda] blas 1.0 mkl
[conda] cudatoolkit 10.2.89 hfd86e86_1
[conda] mkl 2020.2 256
[conda] mkl-service 2.3.0 py38he904b0f_0
[conda] mkl_fft 1.1.0 py38h23d657b_0
[conda] mkl_random 1.1.1 py38hcb8c335_0 conda-forge
[conda] numpy 1.19.1 py38hbc911f0_0
[conda] numpy-base 1.19.1 py38hfa32c7d_0
[conda] pytorch 1.6.0 py3.8_cuda10.2.89_cudnn7.6.5_0 pytorch
[conda] torchvision 0.7.0a0+78ed10c pypi_0 pypi
Suggested fix
Removing hidden inputs (specifically size/aspect ratio/crop) in
_read_video
op can in principle fix this, but might be bc breaking if users are exposing these manually in their code.cc @bjuncek
The text was updated successfully, but these errors were encountered: