Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948808 - media-video/vlc-9999 segfaults
Summary: media-video/vlc-9999 segfaults
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-25 09:28 UTC by N. Andrew Walsh
Modified: 2025-01-25 13:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description N. Andrew Walsh 2025-01-25 09:28:08 UTC
I enabled vlc-9999 in order to use Qt6, and it loads/plays videos just fine. However, when trying to play .mkv files with opus audio, I get an error about an "unsupported media format." So I compile vlc with USE="opus", and now vlc segfaults on startup with the following error reported to dmesg:
---------------
vlc-qt[8044]: segfault at 8 ip 00007f8033dde2a8 sp 00007f804095b340 error 4 in libQt6Quick.so.6.8.1[4e62a8,7f8033a0b000+423000] likely on CPU 5 (core 5, socket 0)
[11219.359122] Code: 00 00 48 83 c4 10 5b 5d 41 5c c3 90 66 0f 1f 44 00 00 f3 0f 1e fa 55 48 89 e5 41 55 41 54 53 48 83 e4 e0 49 89 fc 48 83 c4 80 <48> 8b 5f 08 64 4c 8b 2c 25 28 00 00 00 4c 89 6c 24 78 49 89 f5 c5
---------------
libQt6Quick belongs to qtdeclarative; remerging that package does not seem to help.
---------------

# emerge -pv vlc

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 3.48 s (backtrack: 0/20).

[ebuild   R   *] media-video/vlc-9999:0/12-9::gentoo  USE="X a52 alsa cddb dbus dvbpsi dvd encode ffmpeg flac fontconfig gcrypt gstreamer gui ieee1394 jack jpeg libsamplerate mad matroska mp3 mpeg ncurses ogg opus png speex ssl svg theora truetype udev vdpau x264 xml -aom -archive -aribsub -bidi -bluray -chromaprint -chromecast -dav1d -dc1394 -debug (-directx) -dts -faad -fdk -fluidsynth -gme -kate -keyring -kms -libass -libcaca -libnotify -libplacebo -libtar -libtiger -linsys -lirc -live -loudness -lua -macosx-notifications -modplug -mtp -musepack -nfs -omxil -optimisememory -projectm -pulseaudio -rdp -run-as-root -samba -sdl-image -sftp -shout -sid -skins -soxr -srt -taglib -test -tremor -twolame -upnp -v4l -vaapi -vnc -vpx -wayland -x265 -zeroconf -zvbi" CPU_FLAGS_X86="mmx sse" LUA_SINGLE_TARGET="lua5-1" 0 KiB

Reproducible: Always

Steps to Reproduce:
1. emerge vlc-9999 with USE="opus"
2. try to start vlc
3. segfault in libQt6Quick



# emerge --info
Portage 3.0.67 (python 3.13.1-final-0, default/linux/amd64/23.0/split-usr, gcc-14, glibc-2.40-r7, 6.13.0-gentoo x86_64)
=================================================================
System uname: Linux-6.13.0-gentoo-x86_64-AMD_Ryzen_7_3800X_8-Core_Processor-with-glibc2.40
KiB Mem:    32777188 total,  18885172 free
KiB Swap:    3145716 total,   3145716 free
Timestamp of repository gentoo: Sat, 25 Jan 2025 07:05:03 +0000
Head commit of repository gentoo: 158f67e948fa81dc13b6f07245c76739d6031438

Timestamp of repository guru: Thu, 23 Jan 2025 15:48:56 +0000
Head commit of repository guru: 614ad53328d8023035c6415f59e3476fad2d4b7a

Timestamp of repository pentoo: Sat, 25 Jan 2025 06:49:49 +0000
Head commit of repository pentoo: ad4264738579e2cc33d0f02eec9b818d9f399cc7

Timestamp of repository ppfeufer-gentoo-overlay: Wed, 22 Jan 2025 13:04:09 +0000
Head commit of repository ppfeufer-gentoo-overlay: eae0c670db5ee338ca3872408fa9097809c74437

