[FFmpeg-user] segfault in ffmpeg when including yadif in chain

Misha Penkov misha.penkov at gmail.com
Wed Aug 8 03:44:06 CEST 2012


On 7 August 2012 22:09, Nicolas George <nicolas.george at normalesup.org> wrote:
> Le primidi 21 thermidor, an CCXX, Misha Penkov a écrit :
>> I ran a ffmpeg_g, but it did not output anything.  Is there anything
>> else I have to do to get a dump?
>
> To get a backtrace, you need to use debugging tools, such as valgrind or
> gdb; ffmpeg_g is just a version of ffmpeg where the debugs symbols are still
> present, making the file larger but the backtrace much more accurate.
>
> To see how to produce the backtraces, check out:
> http://ffmpeg.org/bugreports.html

Thank you for your explanation.  Here is the GDB output:

mpenkov at misha-desktop:$ gdb --args ~/git-ext/ffmpeg/ffmpeg_g -i
~/Desktop/1440x1080i.avi -vf yadif -f null -
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/mpenkov/git-ext/ffmpeg/ffmpeg_g...done.
(gdb) r
Starting program: /home/mpenkov/git-ext/ffmpeg/ffmpeg_g -i
/home/mpenkov/Desktop/1440x1080i.avi -vf yadif -f null -
[Thread debugging using libthread_db enabled]
ffmpeg version N-43291-gcf753d5 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  7 2012 19:06:29 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libtheora --enable-libvorbis --enable-libx264
--enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
--enable-libvpx --enable-shared --enable-pic --enable-libopencv
  libavutil      51. 66.101 / 51. 65.100
  libavcodec     54. 50.100 / 54. 44.100
  libavformat    54. 22.101 / 54. 19.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  5.102 /  3.  3.100
  libswscale      2.  1.101 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from '/home/mpenkov/Desktop/1440x1080i.avi':
  Metadata:
    encoder         : Lavf54.19.100
  Duration: 00:00:02.98, start: 0.000000, bitrate: 13140 kb/s
    Stream #0:0: Video: mpeg2video (Main) (mpg2 / 0x3267706D),
yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 24000 kb/s, 59.94 fps, 29.97
tbr, 59.94 tbn, 59.94 tbc
[New Thread 0x7fffe6c5e700 (LWP 27123)]
[New Thread 0x7fffe645d700 (LWP 27124)]
[New Thread 0x7fffe5c5c700 (LWP 27125)]
[New Thread 0x7fffe545b700 (LWP 27126)]
[New Thread 0x7fffe4c5a700 (LWP 27127)]
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf54.19.100
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> rawvideo)
Press [q] to stop, [?] for help

Program received signal SIGSEGV, Segmentation fault.
0x00007fffefa39fb2 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x00007fffefa39fb2 in memcpy () from /lib/libc.so.6
#1  0x00007ffff79941d8 in ?? () from /usr/local/lib/libavfilter.so.3
#2  0x00007ffff7994446 in ?? () from /usr/local/lib/libavfilter.so.3
#3  0x00007ffff7995209 in ?? () from /usr/local/lib/libavfilter.so.3
#4  0x00007ffff7940fb7 in ?? () from /usr/local/lib/libavfilter.so.3
#5  0x00007ffff793dbb5 in ?? () from /usr/local/lib/libavfilter.so.3
#6  0x00007ffff79947ec in ?? () from /usr/local/lib/libavfilter.so.3
#7  0x00007ffff793dbb5 in ?? () from /usr/local/lib/libavfilter.so.3
#8  0x00007ffff794020e in avfilter_graph_request_oldest ()
   from /usr/local/lib/libavfilter.so.3
#9  0x00000000004167ae in poll_filters () at ffmpeg.c:2179
#10 0x0000000000417d45 in transcode (argc=<value optimized out>,
    argv=<value optimized out>) at ffmpeg.c:4022
