Temat: trunk - ffmpeg segfault
Postanowiłem sprawdzić co słychać w trunku - jest nowy ffmpeg i forked-daapd... Poinstalowałem na WDR3600 i wygląda na to, że ffmpeg nie bardzo gotowy - sypie "segmentation fault".
Dalej postanowiłem eksperymentować przez qemu i malta - to samo. Nie chce mi się wierzyć żeby wypuścili ffmpeg który nie działa na ar71xx/MIPS. Przecież to chyba najbardziej popularna platforma openwrt. Bardziej prawdopodobne, że coś pominąłem... ![]()
root@OpenWrt:/# gdb --args /usr/bin/ffmpeg -i music.mp3 test.mp3
GNU gdb (GDB) 7.8
Copyright (C) 2014 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 "mipsel-openwrt-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/ffmpeg...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/ffmpeg -i music.mp3 test.mp3
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
ffmpeg version 2.3.4 Copyright (c) 2000-2014 the FFmpeg developers
built on Oct 27 2014 10:27:16 with gcc 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43076)
configuration: --enable-cross-compile --cross-prefix=mipsel-openwrt-linux-uclibc- --arch=mipsel --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-small --enable-pthreads --enable-zlib --disable-runtime-cpudetect --disable-doc --disable-debug --enable-gpl --enable-version3 --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-mmx --disable-mmxext --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-xop --disable-fma3 --disable-fma4 --disable-avx2 --disable-vfp --disable-neon --disable-inline-asm --disable-yasm --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-outdevs --disable-mips32r2
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
warning: GDB can't find the start of the function at 0x77534752.
GDB is unable to find the start of the function at 0x77534752
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x77534752 for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
Program received signal SIGSEGV, Segmentation fault.
0x77534752 in ?? ()
(gdb) info shared
From To Syms Read Shared Object Library
Yes (*) /lib/ld-uClibc.so.0
No /usr/bin/ffmpeg
No /usr/lib/libavdevice.so.55
No /usr/lib/libavfilter.so.4
No /usr/lib/libavformat.so.55
No /usr/lib/libavcodec.so.55
No /usr/lib/libpostproc.so.52
No /usr/lib/libswresample.so.0
No /usr/lib/libswscale.so.2
No /usr/lib/libavutil.so.52
No /lib/libm.so.0
No /lib/libgcc_s.so.1
No /lib/libpthread.so.0
No /lib/libc.so.0
No /usr/lib/libasound.so.2
No /usr/lib/libbz2.so.1.0
No /usr/lib/libz.so.1
No /lib/libdl.so.0
No /lib/librt.so.0
(*): Shared library is missing debugging information.
(gdb) root@OpenWrt:/# cat valgrind.log
==2784== Memcheck, a memory error detector
==2784== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==2784== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==2784== Command: ffmpeg -i /music.mp3 out.mp3
==2784== Parent PID: 1499
==2784==
--2784--
--2784-- Valgrind options:
--2784-- -v
--2784-- --tool=memcheck
--2784-- --leak-check=full
--2784-- --log-file=valgrind.log
--2784-- Contents of /proc/version:
--2784-- Linux version 3.10.58 (buildbot@debian-amd64) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43076) ) #2 SMP Mon Oct 27 20:05:18 UTC 2014
--2784-- Arch and hwcaps: MIPS32, LittleEndian, MIPS-baseline
--2784-- Page sizes: currently 4096, max supported 4096
--2784-- Valgrind library directory: /usr/lib/valgrind
--2784-- Scheduler: using generic scheduler lock implementation.
--2784-- Reading suppressions file: /usr/lib/valgrind/default.supp
==2784== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-2784-by-???-on-???
==2784== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-2784-by-???-on-???
==2784== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-2784-by-???-on-???
==2784==
==2784== TO CONTROL THIS PROCESS USING vgdb (which you probably
==2784== don't want to do, unless you know exactly what you're doing,
==2784== or are doing some strange experiment):
==2784== /usr/lib/valgrind/../../bin/vgdb --pid=2784 ...command...
==2784==
==2784== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==2784== /path/to/gdb ffmpeg
==2784== and then give GDB the following command
==2784== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=2784
==2784== --pid is optional if only one valgrind process is running
==2784==
vex mips->IR: unhandled instruction bytes: 0xF0 0x4 0x6A 0x72
==2784== valgrind: Unrecognised instruction at address 0x404b51.
==2784== at 0x404B51: ??? (in /usr/bin/ffmpeg)
==2784== by 0x56F2EB4: ??? (in /lib/libuClibc-0.9.33.2.so)
==2784== Your program just tried to execute an instruction that Valgrind
==2786== i.e. it's Valgrind's fault. If you think this is the case or
==2786== you are not sure, please let us know and we'll try to fix it.
==2786== Either way, Valgrind will now raise a SIGILL signal which will
==2786== probably kill your program.
==2786==
==2786== Process terminating with default action of signal 4 (SIGILL)
==2786== Illegal opcode at address 0x404B51
==2786== at 0x404B51: ??? (in /usr/bin/ffmpeg)
==2786== by 0x56F2EB4: ??? (in /lib/libuClibc-0.9.33.2.so)
==2786==
==2786== HEAP SUMMARY:
==2786== in use at exit: 0 bytes in 0 blocks
==2786== in use at exit: 0 bytes in 0 blocks
==2786== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==2786==
==2786== All heap blocks were freed -- no leaks are possible
==2786==
==2786== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
--2786--
--2786-- used_suppression: 1 ld(Addr4) /usr/lib/valgrind/default.supp:14
==2786==
==2786== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)