Summary: | media-video/ffmpeg-0.10.7 - segmentation fault while encoding h264 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Raymond Jennings <shentino> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | emerge --info |
Description
Raymond Jennings
2013-04-16 05:46:13 UTC
backtrace: #0 __memcmp_ssse3 () at ../sysdeps/i386/i686/multiarch/memcmp-ssse3.S:1841 #1 0xb630340e in x264_cqm_init () from /usr/lib/libx264.so.120 #2 0xb637802e in x264_encoder_open_120 () from /usr/lib/libx264.so.120 #3 0xb6b555e7 in X264_init () from /usr/lib/libavcodec.so.53 #4 0xb6e94692 in avcodec_open2 () from /usr/lib/libavcodec.so.53 #5 0x0804d613 in main () Created attachment 345656 [details]
emerge --info
Please post your `emerge -vpq media-video/ffmpeg' output in a comment. [ebuild R ] media-video/ffmpeg-0.10.7 USE="X aac alsa bzip2 encode hardcoded-tables mmx mp3 sdl ssse3 theora threads truetype v4l vorbis x264 xvid zlib -3dnow -3dnowext -aacplus (-altivec) -amr -avx -bindist -cdio (-celt) -cpudetection -debug -dirac -doc -faac -frei0r -gnutls -gsm -ieee1394 -jack -jpeg2k -libass -libv4l -mmxext -modplug (-neon) -network -openal -openssl -oss -pic -pulseaudio -rtmp -schroedinger -speex -static-libs {-test} -vaapi -vdpau (-vis) -vpx" FFTOOLS="aviocat cws2fws ffeval graph2dot ismindex pktdumper qt-faststart trasher" I confirm this bug. It was not reproducible then, but now, yes. gdb --args ffmpeg -i ../input.avi -vf scale='320:trunc((320/a)/2)*2' -x264opts qp=23 -preset fast -vcodec libx264 -aq 0.2 -ac 2.0 -ar 44100 -acodec libvorbis output.mkv GNU gdb (Gentoo 7.6.2 p1) 7.6.2 Copyright (C) 2013 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-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/ffmpeg...done. (gdb) run Starting program: /usr/bin/ffmpeg -i input.avi -vf scale=320:trunc\(\(320/a\)/2\)\*2 -x264opts qp=23 -preset fast -vcodec libx264 -aq 0.2 -ac 2.0 -ar 44100 -acodec libvorbis output.mkv warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /lib64/libthread_db-1.0.so line to your configuration file "/home/de/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/de/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. ffmpeg version 1.2.6 Copyright (c) 2000-2014 the FFmpeg developers built on Mar 14 2014 10:54:21 with gcc 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-mtune=generic -O0 -pipe -ggdb' --extra-cflags='-mtune=generic -O0 -pipe -ggdb' --extra-cxxflags='-mtune=generic -O0 -pipe -ggdb' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --enable-nonfree --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib --disable-runtime-cpudetect --enable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --enable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --enable-libaacplus --disable-libfaac --enable-libtheora --enable-libtwolame --enable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61 libavutil 52. 18.100 / 52. 18.100 libavcodec 54. 92.100 / 54. 92.100 libavformat 54. 63.104 / 54. 63.104 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 42.103 / 3. 42.103 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 [mpeg4 @ 0x64c810] Invalid and inefficient vfw-avi packed B frames detected Input #0, avi, from 'input.avi': Metadata: encoder : VirtualDubMod 1.5.10.1 (build 2439/release) Duration: 01:25:35.35, start: 0.000000, bitrate: 1142 kb/s Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 123 kb/s [libx264 @ 0x652850] using SAR=1/1 Program received signal SIGSEGV, Segmentation fault. 0x00007ffff51142f5 in ?? () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff51142f5 in ?? () from /lib64/libc.so.6 #1 0x00007ffff43a657c in x264_cqm_init () from /usr/lib64/libx264.so.120 #2 0x00007ffff4400f2a in x264_encoder_open_120 () from /usr/lib64/libx264.so.120 #3 0x00007ffff65c11e3 in X264_init (avctx=0x652850) at /tmp/portage/media-video/ffmpeg-1.2.6/work/ffmpeg-1.2.6/libavcodec/libx264.c:552 #4 0x00007ffff67cbf2f in avcodec_open2 (avctx=0x652850, codec=0x7ffff6ecea60 <ff_libx264_encoder>, options=0x65c748) at /tmp/portage/media-video/ffmpeg-1.2.6/work/ffmpeg-1.2.6/libavcodec/utils.c:1073 #5 0x0000000000420851 in transcode_init () at /tmp/portage/media-video/ffmpeg-1.2.6/work/ffmpeg-1.2.6/ffmpeg.c:2431 #6 0x0000000000423b37 in transcode () at /tmp/portage/media-video/ffmpeg-1.2.6/work/ffmpeg-1.2.6/ffmpeg.c:3143 #7 0x000000000042414e in main (argc=20, argv=0x7fffffffdb08) at /tmp/portage/media-video/ffmpeg-1.2.6/work/ffmpeg-1.2.6/ffmpeg.c:3349 How many decades will it take for this bug to get fixed? Can you rebuild glibc with debugging information and capture another backtrace? Given ssse3, a fix would be low-level; so, more debugging information is needed. (In reply to Tom Wijsman (TomWij) from comment #7) > Can you rebuild glibc with debugging information and capture another > backtrace? > > Given ssse3, a fix would be low-level; so, more debugging information is > needed. Yes! Wait... As a workaround, removing ssse3 flag works. gdb --args ffmpeg -i '/home/de/large/media/test media/FULL_HD_porsch.mp4' -threads 4 -vcodec libx264 -an /tmp/test.mkv GNU gdb (Gentoo 7.6.2 p1) 7.6.2 Copyright (C) 2013 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-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/ffmpeg...done. (gdb) run Starting program: /usr/bin/ffmpeg -i /home/de/large/media/test\ media/FULL_HD_porsch.mp4 -threads 4 -vcodec libx264 -an /tmp/test.mkv warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /lib64/libthread_db-1.0.so line to your configuration file "/home/de/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/de/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers built on May 24 2014 10:23:52 with gcc 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-mtune=generic -O0 -pipe -ggdb' --extra-cflags='-mtune=generic -O0 -pipe -ggdb' --extra-cxxflags='-mtune=generic -O0 -pipe -ggdb' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --enable-nonfree --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib --disable-runtime-cpudetect --enable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --enable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --enable-libaacplus --disable-libfaac --enable-libtheora --enable-libtwolame --enable-libwavpack --disable-libwebp --enable-libx264 --disable-libx265 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --enable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --enable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libopencore-amrwb --enable-libopencore-amrnb --disable-libfdk-aac --enable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --enable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --disable-librtmp --disable-libssh --enable-libschroedinger --enable-libspeex --enable-libvorbis --enable-libvpx --disable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --cpu=generic libavutil 52. 66.100 / 52. 66.100 libavcodec 55. 52.102 / 55. 52.102 libavformat 55. 33.100 / 55. 33.100 libavdevice 55. 10.100 / 55. 10.100 libavfilter 4. 2.100 / 4. 2.100 libavresample 1. 2. 0 / 1. 2. 0 libswscale 2. 5.102 / 2. 5.102 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/de/large/media/test media/FULL_HD_porsch.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 creation_time : 2010-03-02 00:05:16 Duration: 00:02:44.20, start: 0.000000, bitrate: 3397 kb/s Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 60 kb/s (default) Metadata: creation_time : 2010-03-02 00:05:16 handler_name : (C) 2007 Google Inc. v08.13.2007. Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3335 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default) Metadata: creation_time : 2010-03-02 00:05:16 handler_name : (C) 2007 Google Inc. v08.13.2007. File '/tmp/test.mkv' already exists. Overwrite ? [y/N] y [libx264 @ 0x67f700] using SAR=1/1 Program received signal SIGSEGV, Segmentation fault. __memcmp_sse4_1 () at ../sysdeps/x86_64/multiarch/memcmp-sse4.S:797 797 ../sysdeps/x86_64/multiarch/memcmp-sse4.S: No such file or directory. (gdb) bt #0 __memcmp_sse4_1 () at ../sysdeps/x86_64/multiarch/memcmp-sse4.S:797 #1 0x00007ffff3adb57c in x264_cqm_init () from /usr/lib64/libx264.so.120 #2 0x00007ffff3b35f2a in x264_encoder_open_120 () from /usr/lib64/libx264.so.120 #3 0x00007ffff62fcdae in X264_init (avctx=0x67f700) at /tmp/portage/media-video/ffmpeg-2.2.2/work/ffmpeg-2.2.2/libavcodec/libx264.c:616 #4 0x00007ffff6517125 in avcodec_open2 (avctx=0x67f700, codec=0x7ffff6d5f980 <ff_libx264_encoder>, options=0x662900) at /tmp/portage/media-video/ffmpeg-2.2.2/work/ffmpeg-2.2.2/libavcodec/utils.c:1440 #5 0x0000000000429fa3 in transcode_init () at /tmp/portage/media-video/ffmpeg-2.2.2/work/ffmpeg-2.2.2/ffmpeg.c:2659 #6 0x000000000042d672 in transcode () at /tmp/portage/media-video/ffmpeg-2.2.2/work/ffmpeg-2.2.2/ffmpeg.c:3414 #7 0x000000000042dcce in main (argc=9, argv=0x7fffffffdbf8) at /tmp/portage/media-video/ffmpeg-2.2.2/work/ffmpeg-2.2.2/ffmpeg.c:3623 Compiling without any ss*e4* flags results in the same BT. Compiling without ssse3 does not solve the problem. Removing custom-cflags for x264 library does not fix the issue. System used for debugging -- Portage 2.2.10_p25 (python 3.3.3-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.8.2, glibc-2.17, 3.14.4-gentoo x86_64) ================================================================= System uname: Linux-3.14.4-gentoo-x86_64-Intel-R-_Core-TM-_i3-2120_CPU_@_3.30GHz-with-gentoo-2.2 KiB Mem: 8117728 total, 1074868 free KiB Swap: 17825788 total, 17825760 free Timestamp of tree: Sat, 17 May 2014 09:00:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.5-r3, 3.3.3 dev-util/cmake: 2.8.12.2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.8.2 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.14 (virtual/os-headers) sys-libs/glibc: 2.17 Repositories: gentoo x11 sunrise wish mistafunk bitcoin my-tree ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-mtune=generic -O0 -pipe -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo" CXXFLAGS="-mtune=generic -O0 -pipe -ggdb" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=n --complete-graph --binpkg-respect-use=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/sunrise /var/lib/layman/wish /var/lib/layman/mistafunk /var/lib/layman/bitcoin /home/de/dev-tree" USE="X a52 a53 aac aalib acc acpi adns alsa amd64 amr atm audiofile branding bzip2 cdr cli consolekit cracklib css custom-cflags custom-optimization dbus dbx declarative dga dirac dri dts dv dvd dvdr emboss encode enscript exif ffmpeg firefox flac fortran gdu gif gles glut gmp gsm gstreamer gzip iconv imlib ipc jit jpeg jpeg2k kde ladspa lame lcms libedit libnotify libsamplerate libwww lzma lzo mad matroska matrox mikmod mime minimal mmap mmx mng modules mozilla mp3 mp4 mpeg mplayer mudflap multilib musepack networkmanager nntp nocd nptl nptlonly nsplugin offensive ogg openal opencl openexr opengl openmp optimization orc osc pam pango pdf phonon plasma png policykit posix ppds pppd qt3support qt4 quicktime raw readline schroedinger sharedmem shorten smp sndfile sockets socks5 speex spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3 startup-notification strong-optimization svg symlink sysfs taglib tcpd theora threads tiff toolame truetype twolame udev udisks unicode upower usb vaapi vcd vhosts vorbis wavpack win32codecs wmf wxwidgets x264 xcb xcomposite xine xinerama xml xorg xpm xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver pdfimport" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel i965 i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON please try with latest ffmpeg/x264 versions; from what I see, I fear it is some alignment problem, and this is probably fixed in recent versions |