#11 main (argc=<value optimized out>, argv=<value optimized out>)
    at ffmpeg.c:6333
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x7fffefa39f92 to 0x7fffefa39fd2:
   0x00007fffefa39f92 <memcpy+178>:	data32 data32 data32 data32 nopw
%cs:0x0(%rax,%rax,1)
   0x00007fffefa39fa0 <memcpy+192>:	cmp    $0x400,%rdx
   0x00007fffefa39fa7 <memcpy+199>:	ja     0x7fffefa3a020 <memcpy+320>
   0x00007fffefa39fa9 <memcpy+201>:	mov    %edx,%ecx
   0x00007fffefa39fab <memcpy+203>:	shr    $0x5,%ecx
   0x00007fffefa39fae <memcpy+206>:	je     0x7fffefa3a010 <memcpy+304>
   0x00007fffefa39fb0 <memcpy+208>:	dec    %ecx
=> 0x00007fffefa39fb2 <memcpy+210>:	mov    (%rsi),%rax
   0x00007fffefa39fb5 <memcpy+213>:	mov    0x8(%rsi),%r8
   0x00007fffefa39fb9 <memcpy+217>:	mov    0x10(%rsi),%r9
   0x00007fffefa39fbd <memcpy+221>:	mov    0x18(%rsi),%r10
   0x00007fffefa39fc1 <memcpy+225>:	mov    %rax,(%rdi)
   0x00007fffefa39fc4 <memcpy+228>:	mov    %r8,0x8(%rdi)
   0x00007fffefa39fc8 <memcpy+232>:	mov    %r9,0x10(%rdi)
   0x00007fffefa39fcc <memcpy+236>:	mov    %r10,0x18(%rdi)
   0x00007fffefa39fd0 <memcpy+240>:	lea    0x20(%rsi),%rsi
End of assembler dump.
(gdb) info all-registers
rax            0x7fffe3c78bc0	140737014893504
rbx            0x1	1
rcx            0x15	21
rdx            0x2d0	720
rsi            0x0	0
rdi            0x7fffe3c78bc0	140737014893504
rbp            0x63d0c0	0x63d0c0
rsp            0x7fffffffc638	0x7fffffffc638
r8             0x0	0
r9             0x7fffe3e84328	140737017037608
r10            0x8	8
r11            0x0	0
r12            0x0	0
r13            0x2	2
r14            0x1	1
r15            0x684680	6833792
rip            0x7fffefa39fb2	0x7fffefa39fb2 <memcpy+210>
eflags         0x10203	[ CF IF RF ]
cs             0x33	51
ss             0x2b	43
ds             0x0	0
es             0x0	0
fs             0x0	0
---Type <return> to continue, or q <return> to quit---
gs             0x0	0
st0            -nan(0x00000003c)	(raw 0xffff000000000000003c)
st1            -nan(0x000000004)	(raw 0xffff0000000000000004)
st2            -nan(0x000000001)	(raw 0xffff0000000000000001)
st3            -nan(0xdf853e2556b27000)	(raw 0xffffdf853e2556b27000)
st4            -nan(0x8181818181818181)	(raw 0xffff8181818181818181)
st5            -nan(0x81008100810081)	(raw 0xffff0081008100810081)
st6            -nan(0xd000000000000000)	(raw 0xffffd000000000000000)
st7            -inf	(raw 0xffff0000000000000000)
fctrl          0x37f	895
fstat          0x0	0
ftag           0xffff	65535
fiseg          0x0	0
fioff          0x0	0
foseg          0x0	0
fooff          0x0	0
fop            0x0	0
xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {
    0x8000000000000000, 0x8000000000000000}, v16_int8 = {0x79, 0x7b, 0x7c,
---Type <return> to continue, or q <return> to quit---
    0x7a, 0x7a, 0x7a, 0x7a, 0x7a, 0x79, 0x7b, 0x7c, 0x7a, 0x7a, 0x7a, 0x7a,
    0x7a}, v8_int16 = {0x7b79, 0x7a7c, 0x7a7a, 0x7a7a, 0x7b79, 0x7a7c, 0x7a7a,
    0x7a7a}, v4_int32 = {0x7a7c7b79, 0x7a7a7a7a, 0x7a7c7b79, 0x7a7a7a7a},
  v2_int64 = {0x7a7a7a7a7a7c7b79, 0x7a7a7a7a7a7c7b79},
  uint128 = 0x7a7a7a7a7a7c7b797a7a7a7a7a7c7b79}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x73, 0x0, 0x77, 0x0, 0x79, 0x0, 0x74, 0x0, 0x74, 0x0, 0x73,
    0x0, 0x73, 0x0, 0x71, 0x0}, v8_int16 = {0x73, 0x77, 0x79, 0x74, 0x74,
    0x73, 0x73, 0x71}, v4_int32 = {0x770073, 0x740079, 0x730074, 0x710073},
  v2_int64 = {0x74007900770073, 0x71007300730074},
  uint128 = 0x00710073007300740074007900770073}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x7f, 0x0, 0x7f, 0x0, 0x7f, 0x0, 0x80, 0x0, 0x80, 0x0, 0x81,
    0x0, 0x81, 0x0, 0x83, 0x0}, v8_int16 = {0x7f, 0x7f, 0x7f, 0x80, 0x80,
    0x81, 0x81, 0x83}, v4_int32 = {0x7f007f, 0x80007f, 0x810080, 0x830081},
  v2_int64 = {0x80007f007f007f, 0x83008100810080},
  uint128 = 0x00830081008100800080007f007f007f}
xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
---Type <return> to continue, or q <return> to quit---
    0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x6, 0x0, 0x4, 0x0, 0x3, 0x0, 0x6, 0x0, 0x6, 0x0, 0x7, 0x0, 0x7,
    0x0, 0x9, 0x0}, v8_int16 = {0x6, 0x4, 0x3, 0x6, 0x6, 0x7, 0x7, 0x9},
  v4_int32 = {0x40006, 0x60003, 0x70006, 0x90007}, v2_int64 = {
    0x6000300040006, 0x9000700070006},
  uint128 = 0x00090007000700060006000300040006}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x79, 0x0, 0x7b, 0x0, 0x7c, 0x0, 0x7a, 0x0, 0x7a, 0x0, 0x7a,
    0x0, 0x7a, 0x0, 0x7a, 0x0}, v8_int16 = {0x79, 0x7b, 0x7c, 0x7a, 0x7a,
    0x7a, 0x7a, 0x7a}, v4_int32 = {0x7b0079, 0x7a007c, 0x7a007a, 0x7a007a},
  v2_int64 = {0x7a007c007b0079, 0x7a007a007a007a},
  uint128 = 0x007a007a007a007a007a007c007b0079}
xmm8           {v4_float = {0x0, 0x2, 0x0, 0x0}, v2_double = {0x3, 0x0},
  v16_int8 = {0x61, 0xa5, 0xfc, 0xb6, 0x9e, 0x33, 0xb, 0x40, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xa561, 0xb6fc, 0x339e, 0x400b, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0xb6fca561, 0x400b339e, 0x0, 0x0}, v2_int64 = {
    0x400b339eb6fca561, 0x0}, uint128 = 0x0000000000000000400b339eb6fca561}
xmm9           {v4_float = {0x0, 0x1, 0x0, 0x0}, v2_double = {0x1, 0x0},
  v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x3f, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0,
    0x0}, v4_int32 = {0x0, 0x3ff00000, 0x0, 0x0}, v2_int64 = {
---Type <return> to continue, or q <return> to quit---
    0x3ff0000000000000, 0x0}, uint128 = 0x00000000000000003ff0000000000000}
