Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1541 closed defect (needs_more_info)

flv hangs on ff_vp3_idct_add_neon on ARM Cortex-A8 with gstreamer

Reported by: kaijun Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: flv arm vp6
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

a flv file hangs on ff_vp3_idct_add_neon on beagleboard when tested on latest ffmpeg master branch

Attachments (2)

20051210-w50s.flv (653.4 KB ) - added by kaijun 12 years ago.
56.png (29.9 KB ) - added by kaijun 12 years ago.

Download all attachments as: .zip

Change History (23)

by kaijun, 12 years ago

Attachment: 20051210-w50s.flv added

comment:1 by Carl Eugen Hoyos, 12 years ago

Priority: normalimportant

Please add backtrace together with command line and console output.

by kaijun, 12 years ago

Attachment: 56.png added

comment:2 by kaijun, 12 years ago

I use my gstreamer-based application

root@beagleboard:~# gdbserver localhost:10000 gplayer -a 20051210-w50s.flv
Process gplayer created; pid = 662
Listening on port 10000
Remote debugging from host 192.168.2.7

20051210-w50s.flv

Input #1, flv, from '20051210-w50s.flv':

Duration: 00:00:16.92, start: 0.000000, bitrate: 316 kb/s

Stream #1:0: Video: vp6f, yuv420p, 360x288, 266 kb/s, 25 tbr, 1k tbn, 1k tbc
Stream #1:1: Audio: mp3, 22050 Hz, stereo, s16, 40 kb/s

skipped media type: 1

Setting pipeline to PLAYING...

backtrace is attached as a pic.

Last edited 12 years ago by kaijun (previous) (diff)

comment:3 by Carl Eugen Hoyos, 12 years ago

Is the problem also reproducible with ffmpeg?

comment:4 by kaijun, 12 years ago

I tried ffplay on linux PC. It works

