Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 469236

Summary: media-video/vlc-2.0.6 - /bin/sh: line 4: 19954 Segmentation fault ./vlc-cache-gen ../modules
Product: Gentoo Linux Reporter: Huang Hang <seakage2h>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ikelos
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: VLC 2.0.6 emerge failure build.log

Description Huang Hang 2013-05-09 23:59:00 UTC
./vlc-cache-gen ../modules got Segmentation fault in emerge emake stage if the following plugins (maybe more) enabled:

libnotify, svg, libass

Reproducible: Always

Steps to Reproduce:
1. Enable one of the these USE flags: libnotify, svg, libass
2. emerge vlc
Actual Results:  
emerge failed due to /vlc-cache-gen ../modules Segmentation fault

Expected Results:  
VLC can be successfully emerged and run

seakage2h@seakage2h-ivb /etc/portage $ emerge --info
Portage 2.1.11.63 (default/linux/amd64/13.0/desktop, gcc-4.8.0, glibc-2.17, 3.8.6-gentoo x86_64)
=================================================================
System uname: Linux-3.8.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770S_CPU_@_3.10GHz-with-gentoo-2.2
KiB Mem:    16196148 total,   3603956 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Thu, 09 May 2013 12:45:01 +0000
ld GNU ld (Linux/GNU Binutils) 2.23.52.0.2.20130423
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.4, 3.2.4
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.1
sys-devel/binutils:       2.23.52.0.2
sys-devel/gcc:            4.7.2-r1, 4.8.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo spring seden
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx-i -O2 -pipe -fomit-frame-pointer"
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/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /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=core-avx-i -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.sohu.com/gentoo/ http://gentoo.aditsu.net:8000/ http://mirrors.xmu.edu.cn/gentoo http://ftp.lecl.net/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/Spring /var/lib/layman/seden"
SYNC="rsync://rsync.cn.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 avx bash-completion berkdb bidi bittorrent branding bzip2 cairo cdda cgi chardet cjk cli cracklib crypt ctype cue cups cxx dbus device-mapper dga djvu dns dri dts dvd emacs emboss encode exif fam fastcgi fasttrack ffmpeg filter firefox flac flv fontconfig foomaticdb fortran gd gdbm geoip gif gnome gnutella gnutls gpm gstreamer gtk gtk3 h323 hpijs httpd iconv icu id3tag ipv6 java jpeg kdrive kpathsea lame latex lcms ldap libkms libnotify live lzma mad magic matroska mmx mng modules mp3 mp4 mpeg mudflap multilib multitarget mysql mysqli nautilus ncurses networkmanager new-hpcups nls nptl ocamlopt ogg opengl openmp pam pango pcre pdf perl png policykit ppds preview-latex python qt3support qt4 rar readline samba scim sdl server session sip snmp spell spl sse sse2 sse3 sse4 sse4a ssl ssse3 startup-notification stream svg systemd taglib tcpd theora tiff truetype udev udisks unicode upnp upower usb utf-8 utf8 vaapi vlm vorbis wav wavpack webdav webkit wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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 ubx" GRUB_PLATFORMS="coreboot efi-64 pc efi-32" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en zh zh_CN zh_HK zh_TW" NETBEANS_MODULES="enterprise apisupport harness ide java nb websvccommon php profiler mobility" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="arm armeb i386 x86_64" QEMU_USER_TARGETS="arm armeb i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel vesa" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Huang Hang 2013-05-10 00:07:41 UTC
backtrace in GDB (I've hacked ebuild file to add CFLAGS=-g and CXXFLAGS=-g to ease debugging)

#0  0x00007ffff761d506 in ?? () from /lib64/libc.so.6
#1  0x00007ffff0eff1d9 in g_str_equal () from /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff0efe8f0 in g_hash_table_lookup ()
   from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff0f1df70 in g_quark_from_static_string ()
   from /usr/lib64/libglib-2.0.so.0
#4  0x00007fffeebf61ec in ?? () from /usr/lib64/libgobject-2.0.so.0
#5  0x00007ffff7de9afa in ?? () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff7de9bcc in ?? () from /lib64/ld-linux-x86-64.so.2
#7  0x00007ffff7dedbc8 in ?? () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff7de9974 in ?? () from /lib64/ld-linux-x86-64.so.2
#9  0x00007ffff7ded43b in ?? () from /lib64/ld-linux-x86-64.so.2
#10 0x00007ffff6c9f03b in ?? () from /lib64/libdl.so.2
#11 0x00007ffff7de9974 in ?? () from /lib64/ld-linux-x86-64.so.2
#12 0x00007ffff6c9f5cd in ?? () from /lib64/libdl.so.2
#13 0x00007ffff6c9f0d1 in dlopen () from /lib64/libdl.so.2
#14 0x00007ffff79692aa in module_Load (p_this=0x604338, 
    psz_file=0x6d9ab0 "../modules/codec/.libs/liblibass_plugin.so", 
    p_handle=0x7fffffffd0e8, lazy=true) at posix/plugin.c:62
