Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187946 - eix gives a sigsegv while i'm trying to search for anything
Summary: eix gives a sigsegv while i'm trying to search for anything
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-06 20:22 UTC by Maxim Chugunov
Modified: 2007-08-07 15:58 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 Maxim Chugunov 2007-08-06 20:22:31 UTC
eix fells out with sigsegv signal and actually says that I should do a bugtrace for it (what a nice thing...)

Reproducible: Always

Steps to Reproduce:
1. no real special steps. It started happening after I switched my home server to the hardened profile
Actual Results:  
program falls out with sigsegv signal

Expected Results:  
well, actually to find or don't find the program in the eix cash

Stack trace:
~ # gdb --args eix telnet
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/eix telnet

Program received signal SIGSEGV, Segmentation fault.
0xb7f23d8c in ?? ()
(gdb) bt
#0  0xb7f23d8c in ?? ()
#1  0xb7e5de6c in ?? ()
#2  0xb7e5f140 in ?? ()
#3  0x80254b68 in ?? ()
#4  0xbfbb22c8 in ?? ()
#5  0xb7d9f4e5 in ?? ()
#6  0xb7e5f140 in ?? ()
#7  0x80254b68 in ?? ()
#8  0xb7e5cbc0 in ?? ()
#9  0xb7e5cbc0 in ?? ()
#10 0x800b15b8 in ?? ()
#11 0xbfbb22f8 in ?? ()
#12 0xb7f4b3e1 in ?? ()
#13 0x80254b68 in ?? ()
#14 0xb7e5f148 in ?? ()
#15 0x80254a30 in ?? ()
#16 0xbfbb2528 in ?? ()
#17 0x00000000 in ?? ()
(gdb) q
-------------------------

~ # emerge --info
Portage 2.1.2.11 (hardened/x86/2.6, gcc-3.4.6, glibc-2.5-r4, 2.6.21-gentoo-r4-server-01 i686)
=================================================================
System uname: 2.6.21-gentoo-r4-server-01 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 05 Aug 2007 21:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://adelie.polymtl.ca/ http://gentoo.arcticnetwork.ca/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ "
LANG="ru_RU"
LC_ALL=""
LINGUAS="ru en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="apache2 berkdb cracklib crypt dbus gpm hal hardened ipv6 midi ncurses nls nptl nptlonly pam pcre perl pic readline samba slang ssl tcpd unicode urandom userlocales x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" USERLAND="GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2007-08-06 20:59:32 UTC
Can you try with the latest eix version please? 
Comment 2 Maxim Chugunov 2007-08-06 21:57:26 UTC
it is already the latest version:

~ # eix -V
eix 0.9.9 (gcc-3.4.6, i686-pc-linux-gnu)

~ # ls -al /etc/make.profile
lrwxrwxrwx 1 root root 38 Aug  1 14:29 /etc/make.profile -> /usr/portage/profiles/hardened/x86/2.6
Comment 3 Maxim Chugunov 2007-08-06 22:48:01 UTC
Also tried going up to 0.9.10 - same problem.
Downgrading to 0.8.8 brought an interesting thing - update-eix fails for the same reason: sigsegv and you can't do anything. It would not update the cash..
Comment 4 Maxim Chugunov 2007-08-06 23:01:01 UTC

*** This bug has been marked as a duplicate of bug 146300 ***
Comment 5 Maxim Chugunov 2007-08-06 23:11:39 UTC
though the solution of changing the CXXFLAGS (and CFLAGS) flags to -02 or -01 didn't work in my case.
The only way does work is when i'm compiling with vanila gcc...

server ~ # gcc-config -l
 [1] i686-pc-linux-gnu-3.4.6
 [2] i686-pc-linux-gnu-3.4.6-hardenednopie
 [3] i686-pc-linux-gnu-3.4.6-hardenednopiessp
 [4] i686-pc-linux-gnu-3.4.6-hardenednossp
 [5] i686-pc-linux-gnu-3.4.6-vanilla *
 [6] i686-pc-linux-gnu-4.1.2
Comment 6 Martin Väth 2007-08-07 12:25:17 UTC
I installed gcc-3.4.6-r2 with USE=hardened and kept to receive sigsev with CXXFLAGS=''. This time it was not std::unique() (for which I had built a workaround) but std::sort() which randomly caused the error (not very reproducable).

I will not try to debug this any further, because I am rather sure that it is the compiler/library which is broken and not eix: Probably the failing of std::unique() and std::sort() are only symptoms of some other compiler-internal bug.

However, when setting "CXXFLAGS=-O2" the error vanishes. Therefore, I almost cannot believe:

(In reply to comment #5)
> though the solution of changing the CXXFLAGS (and CFLAGS) flags to -02 or -01
> didn't work in my case.

Already the fact that CXXFLAGS="" although CFLAGS is set in your emerge --info is somewhat strange; are you sure that you wanted this? Maybe for some reason you have 'export CXXFLAGS=""' in your shell startup scripts which overrides the setting in /etc/make.conf?
Or maybe you use only shell variables and have forgotten to "export CXXFLAGS"?
Can you really see the text "-O2" in the compiler calls when you emerge eix?
Comment 7 Maxim Chugunov 2007-08-07 15:58:45 UTC
(In reply to comment #6)
found the problem... in make.conf parameters from CFLAGS weren't passing down to CXXFLAGS probably due to change from "(" to "{" brackets: CXXFLAGS="${CFLAGS}" is the correct version.
My bad there... After changing that it does compile fine with -02
Tried with -03 - works fine. I guess it was a problem of a simple brackets. My apologies for you having to spend time on this..