[FFmpeg-trac] #9082(avcodec:new): Memory leak while trancoding on GPU
FFmpeg
trac at avcodec.org
Wed Jan 27 21:11:01 EET 2021
#9082: Memory leak while trancoding on GPU
------------------------------------+-----------------------------------
Reporter: misko | Owner:
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Comment (by misko):
Well ... with toolchain=gcc-asan enabled it doesn't work at all. I get
this weird CUDA error:
{{{
ffmpeg version N-99167-g022a12b306 Copyright (c) 2000-2020 the FFmpeg
developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/opt/ffmpeg --enable-cuvid --enable-nvenc
--enable-libfdk-aac --enable-nonfree --enable-gpl --enable-libnpp
--enable-cuda --enable-cuda-nvcc --extra-cflags=-I/usr/local/cuda/include
--extra-ldflags=-L/usr/local/cuda/lib64 --nvccflags='-gencode
arch=compute_60,code=sm_60 -O2' --toolchain=gcc-asan
libavutil 56. 59.100 / 56. 59.100
libavcodec 58.106.100 / 58.106.100
libavformat 58. 56.100 / 58. 56.100
libavdevice 58. 11.102 / 58. 11.102
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[AVHWDeviceContext @ 0x6090000004c0] cu->cuInit(0) failed ->
CUDA_ERROR_OUT_OF_MEMORY: out of memory
Device creation failed: -1313558101.
Failed to set value 'cuda=cuda:1' for option 'init_hw_device': Unknown
error occurred
Error parsing global options: Unknown error occurred
=================================================================
==8292==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 65536 byte(s) in 1 object(s) allocated from:
#0 0x7fa5b4afb720 in __interceptor_realloc (/lib/x86_64-linux-
gnu/libasan.so.5+0xe9720)
#1 0x7fa5acc9ecff (/opt/ffmpeg-asan/ffmpeg_g+0xd0f0cff)
Direct leak of 264 byte(s) in 1 object(s) allocated from:
#0 0x7fa5b4afb518 in calloc (/lib/x86_64-linux-
gnu/libasan.so.5+0xe9518)
#1 0x7fa5ace058ba (/opt/ffmpeg-asan/ffmpeg_g+0xd2578ba)
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x7fa5b4afb518 in calloc (/lib/x86_64-linux-
gnu/libasan.so.5+0xe9518)
#1 0x7fa5acc9f12f (/opt/ffmpeg-asan/ffmpeg_g+0xd0f112f)
Direct leak of 64 byte(s) in 2 object(s) allocated from:
#0 0x7fa5b4afb330 in __interceptor_malloc (/lib/x86_64-linux-
gnu/libasan.so.5+0xe9330)
#1 0x7fa5acc8b081 (/opt/ffmpeg-asan/ffmpeg_g+0xd0dd081)
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x7fa5b4afb518 in calloc (/lib/x86_64-linux-
gnu/libasan.so.5+0xe9518)
#1 0x7fa5acc9f0bf (/opt/ffmpeg-asan/ffmpeg_g+0xd0f10bf)
Indirect leak of 640 byte(s) in 2 object(s) allocated from:
#0 0x7fa5b4afb518 in calloc (/lib/x86_64-linux-
gnu/libasan.so.5+0xe9518)
#1 0x7fa5acc8b09c (/opt/ffmpeg-asan/ffmpeg_g+0xd0dd09c)
SUMMARY: AddressSanitizer: 66640 byte(s) leaked in 8 allocation(s).
}}}
I don't know if I'm doing this the proper way.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9082#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list