Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2924 closed defect (worksforme)

ffv1: deadlock with 8 threads

Reported by: ami_stuff Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: ffv1 deadlock
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

http://www.datafilehost.com/d/b7222191

C:\>ffmpeg -threads 8 -i ffv1_dead.avi -f null -
ffmpeg version N-55934-g8349be8 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep  1 2013 02:24:38 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      52. 43.100 / 52. 43.100
  libavcodec     55. 29.100 / 55. 29.100
  libavformat    55. 15.100 / 55. 15.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.102 /  3. 82.102
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, avi, from 'ffv1_dead.avi':
  Metadata:
    encoder         : Lavf55.13.101
  Duration: 00:00:12.64, start: 0.000000, bitrate: 5802 kb/s
    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv410p, 320x240, 23.97 tbr, 2
3.97 tbn, 23.97 tbc
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.15.100
    Stream #0:0: Video: rawvideo (YUV9 / 0x39565559), yuv410p, 320x240, q=2-31,
200 kb/s, 90k tbn, 23.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (ffv1 -> rawvideo)
Press [q] to stop, [?] for help
[ffv1 @ 0x21281a0] Invalid change of global parameters
[ffv1 @ 0x2128820] Cannot decode non-keyframe without valid keyframe
[null @ 0x2137aa0] [ffv1 @ 0x2120280] Encoder did not produce proper pts, making
 some up.
Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x2120ae0] Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x2049360] Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x21410e0] Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x212e4a0] Error while decoding stream #0:0: Invalid data found when pro
cessing input
Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x2125240] Error while decoding stream #0:0: Invalid data found when pro
cessing input
Cannot decode non-keyframe without valid keyframe
Error while decoding stream #0:0: Invalid data found when processing input
    Last message repeated 5 times

Change History (3)

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavcodec
Keywords: fv1 deadlock added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master
(gdb) r -i ffv1_dead.avi -f null -
Starting program: ffmpeg_g -i ffv1_dead.avi -f null -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ffmpeg version N-55944-g7c18058 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep  1 2013 13:14:38 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 43.100 / 52. 43.100
  libavcodec     55. 30.100 / 55. 30.100
  libavformat    55. 15.100 / 55. 15.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.102 /  3. 82.102
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, avi, from 'ffv1_dead.avi':
  Metadata:
    encoder         : Lavf55.13.101
  Duration: 00:00:12.64, start: 0.000000, bitrate: 5802 kb/s
    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv410p, 320x240, 23.97 tbr, 23.97 tbn, 23.97 tbc
[New Thread 0x7ffff59eb700 (LWP 2425)]
[New Thread 0x7ffff51ea700 (LWP 2426)]
[New Thread 0x7ffff49e9700 (LWP 2427)]
[New Thread 0x7ffff41e8700 (LWP 2428)]
[New Thread 0x7ffff39e7700 (LWP 2430)]
[New Thread 0x7ffff31e6700 (LWP 2431)]
[New Thread 0x7ffff29e5700 (LWP 2432)]
[New Thread 0x7ffff21e4700 (LWP 2433)]
[New Thread 0x7ffff19e3700 (LWP 2434)]
[New Thread 0x7ffff11e2700 (LWP 2435)]
[New Thread 0x7ffff09e1700 (LWP 2436)]
[New Thread 0x7ffff01e0700 (LWP 2437)]
[New Thread 0x7fffef9df700 (LWP 2438)]
[New Thread 0x7fffef1de700 (LWP 2439)]
[New Thread 0x7fffee9dd700 (LWP 2440)]
[New Thread 0x7fffee1dc700 (LWP 2441)]
[New Thread 0x7fffed9db700 (LWP 2442)]
[New Thread 0x7fffed1da700 (LWP 2443)]
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.15.100
    Stream #0:0: Video: rawvideo (YUV9 / 0x39565559), yuv410p, 320x240, q=2-31, 200 kb/s, 90k tbn, 23.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (ffv1 -> rawvideo)
Press [q] to stop, [?] for help
[ffv1 @ 0x16e0ea0] Invalid change of global parameters
[ffv1 @ 0x16e1700] Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x16e1f60] Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x16e27c0] Cannot decode non-keyframe without valid keyframe
[null @ 0x16edb80] Encoder did not produce proper pts, making some up.
[ffv1 @ 0x16e3020] Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x16ebd20] Cannot decode non-keyframe without valid keyframe
[ffv1 @ 0x16ec440] Cannot decode non-keyframe without valid keyframe
Error while decoding stream #0:0: Invalid data found when processing input
[ffv1 @ 0x16dfdc0] Cannot decode non-keyframe without valid keyframe
Error while decoding stream #0:0: Invalid data found when processing input
    Last message repeated 6 times
Program received signal SIGINT, Interrupt.
0x00007ffff6ce88f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) bt
#0  0x00007ffff6ce88f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000092e9ab in ff_thread_decode_frame (avctx=avctx@entry=0x16e7360,
    picture=picture@entry=0x16e3a00, got_picture_ptr=got_picture_ptr@entry=0x7fffffffd7ec,
    avpkt=avpkt@entry=0x7fffffffd570) at libavcodec/pthread.c:631
#2  0x00000000009d6d43 in avcodec_decode_video2 (avctx=0x16e7360,
    picture=picture@entry=0x16e3a00, got_picture_ptr=got_picture_ptr@entry=0x7fffffffd7ec,
    avpkt=avpkt@entry=0x7fffffffda50) at libavcodec/utils.c:1980
#3  0x000000000046c3e0 in decode_video (ist=ist@entry=0x16ed7e0,
    pkt=pkt@entry=0x7fffffffda50, got_output=got_output@entry=0x7fffffffd7ec)
    at ffmpeg.c:1668
#4  0x000000000046f6df in output_packet (pkt=0x7fffffffd9f0, ist=0x16ed7e0) at ffmpeg.c:1866
#5  process_input (file_index=<optimized out>) at ffmpeg.c:3085
#6  0x000000000045d850 in transcode_step () at ffmpeg.c:3181
#7  transcode () at ffmpeg.c:3233
#8  main (argc=<optimized out>, argv=<optimized out>) at ffmpeg.c:3411

comment:2 by Michael Niedermayer, 11 years ago

Resolution: worksforme
Status: openclosed

It appears my fix for #2923 fixed this too, please reopen if you can still reproduce an issue.
I could reproduce it with therads 9 and an old checkout

comment:3 by Michael Niedermayer, 11 years ago

Keywords: ffv1 added; fv1 removed
Note: See TracTickets for help on using tickets.