ffplay ~/Videos/20051210-w50s.flv 
ffplay version 0.8.12, Copyright (c) 2003-2011 the FFmpeg developers
  built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[flv @ 0x7fc5140023e0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from '/home/tang/Videos/20051210-w50s.flv':
  Metadata:
    duration        : 17
    width           : 360
    height          : 288
    videodatarate   : 260
    framerate       : 25
    videocodecid    : 4
    audiodatarate   : 40
    audiodelay      : 0
    audiocodecid    : 2
    canSeekToEnd    : 1
    creationdate    : Fri Feb 03 11:52:46 2006

  Duration: 00:00:16.92, start: 0.000000, bitrate: 306 kb/s
    Stream #0.0: Video: vp6f, yuv420p, 360x288, 266 kb/s, 25 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: mp3, 22050 Hz, stereo, s16, 40 kb/s
Last edited 12 years ago by Carl Eugen Hoyos (previous) (diff)

comment:5 by Carl Eugen Hoyos, 12 years ago

Please test ffmpeg on your neon device.

comment:6 by kaijun, 12 years ago

ffmpeg -i 20051210-w50s.flv
ffmpeg version git-2012-07-16-9b2c0e5 Copyright (c) 2000-2012 the FFmpeg developers

built on Jul 18 2012 14:57:11 with gcc 4.5.3 20110311 (prerelease)
configuration: --enable-shared --enable-pthreads --disable-gpl --enable-postproc --enable-avfilter --enable-swscale --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
WARNING: library configuration mismatch
avutil configuration: --enable-shared --enable-pthreads --disable-gpl --disable-postproc --disable-avfilter --disable-swscale --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --enable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
avcodec configuration: --enable-shared --enable-pthreads --disable-gpl --disable-postproc --disable-avfilter --disable-swscale --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --enable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
avformat configuration: --enable-shared --enable-pthreads --disable-gpl --disable-postproc --disable-avfilter --disable-swscale --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --enable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
swresample configuration: --enable-shared --enable-pthreads --disable-gpl --enable-postproc --enable-avfilter --enable-swscale --enable-swresample --enable-neon --enable-pic --enable-debug=3 --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --cross-prefix=arm-angstrom-linux-gnueabi- --prefix=/usr --disable-x11grab --disable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --disable-libvpx --disable-optimizations --disable-stripping --arch=arm --target-os=linux --enable-cross-compile --extra-cflags=' -O0 -fno-omit-frame-pointer -ggdb3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu' --sysroot=/home/tang/Projects/OE/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi --enable-hardcoded-tables --cpu=cortex-a8
libavutil 51. 65.100 / 51. 65.100
libavcodec 54. 40.100 / 54. 40.100
libavformat 54. 16.104 / 54. 16.104
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 2.100 / 3. 2.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100

[flv @ 0x433d0] max_analyze_duration 5000000 reached at 25000000
Input #0, flv, from '20051210-w50s.flv':

Duration: 00:00:16.92, start: 0.000000, bitrate: 316 kb/s

Stream #0:0: Video: vp6f, yuv420p, 360x288, 266 kb/s, 0.04 fps, 0.04 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: mp3, 22050 Hz, stereo, s16, 40 kb/s

At least one output file must be specified

comment:7 by Carl Eugen Hoyos, 12 years ago

Does it also hang with ffmpeg?
One possibility to test is:
$ ffmpeg -i 20051210-w50s.flv -f null -

If you cannot reproduce the hang, please recompile with --enable-cross-compile --cross-prefix=arm-angstrom-linux-gnueabi --target-os=linux (or whatever is the necessary minimum to compile an optimized neon binary).

comment:8 by kaijun, 12 years ago

It doesn't hang with ffmpeg since ffmpeg may not decode frame. I found it hangs when the third packet of size of 1112 bytes enter the said function. When I step over the function, it hangs. Otherwise, if I step in and out, it doesn't.
Yes, the application is compiled with these options.

in reply to:  8 comment:9 by Carl Eugen Hoyos, 12 years ago

Replying to kaijun61:

It doesn't hang with ffmpeg since ffmpeg may not decode frame.

In which situation does ffmpeg not decode a frame?

I found it hangs when the third packet of size of 1112 bytes enter the said function. When I step over the function, it hangs. Otherwise, if I step in and out, it doesn't.

Is this with ffmpeg_g ?

Yes, the application is compiled with these options.

comment:10 by kaijun, 12 years ago

I use ffmpeg libavcodec, it hangs on the third video packet. You can try. no, I don't use ffmpeg_g. I work on console.

comment:11 by Michael Niedermayer, 12 years ago

your output contains "WARNING: library configuration mismatch". Please retest with libs that match in their versions
Also full gdb output is needed, including registers and disassembly, if you can still reproduce it after fixing the libraries.
And if you say it hangs, try to find out not only one spot where execution happens but try to find out in which loop its trapped.

comment:12 by kaijun, 12 years ago

I have pointed out where the problem is. Can you reproduce the issue?

comment:13 by Michael Niedermayer, 12 years ago

tested on a panda board, no crash. If you can still reproduce this with latest ffmpeg then we need much more information (full disassembly and register contents of where it crashes), valgrind output may or may not be usefull too. Even better would be if you could look at the code yourself and see if you spot why it hangs.
thanks

comment:14 by kaijun, 12 years ago

I tested again. It is same as before. It hangs at vp3_idct_start_neon in function ff_vp3_idct_add_neon when I debug it. In this ticket I have given details.

comment:15 by Carl Eugen Hoyos, 12 years ago

Please provide a backtrace. Without a backtrace, it is impossible to fix the problem afaict.

in reply to:  15 comment:16 by Michael Niedermayer, 12 years ago

Replying to cehoyos:

Please provide a backtrace. Without a backtrace, it is impossible to fix the problem afaict.

We need full disassembly and register contents of where it crashes. a backtrace is USELESS!
valgrind may be usefull

comment:17 by kaijun, 12 years ago

As I said before, if I step into each assembly instruction, it doesn't crash, but if I step over assembly function, it crashes.

comment:18 by Michael Niedermayer, 12 years ago

quoting http://ffmpeg.org/bugreports.html

When gdb encounters its problem, run the following commands and copy/paste the output into your bug report:

bt
disass $pc-32,$pc+32
info all-registers

you only provided the first, which is useless

comment:19 by Michael Niedermayer, 12 years ago

Summary: flv hangs on ff_vp3_idct_add_neon on ARM Cortex-A8flv hangs on ff_vp3_idct_add_neon on ARM Cortex-A8 with gstreamer

not reproduceable with ffmpeg on a beaglebord

Also theres far too much information missing about this bug

Whats needed? register dump & disassembly in addition to a matching backtrace.
And as this seems gstreamer specific the SAME gstreamer+ffmpeg testcase which crashes on ARM should be tested on x86

comment:20 by Carl Eugen Hoyos, 12 years ago

Keywords: vp3 added; cortext- A8 removed
Resolution: needs_more_info
Status: newclosed

Please reopen this ticket if you can add the missing information.

comment:21 by Carl Eugen Hoyos, 12 years ago

Keywords: vp6 added; vp3 removed
Note: See TracTickets for help on using tickets.