Timestamp of repository steam-overlay: Thu, 16 Jan 2025 14:18:14 +0000
Head commit of repository steam-overlay: 0dadfe9f126e3846975628f2f6c123d71baf5c0c

Timestamp of repository stefantalpalaru: Sun, 21 Jul 2024 15:48:52 +0000
Head commit of repository stefantalpalaru: 264a6c277eb53610f500c185f9f5a581d3b2b32a

Timestamp of repository xarblu-overlay: Wed, 22 Jan 2025 19:33:27 +0000
Head commit of repository xarblu-overlay: ce6b420e8d5bd6a4903f7f46f57d98a162e9c512

Head commit of repository danrepo: 40d98056c548ff753569a387581115a395461cab

sh bash 5.2_p37
ld GNU ld (Gentoo 2.42 p6) 2.42.0
ccache version 4.5.1 [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.15.1-r1::gentoo, 1.16.5-r2::gentoo, 1.17-r1::gentoo
dev-build/cmake:           3.31.4-r1::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.6.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0-r1::gentoo
dev-lang/python:           3.9.16_p3::gentoo, 3.10.15_p1::gentoo, 3.11.11_p1::gentoo, 3.12.8_p1::gentoo, 3.13.1_p1::gentoo, 3.13.1_p1-r100::gentoo
dev-lang/rust-bin:         1.84.0::gentoo
dev-util/ccache:           4.5.1::gentoo
llvm-core/clang:           19.1.7::gentoo
llvm-core/llvm:            17.0.6-r3::gentoo, 18.1.8-r6::gentoo, 19.1.7::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.56::gentoo
sys-apps/sandbox:          2.43::gentoo
sys-devel/binutils:        2.41-r5::gentoo, 2.42-r2::gentoo, 2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo, 14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.12::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r7::gentoo
sys-libs/libselinux:       3.3::gentoo
Repositories:

gentoo
    location: /var/db/repos
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: False

ppfeufer-gentoo-overlay
    location: /var/db/repos/ppfeufer-gentoo-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/ppfeufer-gentoo-overlay.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

stefantalpalaru
    location: /var/db/repos/stefantalpalaru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/stefantalpalaru.git
    masters: gentoo guru
    volatile: False

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0
    volatile: True

xarblu-overlay
    location: /var/db/repos/xarblu-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/xarblu-overlay.git
    masters: gentoo
    volatile: False

danrepo
    location: /var/db/repos/danrepo
    sync-type: git
    sync-uri: https://github.com/ferion11/danrepo.git
    masters: gentoo
    priority: 9999
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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 /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
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 config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_US en_US.utf8 de de_DE de_DE.utf8"
MAKEOPTS="-j17"
PKGDIR="/var/cache/binpkgs"
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="/var/tmp"
SHELL="/bin/bash"
USE="X Xaw3d a52 aac acl acpi aim alsa amd64 apm audiofile bash-completion bzip2 cairo cddb cdinstall cdparanoia cdr cet cracklib crypt css cups curl curlwrappers cxx dbus directfb dri dvd dvdr encode fbcon ffmpeg fftw firefox flac ftp gdbm geoip gif gimp glut graphite gstreamer gtk hddtemp iconv icq ieee1394 imagemagick imap imlib ipv6 jack java javascript joystick jpeg lame latex ldap libglvnd libsamplerate libtirpc libwww lm_sensors mad matroska minimal mmx motif mp3 mpeg mplayer multilib ncurses nls nptl nsplugin offensive ogg openal opengl openmp openssl oscar pam pcre pdf perl png policykit posix python qt5 qt6 quicktime raw readline real rss scanner seccomp semantic-desktop sndfile sockets speex spell split-usr ssl suid svg symlink syslog tcl test-rust tetex theora threads tidy tiff tk translucency truetype udev unicode usb vaapi vdpau videos vkd3d vorbis vulkan win32codecs wmf wxwindows x264 xattr xcomposite xetex xine xml xpm xscreensaver xulrunner xv xvid xvmc zlib" ABI_X86="64 32" ADA_TARGET="gcc_13" ALSA_CARDS="hda-intel usb-audio" 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 mmxext sse sse2" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US de" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="AMDGPU X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12 python3_13" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeonsi" 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_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 N. Andrew Walsh 2025-01-25 09:45:12 UTC
UPDATE: it turns out it isn't USE="opus" that's the cause, because emerging vlc without opus support still results in a segfault.

I *had* vlc-9999 running just before, and haven't changed anything about the system, so now I'm really not sure what's causing it :(
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-25 09:56:33 UTC
You'll likely need to take it upstream for something in a live ebuild, but I'm happy to take a quick look in case it's something obvious. Backtrace please? (https://wiki.gentoo.org/wiki/Debugging)
Comment 3 N. Andrew Walsh 2025-01-25 10:34:14 UTC
I can do that, but do I want to install debugging systems for and then backtrace vlc, or qtdeclarative?
Comment 4 N. Andrew Walsh 2025-01-25 12:18:52 UTC
here's gdb running vlc, giving the message it returned when it segfaulted:

-------------------
Thread 8 "vlc-qt" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff28a86c0 (LWP 12933)]
0x00007ffff5f3a2a8 in QQuickItem::setSize(QSizeF const&) () from /usr/lib64/libQt6Quick.so.6
-------------------

