Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 112142 - eix 0.3.0-r1 abort -- std::bad_alloc
Summary: eix 0.3.0-r1 abort -- std::bad_alloc
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High normal
Assignee: Benedikt Böhm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-10 22:51 UTC by Andy Dalton
Modified: 2005-11-26 09:43 UTC (History)
1 user (show)

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


Attachments
My /etc/make.conf (make.conf,17.86 KB, text/plain)
2005-11-11 09:00 UTC, Andy Dalton
Details
fix logical error with APPEND_VALUES in varsreader (eix-0.5.0_varsreader-only-append-once.patch,3.21 KB, patch)
2005-11-20 07:04 UTC, Emil Beinroth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Dalton 2005-11-10 22:51:25 UTC
After an initial install of 'eix,' I tried running `update-eix' with the
following results:

gdb $(which update-eix)
(gdb) run
Starting program: /usr/bin/update-eix
Reading Portage settings ..
terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d34d1d in raise () from /lib/libc.so.6
#2  0xb7d36333 in abort () from /lib/libc.so.6
#3  0xb7eef603 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#4  0xb7eed43d in __cxxabiv1::__terminate ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#5  0xb7eed472 in std::terminate ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#6  0xb7eed5c5 in __cxa_throw ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#7  0xb7eed7de in operator new ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#8  0xb7ecd316 in std::string::_Rep::_S_create ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#9  0xb7ecd3a2 in std::string::_Rep::_M_clone ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#10 0xb7ecd909 in std::string::reserve ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#11 0xb7ece2e5 in std::string::append ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#12 0x080637be in VarsReader::VALUE_DOUBLE_QUOTE (this=0xbfe47200)
    at varsreader.cc:207
#13 0x080642f8 in VarsReader::runFsm (this=0xbfe47200) at varsreader.cc:340
#14 0x0804fd43 in VarsReader::read (this=0xbfe47200,
    filename=0x80760b3 "/etc/make.conf") at varsreader.h:242
#15 0x080662b6 in PortageSettings (this=0xbfe47340) at portagesettings.cc:92
#16 0x0804d485 in run_update_eix (argc=1, argv=0xbfe47524) at update-eix.cc:199
#17 0x0804e2d7 in main (argc=1, argv=0xbfe47524) at update-eix.cc:317

# emerge --info
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r3,
2.6.13-gentoo-r5 i686)
=================================================================
System uname: 2.6.13-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.13
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -fforce-addr -fomit-frame-pointer -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/bash_completion.d /etc/default /etc/dev.d /etc/env.d
/etc/gconf /etc/init.d /etc/modules.d /etc/pam.d /etc/pango /etc/profile.d
/etc/ssl /etc/ssmtp /etc/terminfo /etc/udev /etc/vim /etc/wget /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -fforce-addr -fomit-frame-pointer -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo
http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://londo/gentoo-portage"
USE="x86 X a52 aac acl acpi alsa apm arts audiofile avi bash-completion berkdb
bitmap-fonts bzip2 bzlib calendar cdparanoia cdr crypt cscope cups curl dbus dio
directfb divx4linux dvd dvdr dvdread eds emboss encode encodeethereal esd exif
expat fam fbcon fdftk ffmpeg flac foomaticdb fortran gd gdbm gif glut gnome
gnutls gphoto2 gpm gstreamer gtk gtk2 hal idn imagemagick imlib innodb java jpeg
junit kde kdeenablefinal lcms libg++ libwww lirc mad mbox mikmod mime mmap mmx
mng mono motif mp3 mpeg mysql ncurses nls nptl nsplugin offensive ogg oggvorbis
opengl oss pam pcntl pcre pdflib perl png posix python qt quicktime readline
recode sdl slang sockets spell sse ssl svg svga symlink sysfs sysvipc tcpd tetex
threads tiff truetype truetype-fonts type1-fonts udev usb vorbis win32codecs wmf
xine xml2 xosd xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Emil Beinroth 2005-11-11 00:43:21 UTC
Hi, could you please post your /etc/make.conf?
Comment 2 Andy Dalton 2005-11-11 09:00:42 UTC
Created attachment 72669 [details]
My /etc/make.conf
Comment 3 Andy Dalton 2005-11-18 09:13:13 UTC
As a note, I just updated to eix 0.3.0-r2 and see the same behavior.
Comment 4 Benedikt Böhm (RETIRED) gentoo-dev 2005-11-18 09:53:57 UTC
does the same happen with 0.5.0_pre2? 
Comment 5 Andy Dalton 2005-11-18 10:18:44 UTC
Benedikt,

I just gave 0.5.0_pre2 a shot and I get the same behavior:

# update-eix --version
eix 0.5.0_pre2 (gcc-3.4.4, i686-pc-linux-gnu)

# update-eix
Reading Portage settings ..
terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc
Aborted
Comment 6 Benedikt Böhm (RETIRED) gentoo-dev 2005-11-18 10:51:20 UTC
guess appro had make.conf in mind to be the villain here.. could you try with a 
make.conf containing only these entries (with values for your box of course): 
 
CHOST="i686-pc-linux-gnu" 
CFLAGS="-march=athlon-xp -O2 -pipe" 
CXXFLAGS="${CFLAGS}" 
 
Comment 7 Andy Dalton 2005-11-18 14:25:50 UTC
Benedikt,

Okay, I did as you suggested and it did not fail.  Is it supposed to find 0
packages though?

Andy

# cat /etc/make.conf
CHOST="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CXXFLAGS="${CFLAGS}"

# update-eix --version
eix 0.5.0_pre2 (gcc-3.4.4, i686-pc-linux-gnu)

# update-eix
Reading Portage settings ..
Building database (/var/cache/eix) from scratch ..
[0] /usr/portage/ (cache: cdb)
     Reading 100%
Applying masks ..
Database contains 0 packages in 144 categories.
Comment 8 Andy Dalton 2005-11-18 14:32:39 UTC
Err, nevermind about that problem with 0 packages -- I had
PORTDIR_CACHE_METHOD="cdb" in /etc/eixrc.  After removing that, I got what looks
to be correct behavior.

# update-eix
Reading Portage settings ..
Building database (/var/cache/eix) from scratch ..
[0] /usr/portage/ (cache: flat)
     Reading 100%
Applying masks ..
Database contains 10289 packages in 144 categories.

Comment 9 Benedikt Böhm (RETIRED) gentoo-dev 2005-11-18 14:57:29 UTC
ok, so there is some error while parsing your make.conf, i'm not that familar 
with the eix source, but you could help by commenting lines step-by-step and 
see which line causes the error, so we slowly get somewhere ;) 
Comment 10 Emil Beinroth 2005-11-20 07:04:58 UTC
Created attachment 73240 [details, diff]
fix logical error with APPEND_VALUES in varsreader

For every key=value pair, the parser appended the new value to the old value..
that adds up to a *lot* of memory :) And is totally wrong.

This patch should fix the bug: If APPEND_VALUES is used as a parser-flag,
varsreader parses the file into a separate map and merges the key/values
afterwards.
Comment 11 Benedikt Böhm (RETIRED) gentoo-dev 2005-11-26 09:43:30 UTC
0.5.0_rc1 in cvs