[FFmpeg-trac] #197(undetermined:new): Multi-threaded decoding with -threads results in seg fault

FFmpeg trac at avcodec.org
Fri May 13 13:02:54 CEST 2011


#197: Multi-threaded decoding with -threads results in seg fault
--------------------------+--------------------------
 Reporter:  gepmff        |        Type:  defect
   Status:  new           |    Priority:  normal
Component:  undetermined  |     Version:  unspecified
 Keywords:                |  Blocked By:
 Blocking:                |  Reproduced:  0
 Analyzed:  0             |
--------------------------+--------------------------
 '''Successful decoding with -threads 1:'''


 {{{
 $ ffmpeg -v 9 -loglevel 99 -vsync 0 -threads 1 -i test.mkv -f null -vcodec
 rawvideo -an -
 ffmpeg version git-N-29906-ge3114a9, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on May 13 2011 12:18:50 with gcc 4.5.2
   configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-
 postproc --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-
 libvorbis --enable-libx264 --enable-x11grab --enable-shared
   libavutil    51.  2. 1 / 51.  2. 1
   libavcodec   53.  5. 0 / 53.  5. 0
   libavformat  53.  0. 3 / 53.  0. 3
   libavdevice  53.  0. 0 / 53.  0. 0
   libavfilter   2.  5. 0 /  2.  5. 0
   libswscale    0. 14. 0 /  0. 14. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [NULL @ 0x1d0ed40] Format matroska,webm probed with size=2048 and
 score=100
 st:0 removing common factor 1000000 from timebase
 [h264 @ 0x1d11800] Unsupported bit depth: 0
 [h264 @ 0x1d11800] no picture
     Last message repeated 1 times
 [matroska,webm @ 0x1d0ed40] All info found
 [matroska,webm @ 0x1d0ed40] Estimating duration from bitrate, this may be
 inaccurate

 Seems stream 0 codec frame rate differs from container frame rate: 2000.00
 (2000/1) -> 29.97 (30000/1001)
 Input #0, matroska,webm, from 'test.mkv':
   Duration: 00:01:59.48, start: 0.000000, bitrate: N/A
     Stream #0.0(eng), 43, 1/1000: Video: h264 (High), yuv420p, 720x480,
 1/2000, PAR 1:1 DAR 3:2, 29.97 tbr, 1k tbn, 2k tbc (default)
 [buffer @ 0x1d170e0] w:720 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf53.0.3
     Stream #0.0(eng), 0, 1/90000: Video: rawvideo, yuv420p, 720x480 [PAR
 1:1 DAR 3:2], 1001/30000, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc (default)
 Stream mapping:
   Stream #0.0 -> #0.0
 Press [q] to stop encoding
 [h264 @ 0x1d11800] no picture
     Last message repeated 1 times    -0kB time=114.61 bitrate=
 -0.0kbits/s
 frame= 3582 fps=423 q=0.0 Lsize=      -0kB time=119.52 bitrate=
 -0.0kbits/s
 video:0kB audio:0kB global headers:0kB muxing overhead -inf%
 }}}


 '''Decoding with anything above -threads 1 results seg fault:'''


 {{{
 $ ffmpeg -v 9 -loglevel 99 -vsync 0 -threads 2 -i test.mkv -f null -vcodec
 rawvideo -an -
 ffmpeg version git-N-29906-ge3114a9, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on May 13 2011 12:18:50 with gcc 4.5.2
   configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-
 postproc --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-
 libvorbis --enable-libx264 --enable-x11grab --enable-shared
   libavutil    51.  2. 1 / 51.  2. 1
   libavcodec   53.  5. 0 / 53.  5. 0
   libavformat  53.  0. 3 / 53.  0. 3
   libavdevice  53.  0. 0 / 53.  0. 0
   libavfilter   2.  5. 0 /  2.  5. 0
   libswscale    0. 14. 0 /  0. 14. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [NULL @ 0x223dd40] Format matroska,webm probed with size=2048 and
 score=100
 st:0 removing common factor 1000000 from timebase
 [h264 @ 0x2240800] Unsupported bit depth: 0
 [h264 @ 0x2240800] no picture
     Last message repeated 1 times
 [matroska,webm @ 0x223dd40] All info found
 [matroska,webm @ 0x223dd40] Estimating duration from bitrate, this may be
 inaccurate

 Seems stream 0 codec frame rate differs from container frame rate: 2000.00
 (2000/1) -> 29.97 (30000/1001)
 Input #0, matroska,webm, from 'test.mkv':
   Duration: 00:01:59.48, start: 0.000000, bitrate: N/A
     Stream #0.0(eng), 43, 1/1000: Video: h264 (High), yuv420p, 720x480,
 1/2000, PAR 1:1 DAR 3:2, 29.97 tbr, 1k tbn, 2k tbc (default)
 [buffer @ 0x22460e0] w:720 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf53.0.3
     Stream #0.0(eng), 0, 1/90000: Video: rawvideo, yuv420p, 720x480 [PAR
 1:1 DAR 3:2], 1001/30000, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc (default)
 Stream mapping:
   Stream #0.0 -> #0.0
 Press [q] to stop encoding
 [h264 @ 0x22440e0] no picture
 [h264 @ 0x22445c0] no picture
 Segmentation fault

 }}}


 '''gdb with ffmpeg_g:'''


 {{{
 Program received signal SIGSEGV, Segmentation fault.
 0x00007ffff5b03436 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
 (gdb) bt
 #0  0x00007ffff5b03436 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007ffff5bb8780 in __vsnprintf_chk () from /lib/x86_64-linux-
 gnu/libc.so.6
 #2  0x00007ffff62fe466 in av_log_default_callback () from
 /usr/local/lib/libavutil.so.51
 #3  0x00007ffff62fe8d6 in av_log () from /usr/local/lib/libavutil.so.51
 #4  0x00007ffff79b5ca1 in av_vsrc_buffer_add_frame2 () from
 /usr/local/lib/libavfilter.so.2
 #5  0x0000000000406075 in output_packet (ist=<value optimized out>,
 ist_index=0, ost_table=0x640420,
     nb_ostreams=1, pkt=<value optimized out>) at ffmpeg.c:1653
 #6  0x000000000040b22e in transcode (nb_output_files=1, nb_input_files=1,
 stream_maps=0x0,
     nb_stream_maps=-11728, input_files=0x619b20, output_files=0x619800) at
 ffmpeg.c:2710
 #7  0x000000000041057c in main (argc=<value optimized out>, argv=<value
 optimized out>) at ffmpeg.c:4514
 (gdb) disass $pc-32 $pc+32
 A syntax error in expression, near `$pc+32'.
 (gdb) info all-registers
 rax            0x0      0
 rbx            0x7fffffffc420   140737488340000
 rcx            0xffffffffffffffff       -1
 rdx            0x7fffffffcaf8   140737488341752
 rsi            0x7ffff79bd3e5   140737347572709
 rdi            0x43800000780    4638564681600
 rbp            0x7fffffffc410   0x7fffffffc410
 rsp            0x7fffffffbd90   0x7fffffffbd90
 r8             0x7fffffffc2c8   140737488339656
 r9             0x0      0
 r10            0x206d6f7266206465       2336646318805509221
 r11            0x7ffff5bb8650   140737316095568
 r12            0x49     73
 r13            0x7fffffffca00   140737488341504
 r14            0x7ffff79bd3a0   140737347572640
 r15            0xffffffffffffff80       -128
 rip            0x7ffff5b03436   0x7ffff5b03436 <vfprintf+7126>
 eflags         0x10246  [ PF ZF IF RF ]
 cs             0x33     51
 ss             0x2b     43
 ds             0x0      0
 es             0x0      0
 fs             0x0      0
 gs             0x0      0
 st0            -inf     (raw 0xffff0000000000000000)
 st1            -inf     (raw 0xffff0000000000000000)
 st2            -inf     (raw 0xffff0000000000000000)
 st3            -inf     (raw 0xffff0000000000000000)
 st4            -inf     (raw 0xffff0000000000000000)
 st5            -nan(0x606060606060606)  (raw 0xffff0606060606060606)
 st6            -nan(0x303030303030303)  (raw 0xffff0303030303030303)
 st7            -nan(0x101010101010101)  (raw 0xffff0101010101010101)
 fctrl          0x37f    895
 fstat          0x0      0
 ftag           0xffff   65535
 fiseg          0x0      0
 fioff          0x0      0
 foseg          0x0      0
 ---Type <return> to continue, or q <return> to quit---
 fooff          0x0      0
 fop            0x0      0
 xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x0, 0x0, 0x0, 0x0,
     0xff, 0x0 <repeats 11 times>}, v8_int16 = {0x0, 0x0, 0xff, 0x0, 0x0,
 0x0, 0x0, 0x0}, v4_int32 = {0x0,
     0xff, 0x0, 0x0}, v2_int64 = {0xff00000000, 0x0}, uint128 =
 0x0000000000000000000000ff00000000}
 xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {
     0x25 <repeats 16 times>}, v8_int16 = {0x2525, 0x2525, 0x2525, 0x2525,
 0x2525, 0x2525, 0x2525, 0x2525},
   v4_int32 = {0x25252525, 0x25252525, 0x25252525, 0x25252525}, v2_int64 =
 {0x2525252525252525,
     0x2525252525252525}, uint128 = 0x25252525252525252525252525252525}
 xmm2           {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}
 xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
 {0x8000000000000000, 0x0}, v16_int8 = {0x0,
     0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
 0x0}, v8_int16 = {0x0, 0x0, 0x0,
     0xff00, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0xff000000, 0x0, 0x0},
 v2_int64 = {0xff00000000000000,
     0x0}, uint128 = 0x0000000000000000ff00000000000000}
 xmm4           {v4_float = {0x0, 0x7, 0x0, 0x0}, v2_double = {0x15f90,
 0x8000000000000000}, v16_int8 = {0x0,
     0x0, 0x0, 0x0, 0x0, 0xf9, 0xf5, 0x40, 0x20, 0x62, 0x69, 0x63, 0x75,
 0x62, 0x69, 0x63}, v8_int16 = {0x0,
     0x0, 0xf900, 0x40f5, 0x6220, 0x6369, 0x6275, 0x6369}, v4_int32 = {0x0,
 0x40f5f900, 0x63696220,
     0x63696275}, v2_int64 = {0x40f5f90000000000, 0x6369627563696220},
   uint128 = 0x636962756369622040f5f90000000000}
 xmm5           {v4_float = {0x0, 0x1, 0x0, 0x0}, v2_double = {0x1, 0x0},
 v16_int8 = {0x6d, 0x7d, 0xbf, 0xbb,
     0x27, 0xaf, 0xf5, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v8_int16 = {0x7d6d, 0xbbbf, 0xaf27,
     0x3ff5, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0xbbbf7d6d, 0x3ff5af27, 0x0,
 0x0}, v2_int64 = {
     0x3ff5af27bbbf7d6d, 0x0}, uint128 =
 0x00000000000000003ff5af27bbbf7d6d}
 xmm6           {v4_float = {0x0, 0xfffffffd, 0x0, 0x0}, v2_double =
 {0xffffffffffffffd2, 0x0}, v16_int8 = {
     0x5b, 0xaa, 0xa2, 0x2a, 0x9e, 0x6, 0x47, 0xc0, 0x0, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0, 0x0}, v8_int16 = {
     0xaa5b, 0x2aa2, 0x69e, 0xc047, 0x0, 0x0, 0x0, 0x0}, v4_int32 =
 {0x2aa2aa5b, 0xc047069e, 0x0, 0x0},
   v2_int64 = {0xc047069e2aa2aa5b, 0x0}, uint128 =
 0x0000000000000000c047069e2aa2aa5b}
 xmm7           {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 =
 {0x3ff0000000000000, 0x0},
   uint128 = 0x00000000000000003ff0000000000000}
 xmm8           {v4_float = {0x0, 0xfffffffd, 0x0, 0x0}, v2_double =
 {0xffffffffffffffd2, 0x0}, v16_int8 = {
     0xe0, 0xe6, 0x35, 0x67, 0x9e, 0x6, 0x47, 0xc0, 0x0, 0x0, 0x0, 0x0,
 0x0, 0x0, 0x0, 0x0}, v8_int16 = {
     0xe6e0, 0x6735, 0x69e, 0xc047, 0x0, 0x0, 0x0, 0x0}, v4_int32 =
 {0x6735e6e0, 0xc047069e, 0x0, 0x0},
   v2_int64 = {0xc047069e6735e6e0, 0x0}, uint128 =
 0x0000000000000000c047069e6735e6e0}
 xmm9           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x0, 0x0, 0x0, 0x0,
 ---Type <return> to continue, or q <return> to quit---
     0x68, 0xc8, 0xbc, 0x3b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v8_int16 = {0x0, 0x0, 0xc868, 0x3bbc,
     0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x3bbcc868, 0x0, 0x0}, v2_int64
 = {0x3bbcc86800000000, 0x0},
   uint128 = 0x00000000000000003bbcc86800000000}
 xmm10          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x0, 0x0, 0x46, 0x84,
     0x24, 0x59, 0xd6, 0x3e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v8_int16 = {0x0, 0x8446, 0x5924,
     0x3ed6, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x84460000, 0x3ed65924, 0x0,
 0x0}, v2_int64 = {
     0x3ed6592484460000, 0x0}, uint128 =
 0x00000000000000003ed6592484460000}
 xmm11          {v4_float = {0x9689a800, 0x0, 0x0, 0x0}, v2_double = {0x0,
 0x0}, v16_int8 = {0x6a, 0xa2,
     0x65, 0x50, 0xf2, 0xea, 0x8f, 0xbd, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0,
 0x0, 0x0}, v8_int16 = {0xa26a,
     0x5065, 0xeaf2, 0xbd8f, 0x0, 0xff00, 0xff, 0x0}, v4_int32 =
 {0x5065a26a, 0xbd8feaf2, 0xff000000, 0xff},
   v2_int64 = {0xbd8feaf25065a26a, 0xffff000000}, uint128 =
 0x000000ffff000000bd8feaf25065a26a}
 xmm12          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x0, 0x0, 0x0, 0x0,
     0x0, 0x0, 0xc4, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v8_int16 = {0x0, 0x0, 0x0, 0x3cc4, 0x0,
     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x3cc40000, 0x0, 0x0}, v2_int64 =
 {0x3cc4000000000000, 0x0},
   uint128 = 0x00000000000000003cc4000000000000}
 xmm13          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x0, 0x0, 0x0, 0x0,
     0x0, 0x80, 0x59, 0xbc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v8_int16 = {0x0, 0x0, 0x8000, 0xbc59,
     0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0xbc598000, 0x0, 0x0}, v2_int64
 = {0xbc59800000000000, 0x0},
   uint128 = 0x0000000000000000bc59800000000000}
 xmm14          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x8e, 0x85, 0x83, 0xe8,
     0xf0, 0x24, 0x53, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v8_int16 = {0x858e, 0xe883, 0x24f0,
     0x3c53, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0xe883858e, 0x3c5324f0, 0x0,
 0x0}, v2_int64 = {
     0x3c5324f0e883858e, 0x0}, uint128 =
 0x00000000000000003c5324f0e883858e}
 xmm15          {v4_float = {0x0, 0x3, 0x0, 0x0}, v2_double = {0x2d, 0x0},
 v16_int8 = {0xc0, 0x9, 0xf2, 0x16,
     0xb5, 0xdf, 0x46, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
 v8_int16 = {0x9c0, 0x16f2, 0xdfb5,
     0x4046, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x16f209c0, 0x4046dfb5, 0x0,
 0x0}, v2_int64 = {
     0x4046dfb516f209c0, 0x0}, uint128 =
 0x00000000000000004046dfb516f209c0}
 mxcsr          0x1fa5   [ IE ZE PE IM DM ZM OM UM PM ]
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/197>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list