It's possible that there was some commit between when I emerged vlc-9999 earlier this morning and the subsequent emerges that caused this. Should I also post this upstream?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-25 12:34:42 UTC
(In reply to N. Andrew Walsh from comment #4)
> here's gdb running vlc, giving the message it returned when it segfaulted:
> 

Debug symbols for whatever provides qtquick and also vlc at least, but you may need more.

> -------------------
> Thread 8 "vlc-qt" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7ffff28a86c0 (LWP 12933)]
> 0x00007ffff5f3a2a8 in QQuickItem::setSize(QSizeF const&) () from
> /usr/lib64/libQt6Quick.so.6
> -------------------
> 

Please write 'bt' and then hit enter in the gdb prompt to get a full backtrace.

> It's possible that there was some commit between when I emerged vlc-9999
> earlier this morning and the subsequent emerges that caused this. Should I
> also post this upstream?

Yes, but let's try get a full bt first, so we can make it easier for them
Comment 6 N. Andrew Walsh 2025-01-25 12:49:16 UTC
OK, here's the backtrace from vlc:
--------------------
Thread 8 "vlc-qt" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff28a86c0 (LWP 3387)]
0x00007ffff5f3a2a8 in QQuickItem::setSize(QSizeF const&) () from /usr/lib64/libQt6Quick.so.6
(gdb) bt
#0  0x00007ffff5f3a2a8 in QQuickItem::setSize(QSizeF const&) () from /usr/lib64/libQt6Quick.so.6
#1  0x00007ffff65003de in vlc::CompositorX11UISurface::updateSizes (this=this@entry=0x7fffec0f27a0)
    at maininterface/compositor_x11_uisurface.cpp:264
#2  0x00007ffff6500d85 in vlc::CompositorX11UISurface::eventFilter (this=0x7fffec0f27a0, event=0x7ffff28a76e0)
    at maininterface/compositor_x11_uisurface.cpp:325
#3  0x00007ffff3f80d64 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
   from /usr/lib64/libQt6Core.so.6
#4  0x00007ffff57a7b09 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt6Widgets.so.6
#5  0x00007ffff3f81038 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt6Core.so.6
#6  0x00007ffff4c3cb3e in QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) () from /usr/lib64/libQt6Gui.so.6
#7  0x00007ffff4c96b7f in ?? () from /usr/lib64/libQt6Gui.so.6
#8  0x00007ffff3f646dd in ?? () from /usr/lib64/libQt6Core.so.6
#9  0x00007ffff4c8ef03 in QWindow::screenChanged(QScreen*) () from /usr/lib64/libQt6Gui.so.6
#10 0x00007ffff4c8fc57 in QWindowPrivate::emitScreenChangedRecursion(QScreen*) () from /usr/lib64/libQt6Gui.so.6
#11 0x00007ffff64f8386 in restoreWindowPositionImpl (settings=<optimized out>, window=<optimized out>)
    at widgets/native/qvlcframe.cpp:116