#15 0x00007ffff794afdc in module_InitDynamic (obj=0x604338, 
    path=0x6d9ab0 "../modules/codec/.libs/liblibass_plugin.so", fast=true)
    at modules/bank.c:536
#16 0x00007ffff794ae69 in AllocatePluginFile (bank=0x7fffffffd460, 
    abspath=0x6d9ab0 "../modules/codec/.libs/liblibass_plugin.so", 
    relpath=0x6cfd80 "codec/.libs/liblibass_plugin.so", st=0x7fffffffd180)
    at modules/bank.c:479
#17 0x00007ffff794ad4a in AllocatePluginDir (bank=0x7fffffffd460, maxdepth=2, 
    absdir=0x6b84a0 "../modules/codec/.libs", reldir=0x6c4a50 "codec/.libs")
    at modules/bank.c:440
#18 0x00007ffff794ad7d in AllocatePluginDir (bank=0x7fffffffd460, maxdepth=3, 
    absdir=0x6b6070 "../modules/codec", reldir=0x61a3f0 "codec")
    at modules/bank.c:444
#19 0x00007ffff794ad7d in AllocatePluginDir (bank=0x7fffffffd460, maxdepth=4, 
    absdir=0x6190d0 "../modules", reldir=0x0) at modules/bank.c:444
#20 0x00007ffff794aa9f in AllocatePluginPath (p_this=0x604338, 
    path=0x6190d0 "../modules", mode=CACHE_USE) at modules/bank.c:353
#21 0x00007ffff794a967 in AllocateAllPlugins (p_this=0x604338)
    at modules/bank.c:298
#22 0x00007ffff794a67f in module_LoadPlugins (obj=0x604338)
    at modules/bank.c:189
#23 0x00007ffff78c695d in libvlc_InternalInit (p_libvlc=0x604338, i_argc=3, 
    ppsz_argv=0x7fffffffd6c0) at libvlc.c:247
#24 0x00007ffff7bc4f64 in libvlc_new (argc=2, argv=0x7fffffffd780)
    at core.c:59
Comment 2 Huang Hang 2013-05-10 00:11:12 UTC
When I tried to remove the suspicious plugins causing the segmentation fault, 

e.g.

#14 psz_file=0x6d9ab0 "../modules/codec/.libs/liblibass_plugin.so",

Then ./vlc-cache-gen ../modules can run until exit normally.
Comment 3 Huang Hang 2013-05-10 00:19:47 UTC
I also rm /usr/lib64/vlc/plugins/codec/liblibass_plugin.so to make VLC free of runtime segmentation (also happened in module_Load(), same as vlc-cache-gen). Then I lost the subtitle display in VLC....

So I'm suspecting that some plugins are broken with recent version of VLC.

There's an old bug which might related to this issue.
https://bugs.gentoo.org/show_bug.cgi?id=405173
Unfortunately it didn't catch enough attentions and not get resolved yet.
Comment 4 Huang Hang 2013-05-10 00:25:17 UTC
Created attachment 347888 [details]
VLC 2.0.6 emerge failure build.log
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-11 15:41:41 UTC
Comment on attachment 347888 [details]
VLC 2.0.6 emerge failure build.log

Why put a single file in a tar archive?
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-11 15:42:29 UTC

*** This bug has been marked as a duplicate of bug 405173 ***
Comment 7 Huang Hang 2013-05-11 15:50:10 UTC
Because the original build.log is larger than 1000KB....

So I have to compress it. But I realized that you're suggesting using gzip instead of 'tar czf'. I think you need to uncompress anyway, so it won't cause more trouble with .tar.gz than .gz .

(In reply to comment #5)
> Comment on attachment 347888 [details]
> VLC 2.0.6 emerge failure build.log
> 
> Why put a single file in a tar archive?
Comment 8 Huang Hang 2013-05-11 15:59:40 UTC
Well.... 

Do we have enough resource to track this bug down nowadays? Maybe we will have other findings if this is not reproducible for everyone (e.g., some conflicts with other package which is not quite widely installed).

(In reply to comment #6)
> 
> *** This bug has been marked as a duplicate of bug 405173 ***