[FFmpeg-trac] #9709(undetermined:new): nvenc-segfault-at-eof

FFmpeg trac at avcodec.org
Fri Apr 1 23:53:24 EEST 2022


#9709: nvenc-segfault-at-eof
-------------------------------------+-------------------------------------
             Reporter:  ajaraptor    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 All versions of compiled ffmpeg 5.0 on Ubuntu 20.04 now produce a segfault
 on completion of any file using hevc_nvenc encode.  This does not happen
 in any ffmpeg version before version 5.0.

 Used release 5.0, then updated to release N-106467-ge301a24fa1.  Same
 issue.  Have to revert to a compiled version of 4.4.1 to avoid this error.

 Commands plus gdb and valgrind output are below.  The problem seems to be
 between ffmpeg/hevc_nvenc and the nvidia drivers.  Sample ffmpeg log
 output is attached.

 OS

 Linux sol 5.4.0-107-generic #121-Ubuntu SMP Thu Mar 24 16:04:27 UTC 2022
 x86_64 x86_64 x86_64 GNU/Linux

 NVIDIA DRIVER INFO

 Driver Version: 470.103.01   CUDA Version: 11.4

 Release info for this note (compiled 1 April 22):

 ffmpeg version N-106467-ge301a24fa1 Copyright (c) 2000-2022 the FFmpeg
 developers
   built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
   configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static
 --extra-cflags=-I/root/ffmpeg_build/include --extra-
 ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++
 --bindir=/root/bin --enable-debug=2 --enable-gpl --enable-version3
 --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2
 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-
 libssh --enable-libzmq --enable-libbluray --enable-libcaca --enable-sdl2
 --enable-libzvbi --enable-libwebp --enable-libx264 --enable-libx265
 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
 --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
 --enable-libvidstab --enable-libzimg --enable-cuvid --enable-ffnvcodec
 --enable-nvdec --enable-nvenc --enable-opencl --enable-libcdio --enable-
 libdav1d --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb
 --enable-libmp3lame --enable-libfdk-aac --enable-libshine --enable-
 libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libgsm
 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-
 libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-
 libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 --enable-nonfree
   libavutil      57. 24.101 / 57. 24.101
   libavcodec     59. 25.100 / 59. 25.100
   libavformat    59. 20.101 / 59. 20.101
   libavdevice    59.  6.100 / 59.  6.100
   libavfilter     8. 29.100 /  8. 29.100
   libswscale      6.  6.100 /  6.  6.100
   libswresample   4.  6.100 /  4.  6.100
   libpostproc    56.  5.100 / 56.  5.100

 gdb --args ~/bin/ffmpeg_g -report -i /tv/test2.mkv -map 0:v:0 -map 0:a
 -map 0:s? -c:v hevc_nvenc -profile:v main10 -pix_fmt p010le -level:v 4.1
 -preset p6 -tune hq -rc-lookahead 20 -bf 3 -b_ref_mode 2 -temporal-aq 1
 -rc vbr -multipass 1 -qmin:v 19 -qmax:v 23 -b:v 0 -c:a copy -c:s copy
 /tv/h265/test2.mkv

 valgrind -s ~/bin/ffmpeg_g -report -i /tv/test2.mkv -map 0:v:0 -map 0:a
 -map 0:s? -c:v hevc_nvenc -profile:v main10 -pix_fmt p010le -level:v 4.1
 -preset p6 -tune hq -rc-lookahead 20 -bf 3 -b_ref_mode 2 -temporal-aq 1
 -rc vbr -multipass 1 -qmin:v 19 -qmax:v 23 -b:v 0 -c:a copy -c:s copy
 /tv/h265/test2.mkv

 SYSLOG OUTPUT SAMPLES

 ffmpeg[9305]: segfault at 0 ip 00007f1ab984cb0b sp 00007ffd3dfa0a38 error
 4 in libc-2.31.so[7f1ab97b3000+178000]
 ffmpeg[9814]: segfault at 0 ip 00007f48b26aab0b sp 00007ffe2ae67d08 error
 4 in libc-2.31.so[7f48b2611000+178000]
 ffmpeg[12504]: segfault at 0 ip 00007f4ee0a39b0b sp 00007fffdaa4e3e8 error
 4 in libc-2.31.so[7f4ee09a0000+178000]
 ffmpeg[51522]: segfault at 0 ip 00007f40e9ba4b0b sp 00007ffcf332ac78 error
 4 in libc-2.31.so[7f40e9b0b000+178000]

 GDB OUTPUT

 Thread 1 "ffmpeg_g" received signal SIGSEGV, Segmentation fault.
 memcpy () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:142
 142     ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such
 file or directory.
 (gdb) bt
 #0  memcpy () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-
 erms.S:142
 #1  0x00007fffe411e4d2 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.1
 #2  0x00007fffe411e7ec in  () at /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.1
 #3  0x00007fffe4117364 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.1
 #4  0x00007fffe4117549 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.1
 #5  0x00007fffe41179c5 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.1
 #6  0x00007fffe4115589 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.1
 #7  0x00007fffe412406d in  () at /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.1
 #8  0x0000555556427b78 in nvenc_send_frame
     (avctx=avctx at entry=0x555557332a80, frame=frame at entry=0x55555836c7c0)
 at libavcodec/nvenc.c:2431
 #9  0x0000555556429048 in ff_nvenc_receive_packet (avctx=0x555557332a80,
 pkt=0x555558366500)
     at libavcodec/nvenc.c:2476
 #10 0x0000555555c9c7ca in encode_receive_packet_internal
     (avctx=avctx at entry=0x555557332a80, avpkt=0x555558366500) at
 libavcodec/codec_internal.h:207
 #11 0x0000555555c9cdd1 in avcodec_send_frame (avctx=0x555557332a80,
 frame=0x0) at libavcodec/encode.c:382
 #12 0x0000555555763982 in flush_encoders () at fftools/ffmpeg.c:1977
 #13 transcode () at fftools/ffmpeg.c:4708
 #14 0x000055555573dfae in main (argc=45, argv=0x7fffffffe168) at
 fftools/ffmpeg.c:4904

 (gdb) disass $pc-32,$pc+32
 Dump of assembler code from 0x7ffff2556aeb to 0x7ffff2556b2b:
    0x00007ffff2556aeb <__memmove_chk_sse2_unaligned+11>:        (bad)
    0x00007ffff2556aec <__memmove_chk_sse2_unaligned+12>:        add
 %cl,(%rdi)
    0x00007ffff2556aee:  (bad)
    0x00007ffff2556aef:  add    %dh,%bl
    0x00007ffff2556af1 <memcpy+1>:       nop    %edx
    0x00007ffff2556af4 <memcpy+4>:       mov    %rdi,%rax
    0x00007ffff2556af7 <memcpy+7>:       cmp    $0x10,%rdx
    0x00007ffff2556afb <memcpy+11>:      jb     0x7ffff2556c1b
 <__memmove_sse2_unaligned_erms+75>
    0x00007ffff2556b01 <memcpy+17>:      cmp    $0x20,%rdx
    0x00007ffff2556b05 <memcpy+21>:      ja     0x7ffff2556c6a
 <__memmove_sse2_unaligned_erms+154>
 => 0x00007ffff2556b0b <memcpy+27>:      movups (%rsi),%xmm0
    0x00007ffff2556b0e <memcpy+30>:      movups -0x10(%rsi,%rdx,1),%xmm1
    0x00007ffff2556b13 <memcpy+35>:      movups %xmm0,(%rdi)
    0x00007ffff2556b16 <memcpy+38>:      movups %xmm1,-0x10(%rdi,%rdx,1)
    0x00007ffff2556b1b <memcpy+43>:      retq
    0x00007ffff2556b1c:  nopl   0x0(%rax)
    0x00007ffff2556b20 <__mempcpy_chk_erms+0>:   endbr64
    0x00007ffff2556b24 <__mempcpy_chk_erms+4>:   cmp    %rdx,%rcx
    0x00007ffff2556b27 <__mempcpy_chk_erms+7>:   jb     0x7ffff25c9370
 <__GI___chk_fail>
 End of assembler dump.

 (gdb) info all-registers
 rax            0x5555598e2fa0      93825063071648
 rbx            0x555558f60a40      93825053100608
 rcx            0x1                 1
 rdx            0x10                16
 rsi            0x0                 0
 rdi            0x5555598e2fa0      93825063071648
 rbp            0x0                 0x0
 rsp            0x7fffffffb268      0x7fffffffb268
 r8             0x0                 0
 r9             0x7fffffffb198      140737488335256
 r10            0x7fffffffb190      140737488335248
 r11            0x6247546d          1648841837
 r12            0x555558f9bdf0      93825053343216
 r13            0x5555598e5f60      93825063083872
 r14            0x1                 1
 r15            0x5555592e4100      93825056784640
 rip            0x7ffff2556b0b      0x7ffff2556b0b <memcpy+27>
 eflags         0x10287             [ CF PF SF IF RF ]
 cs             0x33                51
 ss             0x2b                43
 ds             0x0                 0
 es             0x0                 0
 fs             0x0                 0
 gs             0x0                 0
 st0            -nan(0x8080808080808080) (raw 0xffff8080808080808080)
 st1            -nan(0x8080808080808080) (raw 0xffff8080808080808080)
 st2            <invalid float value> (raw 0xffff0000000002000200)
 st3            <invalid float value> (raw 0xffff0200020002000200)
 st4            <invalid float value> (raw 0xffff1010101010101010)
 st5            <invalid float value> (raw 0xffff1010101010101010)
 st6            0                   (raw 0x00000000000000000000)
 st7            <invalid float value> (raw 0xffff0000000000000000)
 fctrl          0x37f               895
 fstat          0x0                 0
 --Type <RET> for more, q to quit, c to continue without paging--
 ftag           0xffff              65535
 fiseg          0x0                 0
 fioff          0x0                 0
 foseg          0x0                 0
 fooff          0x0                 0
 fop            0x0                 0
 mxcsr          0x1fa8              [ OE PE IM DM ZM OM UM PM ]
 bndcfgu        {raw = 0x0, config = {base = 0x0, reserved = 0x0, preserved
 = 0x0, enabled = 0x0}} {raw = 0x0, config = {base = 0, reserved = 0,
 preserved = 0, enabled = 0}}
 bndstatus      {raw = 0x0, status = {bde = 0x0, error = 0x0}} {raw = 0x0,
 status = {bde = 0, error = 0}}
 ymm0           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>},
 v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
 ymm1           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xf5, 0x7e, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0, 0xa0, 0x6d, 0x8c, 0x58, 0x55, 0x55, 0x0 <repeats 18
 times>}, v16_int16 = {0x7ef5, 0x0, 0x0, 0x0, 0x6da0, 0x588c, 0x5555, 0x0,
 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0x7ef5, 0x0,
 0x588c6da0, 0x5555, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x7ef5,
 0x5555588c6da0, 0x0, 0x0}, v2_int128 = {0x5555588c6da00000000000007ef5,
 0x0}}
 ymm2           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xa0, 0x6d, 0x8c, 0x58,
 0x55, 0x55, 0x0, 0x0, 0xf3, 0x7e, 0x0 <repeats 22 times>}, v16_int16 =
 {0x6da0, 0x588c, 0x5555, 0x0, 0x7ef3, 0x0 <repeats 11 times>}, v8_int32 =
 {0x588c6da0, 0x5555, 0x7ef3, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
 {0x5555588c6da0, 0x7ef3, 0x0, 0x0}, v2_int128 = {0x7ef300005555588c6da0,
 0x0}}
 ymm3           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xa0, 0x6d, 0x8c, 0x58,
 0x55, 0x55, 0x0, 0x0, 0xf5, 0x7e, 0x0 <repeats 22 times>}, v16_int16 =
 {0x6da0, 0x588c, 0x5555, 0x0, 0x7ef5, 0x0 <repeats 11 times>}, v8_int32 =
 {0x588c6da0, 0x5555, 0x7ef5, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
 {0x5555588c6da0, 0x7ef5, 0x0, 0x0}, v2_int128 = {0x7ef500005555588c6da0,
 0x0}}
 ymm4           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>},
 v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
 ymm5           {v8_float = {0x80000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x30, 0x9d, 0x8c,
 0x58, 0x55, 0x55, 0x0, 0x0, 0xd4, 0x27, 0x0 <repeats 22 times>}, v16_int16
 = {0x9d30, 0x588c, 0x5555, 0x0, 0x27d4, 0x0 <repeats 11 times>}, v8_int32
 = {0x588c9d30, 0x5555, 0x27d4, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
 {0x5555588c9d30, 0x27d4, 0x0, 0x0}, v2_int128 = {0x27d400005555588c9d30,
 0x0}}
 ymm6           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8--Type <RET> for more, q to
 quit, c to continue without paging--
  = {0xed, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0 <repeats 23
 times>}, v16_int16 = {0x7eed, 0x0, 0x0, 0x0, 0x1, 0x0 <repeats 11 times>},
 v8_int32 = {0x7eed, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 =
 {0x7eed, 0x1, 0x0, 0x0}, v2_int128 = {0x10000000000007eed, 0x0}}
 ymm7           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xf1, 0x7e, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0, 0xa0, 0x6d, 0x8c, 0x58, 0x55, 0x55, 0x0 <repeats 18
 times>}, v16_int16 = {0x7ef1, 0x0, 0x0, 0x0, 0x6da0, 0x588c, 0x5555, 0x0,
 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0x7ef1, 0x0,
 0x588c6da0, 0x5555, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x7ef1,
 0x5555588c6da0, 0x0, 0x0}, v2_int128 = {0x5555588c6da00000000000007ef1,
 0x0}}
 ymm8           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x37, 0x7d, 0x7b, 0x5c,
 0x70, 0x6f, 0x73, 0x28, 0x25, 0x64, 0x2c, 0x25, 0x64, 0x29, 0x7d, 0x0
 <repeats 17 times>}, v16_int16 = {0x7d37, 0x5c7b, 0x6f70, 0x2873, 0x6425,
 0x252c, 0x2964, 0x7d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 =
 {0x5c7b7d37, 0x28736f70, 0x252c6425, 0x7d2964, 0x0, 0x0, 0x0, 0x0},
 v4_int64 = {0x28736f705c7b7d37, 0x7d2964252c6425, 0x0, 0x0}, v2_int128 =
 {0x7d2964252c642528736f705c7b7d37, 0x0}}
 ymm9           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>},
 v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
 ymm10          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>},
 v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x0, 0x0}}
 ymm11          {v8_float = {0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xf, 0x6, 0xac, 0x37, 0xa0,
 0xfd, 0x85, 0x3f, 0x0 <repeats 24 times>}, v16_int16 = {0x60f, 0x37ac,
 0xfda0, 0x3f85, 0x0 <repeats 12 times>}, v8_int32 = {0x37ac060f,
 0x3f85fda0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3f85fda037ac060f,
 0x0, 0x0, 0x0}, v2_int128 = {0x3f85fda037ac060f, 0x0}}
 ymm12          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xa4, 0x61, 0xa0, 0xb, 0x6a,
 0xf2, 0xe1, 0x3e, 0x0 <repeats 24 times>}, v16_int16 = {0x61a4, 0xba0,
 0xf26a, 0x3ee1, 0x0 <repeats 12 times>}, v8_int32 = {0xba061a4,
 0x3ee1f26a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3ee1f26a0ba061a4,
 0x0, 0x0, 0x0}, v2_int128 = {0x3ee1f26a0ba061a4, 0x0}}
 ymm13          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x8c, 0x9e, 0xee, 0xa6,
 0xef, 0xf6, 0x67, 0x3f, 0x0 <repeats 24 times>}, v16_int16 = {0x9e8c,
 0xa6ee, 0xf6ef, 0x3f67, 0x0 <repeats 12 times>}, v8_int32 = {0xa6ee9e8c,
 0x3f67f6ef, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3f67f6efa6ee9e8c,
 0x0, 0x0, 0x0}, v2_int128 = {0x3f67f6efa6ee9e8c, 0x0}}
 ymm14          {v8_float = {0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xa3, 0xa7, 0xbb, 0xe9,
 0xbb, 0xfd, 0x85, 0x3f, 0x0 <repeats 24 times>}, v16_int16 = {0xa7a3,
 0xe9bb, 0xfdbb, 0x3f85, 0x0 <repeats 12 times>}, v8_int32 = {0xe9bba7a3,
 0x3f85fdbb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64--Type <RET> for more,
 q to quit, c to continue without paging--
  = {0x3f85fdbbe9bba7a3, 0x0, 0x0, 0x0}, v2_int128 = {0x3f85fdbbe9bba7a3,
 0x0}}
 ymm15          {v8_float = {0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x52, 0x55, 0x15, 0x0, 0xc0,
 0xff, 0xef, 0x3f, 0x0 <repeats 24 times>}, v16_int16 = {0x5552, 0x15,
 0xffc0, 0x3fef, 0x0 <repeats 12 times>}, v8_int32 = {0x155552, 0x3fefffc0,
 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3fefffc000155552, 0x0, 0x0,
 0x0}, v2_int128 = {0x3fefffc000155552, 0x0}}
 bnd0           {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
 bnd1           {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
 bnd2           {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
 bnd3           {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1
 {lbound = 0x0, ubound = 0xffffffffffffffff} : size -1

 VALGRIND OUTPUT

 ==157472== Invalid read of size 8   4608kB time=00:00:59.96 bitrate=
 629.5kbits/s speed=0.235x
 ==157472==    at 0x48401E6: memcpy at GLIBC_2.2.5 (in /usr/lib/x86_64-linux-
 gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==157472==    by 0x257234D1: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x257237EB: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C363: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C548: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C9C4: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571A588: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2572906C: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0xFDBB77: nvenc_send_frame (nvenc.c:2431)
 ==157472==    by 0xFDD047: ff_nvenc_receive_packet (nvenc.c:2476)
 ==157472==    by 0x8507C9: encode_receive_packet_internal (encode.c:296)
 ==157472==    by 0x850DD0: avcodec_send_frame (encode.c:382)
 ==157472==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
 ==157472==
 ==157472==
 ==157472== Process terminating with default action of signal 11 (SIGSEGV)
 ==157472==  Access not within mapped region at address 0x0
 ==157472==    at 0x48401E6: memcpy at GLIBC_2.2.5 (in /usr/lib/x86_64-linux-
 gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==157472==    by 0x257234D1: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x257237EB: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C363: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C548: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C9C4: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571A588: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2572906C: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0xFDBB77: nvenc_send_frame (nvenc.c:2431)
 ==157472==    by 0xFDD047: ff_nvenc_receive_packet (nvenc.c:2476)
 ==157472==    by 0x8507C9: encode_receive_packet_internal (encode.c:296)
 ==157472==    by 0x850DD0: avcodec_send_frame (encode.c:382)
 ==157472==  If you believe this happened as a result of a stack
 ==157472==  overflow in your program's main thread (unlikely but
 ==157472==  possible), you can try to increase the size of the
 ==157472==  main thread stack using the --main-stacksize= flag.
 ==157472==  The main thread stack size used in this run was 8388608.
 ==157472==
 ==157472== HEAP SUMMARY:
 ==157472==     in use at exit: 115,961,685 bytes in 18,364 blocks
 ==157472==   total heap usage: 338,204 allocs, 319,840 frees, 254,748,932
 bytes allocated
 ==157472==
 ==157472== LEAK SUMMARY:
 ==157472==    definitely lost: 72 bytes in 1 blocks
 ==157472==    indirectly lost: 0 bytes in 0 blocks
 ==157472==      possibly lost: 134,240 bytes in 1,446 blocks
 ==157472==    still reachable: 115,827,373 bytes in 16,917 blocks
 ==157472==                       of which reachable via heuristic:
 ==157472==                         newarray           : 1,536 bytes in 16
 blocks
 ==157472==         suppressed: 0 bytes in 0 blocks
 ==157472== Rerun with --leak-check=full to see details of leaked memory
 ==157472==
 ==157472== Use --track-origins=yes to see where uninitialised values come
 from
 ==157472== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
 ==157472==
 ==157472== 1 errors in context 1 of 2:
 ==157472== Invalid read of size 8
 ==157472==    at 0x48401E6: memcpy at GLIBC_2.2.5 (in /usr/lib/x86_64-linux-
 gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
 ==157472==    by 0x257234D1: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x257237EB: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C363: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C548: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571C9C4: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2571A588: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2572906C: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0xFDBB77: nvenc_send_frame (nvenc.c:2431)
 ==157472==    by 0xFDD047: ff_nvenc_receive_packet (nvenc.c:2476)
 ==157472==    by 0x8507C9: encode_receive_packet_internal (encode.c:296)
 ==157472==    by 0x850DD0: avcodec_send_frame (encode.c:382)
 ==157472==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
 ==157472==
 ==157472==
 ==157472== 1 errors in context 2 of 2:
 ==157472== Conditional jump or move depends on uninitialised value(s)
 ==157472==    at 0x25963AB4: ??? (in /usr/lib/x86_64-linux-
 gnu/libnvcuvid.so.470.103.01)
 ==157472==    by 0x25960957: ??? (in /usr/lib/x86_64-linux-
 gnu/libnvcuvid.so.470.103.01)
 ==157472==    by 0x259B6421: ??? (in /usr/lib/x86_64-linux-
 gnu/libnvcuvid.so.470.103.01)
 ==157472==    by 0x2571B373: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x257296CA: ??? (in /usr/lib/x86_64-linux-gnu/libnvidia-
 encode.so.470.103.01)
 ==157472==    by 0x2D366D: nvenc_open_session (nvenc.c:359)
 ==157472==    by 0x2D7014: nvenc_check_device (nvenc.c:614)
 ==157472==    by 0x2D7014: nvenc_setup_device (nvenc.c:737)
 ==157472==    by 0x2D7014: ff_nvenc_encode_init (nvenc.c:1760)
 ==157472==    by 0x77ED43: avcodec_open2 (avcodec.c:347)
 ==157472==    by 0x310FCC: init_output_stream.constprop.0 (ffmpeg.c:3493)
 ==157472==    by 0x313052: init_output_stream_wrapper (ffmpeg.c:987)
 ==157472==    by 0x313052: do_video_out (ffmpeg.c:1158)
 ==157472==    by 0x3144BD: reap_filters (ffmpeg.c:1540)
 ==157472==    by 0x318182: transcode_step (ffmpeg.c:4644)
 ==157472==    by 0x318182: transcode (ffmpeg.c:4688)
 ==157472==
 ==157472== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
 Segmentation fault
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9709>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list