#12 QVLCTools::restoreWindowPosition (settings=<optimized out>, window=0x7fffec0e7210, defSize=..., defPos=...)
    at widgets/native/qvlcframe.cpp:146
#13 0x00007ffff63bfe39 in InterfaceWindowHandler::InterfaceWindowHandler (this=0x7fffec4b19e0, _p_intf=<optimized out>, 
    mainCtx=0x7fffec001bd0, window=0x7fffec0e7210, parent=<optimized out>) at maininterface/interface_window_handler.cpp:61
#14 0x00007ffff63bb8e0 in std::make_unique<InterfaceWindowHandler, qt_intf_t*&, MainCtx*&, QWindow*&> ()
    at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:1076
#15 vlc::CompositorVideo::commonGUICreateImpl (this=this@entry=0x7fffec0e5b60, window=0x7fffec0e7210, flags=...)
    at maininterface/compositor.cpp:298
#16 0x00007ffff63bbafb in vlc::CompositorVideo::commonGUICreate (this=0x7fffec0e5b60, window=<optimized out>, 
    qmlSurface=0x7fffec0f27c8, flags=...) at maininterface/compositor.cpp:345
#17 0x00007ffff64fbd75 in vlc::CompositorX11::makeMainInterface (this=0x7fffec0e5b60, mainCtx=<optimized out>)
    at maininterface/compositor_x11.cpp:209
#18 0x00007ffff62b9078 in Thread (obj=0x5555555d31b0) at qt.cpp:1033
#19 0x00007ffff7d0af38 in ?? () from /lib64/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
#20 0x00007ffff7d7d4cc in ?? () from /lib64/libc.so.6
-----------------
I'm emerging qtdeclarative (the owner of qtquick) with debugsym, but I'll only post that output if it's any different from this.

Cheers
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-25 12:52:57 UTC
Thanks for your efforts.

Looks like https://code.videolan.org/videolan/vlc/-/issues/28880.

I've no idea if they need to check if size() is valid or what in https://code.videolan.org/videolan/vlc/-/blob/master/modules/gui/qt/maininterface/compositor_x11_uisurface.cpp#L253. 

Per https://doc.qt.io/qt-6/qquickitem.html#setSize, it might need an isValid check? (but that's complete speculation and knowing nothing about Qt APIs really).
Comment 8 N. Andrew Walsh 2025-01-25 12:55:14 UTC
UPDATE: and now that I have some backtrace, I can see that there's a report on this issue at the vlc bug tracker: https://code.videolan.org/videolan/vlc/-/issues/28880
Comment 9 N. Andrew Walsh 2025-01-25 12:58:03 UTC
So we both came to the same conclusion, that it's an upstream bug.

Alas! I'll have to wait on them to fix it, then. But thanks for helping me track down the issue. I guess I'll revert to the non-9999 version for now. Cheers.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-25 13:01:00 UTC
Ah, I see on the upstream bug "The GUI fails to start, NULL pointer m_rootItem in vlc::CompositorX11UISurface::updateSizes".

You could try add a hacky check in, even if it's not the right place for it.

If you want to accelerate the upstream fix, I'd suggest building manually (though not required, see https://wiki.gentoo.org/wiki/Bisecting_with_live_ebuilds) to give a bisect result for what commit broke it and CC the author on the upstream bug.
Comment 11 N. Andrew Walsh 2025-01-25 13:16:38 UTC
The upstream report already lists the bisect point (or at least gives the bug as occurring "somewhere between" two commits. As for adding in some hacky check, it's not so important to me that I can't just revert to vlc3 and wait. 

I'll keep an eye on that bugreport and report back here if/when they fix it upstream. Thanks again!