Created attachment 872336 [details] Backtrace This wasn't happening to me before, but now when FFmpeg tries to decode AAC (always with the FFmpeg command-line tool, most of the time with Audacity) it results in a crash. I've attached a full backtrace, strace and two emerge --infos (one is for my debugging make.conf, the other is for my standard make.conf) in this bug report. I assure this bug happens with both of my make.confs.
Created attachment 872337 [details] emerge --info (debug make.conf)
Created attachment 872338 [details] emerge --info (standard make.conf)
Created attachment 872339 [details] strace
Thanks. We've seen this come up a few times recently. My guess is the reason it's happening (more) now is gcc 13 being recently stabled. It seems to be related to a mismatch between CPU_FLAGS_X86 and CFLAGS -march. Someone gave us Valgrind output before and it looked fairly clearly like an alignment problem. For a workaround: please set CPU_FLAGS_X86 per app-portage/cpuid2cpuflags output.
From your emerge --info: > CPU_FLAGS_X86="mmx mmxext sse sse2" So that's the immediate cause.
(In reply to Sam James from comment #4) > Thanks. > > We've seen this come up a few times recently. > > My guess is the reason it's happening (more) now is gcc 13 being recently > stabled. > > It seems to be related to a mismatch between CPU_FLAGS_X86 and CFLAGS > -march. Someone gave us Valgrind output before and it looked fairly clearly > like an alignment problem. > > For a workaround: please set CPU_FLAGS_X86 per app-portage/cpuid2cpuflags > output. (In reply to Paul Zander from comment #5) > From your emerge --info: > > CPU_FLAGS_X86="mmx mmxext sse sse2" > So that's the immediate cause. Sorry for the late reply, I wasn't bothered to se CPU_FLAGS_X86 until now. But I've set it and the crash went away. This seems to prove that the crash is ebuild or GCC 13-related.
Can confirm a) the error and b) the workaround. With gcc 12, everything runs fine - just like that. With gcc 13 and just the usual CFLAGS="-march=native -O2 -pipe" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j2" CHOST="x86_64-pc-linux-gnu" I get Oct 29 11:16:08 home01 kernel: traps: minidlnad[11961] general protection fault ip:7f44fcc1e2ea sp:7f44fbf48e20 error:0 in libavcodec.so.60.3.100[7f44fcbb2000+73b000] and Oct 29 17:02:12 home01 kernel: traps: ffmpeg[25236] general protection fault ip:7f349ddb12ea sp:7fff1726b400 error:0 in libavcodec.so.60.3.100[7f349dd45000+73b000] With gcc 13 and additional CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" (the output of cpuid2cpuflags), everything runs fine with gcc 13, too. Here are the cpu_flags differences (equery u ffmpeg): U I - - cpu_flags_x86_3dnow : Use the 3DNow! instruction set - - cpu_flags_x86_3dnowext : Use the Enhanced 3DNow! instruction set + - cpu_flags_x86_aes : Enable support for Intel's AES instruction set (AES-NI) + - cpu_flags_x86_avx : Adds support for Advanced Vector Extensions instructions + - cpu_flags_x86_avx2 : Adds support for Advanced Vector Extensions 2 instructions + - cpu_flags_x86_fma3 : Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo) - - cpu_flags_x86_fma4 : Use the Fused Multiply Add 4 instruction set + + cpu_flags_x86_mmx : Use the MMX instruction set + + cpu_flags_x86_mmxext : Use the Extended MMX instruction set (a subset of SSE) ([mmxext] or [sse] in cpuinfo) + + cpu_flags_x86_sse : Use the SSE instruction set + + cpu_flags_x86_sse2 : Use the SSE2 instruction set + - cpu_flags_x86_sse3 : Use the SSE3 instruction set ([pni] in cpuinfo, NOT ssse3) + - cpu_flags_x86_sse4_1 : Enable SSE4.1 instruction support + - cpu_flags_x86_sse4_2 : Enable SSE4.2 instruction support + - cpu_flags_x86_ssse3 : Use the SSSE3 instruction set (NOT sse3/pni) - - cpu_flags_x86_xop : Enable the XOP instruction set (column "I" is the standard installation without CPU_FLAGS_X86) Thank you for the workaround, now I can delete gcc 12.
https://ffmpeg.org/pipermail/ffmpeg-devel/2023-December/317729.html
*** Bug 918964 has been marked as a duplicate of this bug. ***
Vlc continues to crash when opening AAC audio mp4. Pursuant to the information contained in this bug report I added CPU_FLAGS_X86 to make.conf: CFLAGS="-march=native -O2 -pipe" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j2" # WARNING: consult http://www.gentoo.org/doc/en/change-chost.xml before changing CHOST. CHOST="x86_64-pc-linux-gnu" deleted and emerged both ffmpeg and vlc: media-video/ffmpeg-6.1-r3::gentoo was built with the following: USE="X alsa bzip2 dav1d encode gnutls gpl iconv jack lcms libass lzma modplug mp3 network opengl opus oss postproc pulseaudio theora threads truetype v4l vaapi vdpau vorbis vpx webp x264 xvid zlib -amf -amr -amrenc (-appkit) -bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -cuda -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -glslang -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jpeg2k -jpegxl -kvazaar -ladspa -libaom -libaribb24 -libcaca -libdrm -libilbc -libplacebo -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -nvenc -openal -opencl -openh264 -openssl -pic -qsv -rav1e -rubberband -samba -sdl -shaderc -snappy -sndio -speex -srt -ssh -static-libs -svg -svt-av1 -test -twolame -verify-sig -vidstab -vmaf -vulkan -x265 -zeromq -zimg -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 -aes -avx -avx2 -fma3 -fma4 -sse3 -sse4_1 -sse4_2 -ssse3 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" FEATURES="ebuild-locks merge-sync protect-owned userpriv usersandbox strict news xattr candy unmerge-logs distlocks config-protect-if-modified network-sandbox unmerge-orphans sandbox unknown-features-warn ipc-sandbox assume-digests qa-unresolved-soname-deps binpkg-dostrip multilib-strict binpkg-docompress binpkg-multi-instance nodoc pid-sandbox buildpkg-live fixlafiles pkgdir-index-trusted preserve-libs sfperms parallel-fetch usersync binpkg-logs" desconosido / # sudo emerge --info vlc Portage 3.0.58 (python 3.10.13-final-0, default/linux/amd64/17.1/systemd/merged-usr, gcc-13, glibc-2.38-r2, 6.7.0-rc1 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.7.0-rc1-x86_64-with-glibc2.38 KiB Mem: 3901580 total, 682280 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Tue, 19 Dec 2023 15:00:01 +0000 Head commit of repository gentoo: 8817a6cb6beab2104b7d4c90b3bb2280391e8e90 Timestamp of repository 4nykey: Sun, 17 Dec 2023 11:32:15 +0000 Head commit of repository 4nykey: 66d470ff2d7685ed7296ada3621709c6b74386f0 Timestamp of repository zugaina: Fri, 16 Jun 2023 08:32:15 +0000 Head commit of repository zugaina: a31fcec20b159a13ccd069d4e13b92d18bc0ffec sh bash 5.2_p21-r1 ld GNU ld (Gentoo 2.41 p4) 2.41 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p21-r1::gentoo dev-lang/perl: 5.38.2-r1::gentoo dev-lang/python: 3.10.13::gentoo dev-lang/rust-bin: 1.74.1::gentoo dev-util/cmake: 3.28.1::gentoo dev-util/meson: 1.3.0-r2::gentoo sys-apps/baselayout: 2.14-r1::gentoo sys-apps/sandbox: 2.38::gentoo sys-apps/systemd: 255.1::gentoo sys-devel/autoconf: 2.13-r8::gentoo, 2.71-r7::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.41-r3::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/llvm: 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 5.15::gentoo (virtual/os-headers) sys-libs/glibc: 2.38-r2::gentoo sys-libs/libselinux: 3.5-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage masters: gentoo priority: -1000 volatile: True sync-rsync-extra-opts: sync-rsync-verify-metamanifest: no sync-rsync-verify-max-age: 3 sync-rsync-verify-jobs: 1 4nykey location: /var/db/repos/4nykey sync-type: git sync-uri: https://github.com/gentoo-mirror/4nykey.git masters: gentoo volatile: False overlay location: /usr/local/portage/overlay masters: gentoo priority: 0 volatile: True zugaina location: /var/db/repos/zugaina sync-type: git sync-uri: https://github.com/gentoo-mirror/zugaina.git masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64 ~amd64 ~x86" ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--getbinpkg=y" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo https://mirror.ufro.cl/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/data/cache/binpkgs" PORTAGE_BINHOST="http://packages.gentooexperimental.org/amd64-stable/" 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 --exclude=/.git" PORTAGE_TMPDIR="/usr/tmp/portage" SHELL="/bin/bash" USE="(-selinux) X a52 aac accessibility acl alsa alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mmap_emul alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol amd64 aom apparmor argon2 audit avif branding build bzip2 cdda cli crypt cryptsetup curl dbus dri dts dv dvb dvd dynamic elfutils example fbcon fbcondecor ffmpeg flac fortran gdbm gif gimp gnuefi gstreamer gtk gtk3 http iconv idn importd introspection ipv6 iwd jack jpeg kdbus kmod lame lcms libass libidn2 libnotify libtirpc libvisual livecd loop-aes lz4 lz5 lzma matroska mms mmx mng modplug modules mp3 mp4 mpeg mpeg2 mpeg4pt2 multilib nat ncurses networkmanager nls nptl nptlonly ogg opengl openmp opus oss pam pax_kernel pcre png policykit portaudio pulseaudio qrcode qt5 readline resolvconf seccomp socks5 sse sse2 ssl systemd sysv-utils taglib test-rust theora tiff truetype udev unicode usb usrmerge v4l vaapi vala vanilla vcd vdpau vlc vorbis vpx wavpack webp x264 xattr xkb xml xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2 3dnow 3dnowext mmxext" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev keyboard mouse synaptics virtualbox mutouch vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="fbdev intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= media-video/vlc-3.0.20-r2::gentoo was built with the following: USE="X a52 alsa aom dbus dts dvbpsi dvd encode ffmpeg flac gcrypt gstreamer gui jack jpeg libass libnotify libsamplerate matroska modplug mp3 mpeg ncurses ogg opus png pulseaudio ssl taglib theora truetype udev v4l vaapi vdpau vpx x264 xml -archive -aribsub -bidi -bluray -cddb -chromaprint -chromecast -dav1d -dc1394 -debug (-directx) -faad -fdk -fluidsynth -fontconfig -gme -ieee1394 -kate -keyring -libcaca -libtar -libtiger -linsys -lirc -live -lua -macosx-notifications -mad -mtp -musepack -nfs -omxil -optimisememory -projectm -rdp -run-as-root -samba -sdl-image -sftp -shout -sid -skins -soxr -speex -srt -svg -test -tremor -twolame -upnp -vnc -wayland -x265 -zeroconf -zvbi" ABI_X86="(64)" CPU_FLAGS_X86="mmx sse" LUA_SINGLE_TARGET="lua5-1" CFLAGS="-march=native -O2 -pipe -ggdb3 -fno-strict-aliasing" CXXFLAGS="-march=native -O2 -pipe -ggdb3 -fno-strict-aliasing" FEATURES="distlocks news nodoc assume-digests unknown-features-warn splitdebug binpkg-multi-instance protect-owned multilib-strict ebuild-locks config-protect-if-modified ipc-sandbox usersync unmerge-logs xattr sfperms usersandbox pid-sandbox binpkg-docompress unmerge-orphans network-sandbox preserve-libs merge-sync pkgdir-index-trusted compressdebug sandbox binpkg-logs strict parallel-fetch userpriv buildpkg-live candy fixlafiles qa-unresolved-soname-deps binpkg-dostrip" LDFLAGS="-Wl,-O1 -Wl,--as-needed -L/usr/lib64/sidplay/builders/" compiled with: sys-devel/gcc-13.2.1_p20230826::gentoo was built with the following: USE="(cxx) fortran (multilib) nls nptl openmp (pie) sanitize ssp -ada (-cet) (-custom-cflags) -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv -zstd" ABI_X86="(64)" CFLAGS="-pipe -O2" CXXFLAGS="-pipe -O2" FEATURES="distlocks buildpkg protect-owned userpriv buildpkg-live pid-sandbox binpkg-docompress sandbox unmerge-logs preserve-libs config-protect-if-modified qa-unresolved-soname-deps multilib-strict assume-digests ipc-sandbox xattr merge-sync binpkg-dostrip network-sandbox parallel-fetch unmerge-orphans ebuild-locks unknown-features-warn sfperms strict binpkg-logs fixlafiles usersync usersandbox userfetch" My original repot marked as duplicate: https://bugs.gentoo.org/918964
Your output still says ffmpeg was build without setting CPU_FLAGS_X86. The CPU_FLAGS_X86="-avx" in combination with C{,XX}FLAGS="-march=native" is the cause of the segfault you see. Please rebuild ffmpeg and ensure that the CPU_FLAGS_X86 you said you have set are applied.
I am concluding from the comment regading ffmpeg built with -avx that ffmpeg needs to be built with avx and/or avx2. As it appears in make.conf: CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" added to make.conf: FFMPEG_USE="avx avx2" and added to package.use: media-video/ffmpeg avx avx2 emerge ffmpeg from command line: CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" sudo emerge -a =media-video/ffmpeg-6.1-r3 However after rebuilding ffmpeg the following reference to -avx shows in the build info: media-video/ffmpeg-6.1-r3::gentoo was built with the following: USE="X alsa bzip2 dav1d encode gnutls gpl iconv jack lcms libass lzma modplug mp3 network opengl opus oss postproc pulseaudio theora threads truetype v4l vaapi vdpau vorbis vpx webp x264 xvid zlib -amf -amr -amrenc (-appkit) -bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -cuda -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -glslang -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jpeg2k -jpegxl -kvazaar -ladspa -libaom -libaribb24 -libcaca -libdrm -libilbc -libplacebo -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -nvenc -openal -opencl -openh264 -openssl -pic -qsv -rav1e -rubberband -samba -sdl -shaderc -snappy -sndio -speex -srt -ssh -static-libs -svg -svt-av1 -test -twolame -verify-sig -vidstab -vmaf -vulkan -x265 -zeromq -zimg -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 -aes -avx -avx2 -fma3 -fma4 -sse3 -sse4_1 -sse4_2 -ssse3 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" FEATURES="unmerge-logs binpkg-docompress userpriv qa-unresolved-soname-deps usersync parallel-fetch strict xattr protect-owned candy sfperms ebuild-locks fixlafiles config-protect-if-modified nodoc network-sandbox usersandbox sandbox binpkg-logs pid-sandbox unmerge-orphans assume-digests preserve-libs ipc-sandbox unknown-features-warn binpkg-multi-instance pkgdir-index-trusted distlocks multilib-strict news binpkg-dostrip merge-sync buildpkg-live" How to eliminate the -avx reference when compiling?
Follow https://wiki.gentoo.org/wiki/CPU_FLAGS_*#Invocation. Putting `CPU_FLAGS_X86=` in make.conf is the old method that still works but often leads to confusion. Otherwise join #gentoo on irc and get help there.
# cpuid2cpuflags CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3 # sudo echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags # cat /etc/portage/package.use/00cpu-flags */* CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3 # sudo emerge -a =media-video/ffmpeg-6.1-r3 # sudo emerge --info ffmpeg still showing -avx: media-video/ffmpeg-6.1-r3::gentoo was built with the following: USE=...CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 -aes -avx -avx2 -fma3 -fma4 -sse3 -sse4_1 -sse4_2 -ssse3 -xop"...
Without the output from `emerge -pv =media-video/ffmpeg-6.1-r3` and `emerge --info ffmpeg` this means nothing. Please attach that as files.
Created attachment 880232 [details] emerge -pv and emege --info for ffmpeg Requested info emerge -pv and emerge --info ffmpeg
CPU_FLAGS_X86 clearly isn't set one way or another. Please take this to the IRC channel or forums. Thanks.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e4da320675b49841b4e7f477a6efe3c0413f674 commit 4e4da320675b49841b4e7f477a6efe3c0413f674 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-02-29 05:42:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-29 05:44:22 +0000 media-video/ffmpeg: fix crash when CPU_FLAGS_x86 and CFLAGS disagree When CPU_FLAGS_X86 was set to the default for amd64 and CFLAGS was higher with e.g. -march=native including AVX, we could get crashes because we disable intrinsics which would otherwise adjust the alignment ffmpeg requests. Backport an upstream patch for more sensible behaviour. Note that the upstream patch doesn't apply to 4.4.x but I haven't tried to backport it manually. Someone is welcome to, but 4.4.x should really be on its way out by now. Bug: https://trac.ffmpeg.org/ticket/10549 Bug: https://bugs.gentoo.org/915384 Signed-off-by: Sam James <sam@gentoo.org> media-video/ffmpeg/ffmpeg-6.0.1-r3.ebuild | 607 ++++++++++++++++++++ media-video/ffmpeg/ffmpeg-6.1.1-r4.ebuild | 614 +++++++++++++++++++++ .../ffmpeg/files/ffmpeg-6.0.1-alignment.patch | 114 ++++ 3 files changed, 1335 insertions(+)
I'll leave this open for a little bit for visibility and in case anyone wants to do the 4.4.x backport.
Created attachment 906471 [details] emerge --info ffmpeg
I am getting very similar issue with ffmpeg 6.1.2 compiled with GCC-14.2.1 CPU_FLAGS_X86 are set correctly as I understand Failed command: ffmpeg -hide_banner -hwaccel auto -loglevel error -i demo.mp4 -pix_fmt rgb24 temp/demo/%04d.png Segmentation fault (core dumped) Output of cpuid2cpuflags: CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3 emerge --info ffmpeg: https://bugs.gentoo.org/attachment.cgi?id=906471 dmesg: [ 730.867908] av:h264:df1[32931]: segfault at 0 ip 00007f6def75883e sp 00007f6dc7ffd750 error 4 in libavcodec.so.60.31.102[68b83e,7f6def0db000+804000] likely on CPU 5 (core 5, socket 0) [ 730.867918] Code: 41 5d 41 5e c3 0f 1f 80 00 00 00 00 f3 0f 1e fa 55 48 89 e5 41 57 49 89 d7 41 56 41 55 4d 89 c5 41 54 49 89 f4 53 48 83 ec 28 <48> 8b 1a 48 89 7c 24 08 48 89 4c 24 18 48 83 3b 00 0f 84 33 04 00
Comment on attachment 906471 [details] emerge --info ffmpeg I am getting very similar issue with ffmpeg 6.1.2 compiled with GCC-14.2.1 CPU_FLAGS_X86 are set correctly as I understand Failed command: ffmpeg -hide_banner -hwaccel auto -loglevel error -i demo.mp4 -pix_fmt rgb24 temp/demo/%04d.png Segmentation fault (core dumped) Output of cpuid2cpuflags: CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3 emerge --info ffmpeg: https://bugs.gentoo.org/attachment.cgi?id=906471 dmesg: [ 730.867908] av:h264:df1[32931]: segfault at 0 ip 00007f6def75883e sp 00007f6dc7ffd750 error 4 in libavcodec.so.60.31.102[68b83e,7f6def0db000+804000] likely on CPU 5 (core 5, socket 0) [ 730.867918] Code: 41 5d 41 5e c3 0f 1f 80 00 00 00 00 f3 0f 1e fa 55 48 89 e5 41 57 49 89 d7 41 56 41 55 4d 89 c5 41 54 49 89 f4 53 48 83 ec 28 <48> 8b 1a 48 89 7c 24 08 48 89 4c 24 18 48 83 3b 00 0f 84 33 04 00
Can you file a separate bug please? I suspect it might be different.