Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486488 - app-portage/portage-utils-0.30: qcache -s segfaults
Summary: app-portage/portage-utils-0.30: qcache -s segfaults
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-29 14:59 UTC by Markos Chandras (RETIRED)
Modified: 2013-10-08 19:30 UTC (History)
0 users

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 Markos Chandras (RETIRED) gentoo-dev 2013-09-29 14:59:10 UTC
hwoarang@helix $ qcache -s
Segmentation fault

(gdb) q
hwoarang@helix $ gdb qcache
GNU gdb (Gentoo 7.6.1 p1) 7.6.1
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/q...Reading symbols from /usr/lib64/debug/usr/bin/q.debug...(no debugging symbols found)...done.
(no debugging symbols found)...done.
(gdb) run -s
Starting program: /usr/bin/qcache -s
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7abdc61 in __memcpy_sse2 () from /lib64/libc.so.6

Portage 2.2.6 (default/linux/amd64/13.0/developer, gcc-4.7.3, glibc-2.17, 3.11.1-gentoo-helix x86_64)
=================================================================
System uname: Linux-3.11.1-gentoo-helix-x86_64-AMD_FX-tm-6100_Six-Core_Processor-with-gentoo-2.2
KiB Mem:     7890036 total,   5631264 free
KiB Swap:    8190972 total,   7518752 free
Timestamp of tree: Unknown
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-r2, 3.2.5-r2, 3.3.2-r2
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.6.4, 4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo x-crossdev hwoarang qt
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
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/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/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="-O2 -march=native -pipe"
DISTDIR="/mnt/virtual/sources/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-elog splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/mnt/virtual/packages/helix/"
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="/var/tmp"
PORTDIR="/home/hwoarang/development/gentoo-cvs/gentoo-x86"
PORTDIR_OVERLAY="/home/hwoarang/src/toolchain/crossdev /home/hwoarang/development/overlays/hwoarang /home/hwoarang/development/overlays/qt"
USE="X a52 aac accessibility acl acpi alsa amd64 apm bash-completion bzip2 bzlib cairo cdda cdr chm cli consolekit cracklib crypt cscope ctype cups custom-optimization cxx dbus dga dri dts dvd dvdr emboss encode exif fat ffmpeg firefox flac gd gif gimp glib glitz gnutls gphoto2 gpm iconv id3tag imagemagick imlib ipv6 ipw4965 jpeg lcms libnotify libwww lm_sensors mad mime mmx mmxext mng modules mozilla mp3 mp4 mpeg mplayer mudflap multilib ncurses networkmanager nls nptl ntfs ogg opengl openmp pam pango pcre pdf php png policykit posix ppds python qt3support qt4 rar readline reiserfs session simplexml smp sockets spell sqlite sqlite3 srt sse sse2 sse3 ssl ssse3 startup-notification subtitles svg symlink sysfs syslog tcpd threads tiff truetype udev udisks unicode upower usb userlocales v4l v4l2 vorbis wxwidgets x264 xcb xft xine xml xmlreader xscreensaver xv xvid xvmc zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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="template" 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" 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 el" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby20" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="radeon" 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, PORTA
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2013-09-29 18:52:40 UTC
(In reply to SpanKY from comment #1)
> http://sources.gentoo.org/gentoo-projects/portage-utils/qcache.c?r1=1.
> 44&r2=1.45

Thank you. Any chance to release a new version or add the patch to the existing ebuild in order to have a working qcache again?
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2013-10-03 19:15:33 UTC
I applied your patch but it still fails 

hwoarang@helix ~ $ qcache -s
*** Error in `qcache': munmap_chunk(): invalid pointer: 0x00007fff873c08f0 ***
Segmentation fault
Comment 4 SpanKY gentoo-dev 2013-10-04 05:40:58 UTC
it's working fine for me.  make sure you're using the latest version and not some local hacked junk.
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2013-10-04 07:38:02 UTC
(In reply to SpanKY from comment #4)
> it's working fine for me.  make sure you're using the latest version and not
> some local hacked junk.

Oops sorry about that. I didn't realize 0.40 was released so I had just your patch applied to 0.30. Thanks it's working now
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2013-10-04 08:07:10 UTC
Sorry, 0.40 still crashes for me

...
cache: Failed to read keywords for sys-apps/busybox-9999.ebuild
cache: Failed to read keywords for sys-apps/dtc-9999.ebuild
cache: Failed to read keywords for sys-apps/file-9999.ebuild
cache: Failed to read keywords for sys-apps/flashrom-9999.ebuild
cache: Failed to read keywords for sys-apps/gentoo-systemd-integration-9999.ebuild
cache: Failed to read keywords for sys-apps/hwids-99999999.ebuild
cache: Failed to read keywords for sys-apps/iproute2-9999.ebuild
cache: Failed to read keywords for sys-apps/kexec-tools-9999.ebuild
cache: Failed to read keywords for sys-apps/kmod-9999.ebuild
cache: Failed to read keywords for sys-apps/kmscon-9999.ebuild
cache: /home/hwoarang/development/gentoo-cvs/gentoo-x86//sys-apps/ode2color-0.2: No such file or directory
Segmentation fault


I have no ode2color anywhere! I don't know where qcache is looking for it

helix ~ # grep -r [^a-z]ode2color$ /var/cache/edb/*
helix ~ # 

There is no such package in the cache, in my portage tree or anywhere else. But even so, it shouldn't die like this.
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2013-10-04 11:57:10 UTC
It seems to work on another box with a non-cvs portage tree. What I do in mine (cvs) is

egencache -j4 --update --repo gentoo
emerge --metadata

and then it breaks during qcache -s
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2013-10-08 19:30:51 UTC
It works after removing my cvs tree and checkout a new one. :/ I ve no idea what happened. Sorry for the noise.