xmm10          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x0, 0x0, 0xb0, 0x29, 0x55, 0x3b, 0xdc, 0xbe, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x0, 0x29b0, 0x3b55, 0xbedc, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0x29b00000, 0xbedc3b55, 0x0, 0x0}, v2_int64 = {
    0xbedc3b5529b00000, 0x0}, uint128 = 0x0000000000000000bedc3b5529b00000}
xmm11          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x7e, 0xa0, 0x5c, 0xbc, 0x16, 0x58, 0x53, 0x3d, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xa07e, 0xbc5c, 0x5816, 0x3d53, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0xbc5ca07e, 0x3d535816, 0x0, 0x0}, v2_int64 = {
    0x3d535816bc5ca07e, 0x0}, uint128 = 0x00000000000000003d535816bc5ca07e}
xmm12          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0xae, 0xa, 0x7d, 0xfc, 0xce, 0x24, 0xde, 0xbe, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xaae, 0xfc7d, 0x24ce, 0xbede, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0xfc7d0aae, 0xbede24ce, 0x0, 0x0}, v2_int64 = {
    0xbede24cefc7d0aae, 0x0}, uint128 = 0x0000000000000000bede24cefc7d0aae}
xmm13          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0xbc, 0x5, 0xa7, 0xa9, 0xcf, 0xa6, 0xf3, 0x3b, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x5bc, 0xa9a7, 0xa6cf, 0x3bf3, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0xa9a705bc, 0x3bf3a6cf, 0x0, 0x0}, v2_int64 = {
    0x3bf3a6cfa9a705bc, 0x0}, uint128 = 0x00000000000000003bf3a6cfa9a705bc}
xmm14          {v4_float = {0x0, 0x2, 0x0, 0x0}, v2_double = {0x3, 0x0},
  v16_int8 = {0x0, 0xc6, 0xb8, 0xbe, 0xd3, 0xb9, 0xb, 0x40, 0x0, 0x0, 0x0,
---Type <return> to continue, or q <return> to quit---
    0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xc600, 0xbeb8, 0xb9d3, 0x400b, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0xbeb8c600, 0x400bb9d3, 0x0, 0x0}, v2_int64 = {
    0x400bb9d3beb8c600, 0x0}, uint128 = 0x0000000000000000400bb9d3beb8c600}
xmm15          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
mxcsr          0x1fa0	[ PE IM DM ZM OM UM PM ]

Here is the valgrind output:

mpenkov at misha-desktop:$ valgrind ~/git-ext/ffmpeg/ffmpeg_g -i
~/Desktop/1440x1080i.avi -vf yadif -f null -
==27289== Memcheck, a memory error detector
==27289== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==27289== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h
for copyright info
==27289== Command: /home/mpenkov/git-ext/ffmpeg/ffmpeg_g -i
/home/mpenkov/Desktop/1440x1080i.avi -vf yadif -f null -
==27289==
--27289-- Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x2a

valgrind: m_debuginfo/readdwarf.c:2292 (copy_convert_CfiExpr_tree):
Assertion 'srcix >= 0 && srcix < VG_(sizeXA)(srcxa)' failed.
==27289==    at 0x3802B1F7: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)

sched status:
  running_tid=0

Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

It looks like an assertion is failing.

>> This is the link to the first 3 seconds of the video:
>> https://dl.dropbox.com/u/15815235/1440x1080i.avi
>
> Got it, but I can not reproduce the segfault, even with valgrind. Are you
> sure it happens with the file you uploaded too?

Yes.

> If so, please describe your build environment exactly.

2.6.32-40-generic
Ubuntu 10.04 LTS
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3

What other information about my environment can I provide?  Please let
me know if any information is missing.

Thank you for taking the time to look at this problem.  I am looking
forward to your reply.

Cheers,
Michael

>
> Regards,
>
> --
>   Nicolas George
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iEYEARECAAYFAlAhE5wACgkQsGPZlzblTJPaugCgj/0+LTNSrC0Yw1R/k0u65kpy
> d6YAn11YU36z0jOpA5+0H936+xro7FpJ
> =cl8H
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list