Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94020 - double free errors with scons inside of sandbox
Summary: double free errors with scons inside of sandbox
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: AMD64 Other
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
: 90735 92313 94355 95080 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-25 17:25 UTC by SpanKY
Modified: 2005-11-03 17:54 UTC (History)
7 users (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 SpanKY gentoo-dev 2005-05-25 17:25:35 UTC
while running scons under sandbox, a bunch of abort's are signaled by glibc

$ emerge sqlite # needed by xmms2
$ emerge scons
$ wget http://xmms2.xmms.org/snapshots/xmms2-bk-snapshot-050522.tar.gz
$ tar zxf xmms2-bk-snapshot-050522.tar.gz
$ cd xmms2-050522
$ LD_PRELOAD=/usr/lib/libsandbox.so scons
<snip>
scons: Reading SConscript files ...
=====================================
 Configuration printout
=====================================
Enabled plugins: m3u, html, alsa, wave, flac, diskwrite, curl_http, gnomevfs, pls, mad, smb, jack, oss, replaygain, eq, vorbisfile, file
scons: done reading SConscript files.
scons: Building targets ...
gcc -g -Wall -O0 -Isrc/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c -o src/clients/cli/xmms2_client.o src/clients/cli/xmms2_client.c
*** glibc detected *** double free or corruption (out): 0x000072f5b4a512d0 ***
scons: *** [src/clients/cli/xmms2_client.o] Error -6
scons: building terminated because of errors.
Comment 1 SpanKY gentoo-dev 2005-05-25 17:26:00 UTC
Portage 2.0.51.22-r1 (default-linux/amd64/2004.3, gcc-4.0.0, glibc-2.3.5-r0,
2.6.11.9-grsec x86_64)
=================================================================
System uname: 2.6.11.9-grsec x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.6.12
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1
sys-apps/sandbox:    1.2.8
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.5
sys-devel/binutils:  2.15, 2.15.92.0.2-r9, 2.16, 2.16.90.0.3
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /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 /var/qmail/alias /var/qmail/control
/var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache cvs distlocks multilib noauto noinfo sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j6"
PKGDIR="/mnt/space/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://gentoo/gentoo-portage"
USE="amd64 X a52 aac aalib acl acpi adns alsa audiofile avi berkdb bitmap-fonts
bzip2 cairo cddb cdparanoia cdr crypt cups curl dba directfb dts dvd dvdr
dvdread encode esd fam fbcon flac flash font-server gd gif glitz gphoto2 gpm gtk
gtk2 imagemagick imap imlib ipv6 jack joystick jp2 jpeg jpeg2k libcaca libwww
lzo lzw lzw-tiff mad maildir mikmod mime mng motif mp3 mpeg multilib mysql
ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl oss pcre perl pic png
python quicktime readline real samba sdl sndfile spell sqlite ssl svg tcltk tcpd
tetex threads tiff truetype truetype-fonts type1-fonts usb userlocales vorbis
wmf xanim xine xml xml2 xmms xpm xrandr xv xvid xvmc zlib video_cards_nvidia
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 2 Nathan Sullivan 2005-05-25 17:39:19 UTC
Note, the issues dont occur on x86, so far only found the problem on amd64.
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-05-26 08:11:29 UTC
Not to be a smartass, but does it happen with gcc-3.4 as well? 
Comment 4 SpanKY gentoo-dev 2005-05-26 10:31:31 UTC
i just happened to have gcc-4 active at that time, nothing was built with it
(python/sandbox)

but to directly answer your question, the same error happens if i set
`gcc-config` to gcc-3.4
Comment 5 Nathan Sullivan 2005-05-26 15:24:08 UTC
Jason, im running gcc3.4, and im getting the same issue (not using gcc4.0 at all
here).

Portage 2.0.51.22-r1 (default-linux/amd64/2005.0, gcc-3.4.3-20050110,
glibc-2.3.5-r0, 2.6.11-ck8 x86_64)
=================================================================
System uname: 2.6.11-ck8 x86_64 AMD Opteron(tm) Processor 148
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
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.5
sys-devel/binutils:  2.16
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=k8 -pipe"  
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages nostrip sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.isp.net.au/ftp/pub/gentoo
http://mirror.pacific.net.au/pub/Gentoo http://public.planetmirror.com/pub/ge   
ntoo http://mirror.gentoo.gr.jp ftp://gg3.net/pub/linux/gentoo
http://ftp-mirror.internap.com/pub/gentoo ftp://gentoo.agsn.ca/"
MAKEOPTS="-j2"                  
PKGDIR="/usr/portage/packages"  
PORTAGE_TMPDIR="/var/tmp"       
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://172.17.0.1/gentoo-portage"
USE="X acpi aim alsa amd64 apache2 berkdb bitmap-fonts cairo cdr crypt dba debug
dvd dvdr ethereal font-server fortran gd gdbm gif gp   
m gtk gtk2 icq imap innodb ipv6 jabber jp2 jpeg ldap lzw lzw-tiff mad mozilla
mozsvg mp3 ncurses nls nptl nptlonly opengl pam pcntl p   
erl png posix python readline ruby samba session sqlite ssl tcpd tiff truetype
truetype-fonts type1-fonts usb userlocales xine xinera   
ma xml2 xmms xpm xrandr xv yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 6 SpanKY gentoo-dev 2005-06-02 15:26:40 UTC
*** Bug 92313 has been marked as a duplicate of this bug. ***
Comment 7 SpanKY gentoo-dev 2005-06-02 15:28:47 UTC
everyone in Bug 92313 was on amd64
Comment 8 SpanKY gentoo-dev 2005-06-05 00:43:13 UTC
Bug 92313 has a fix:
http://bugs.gentoo.org/attachment.cgi?id=60476

as dang pointed out, execve() is trying to free tmp_str which isnt malloced,
it's created on the stack:
char tmp_str[4096];

az: i'll merge this in a day or two if you dont get around to it
Comment 9 Luca Barbato gentoo-dev 2005-06-05 05:53:56 UTC
*** Bug 95080 has been marked as a duplicate of this bug. ***
Comment 10 Nathan Sullivan 2005-06-05 07:01:36 UTC
I can confirm this change to sandbox allowed me to get past the issue stopping
the xmms2 ebuild with sandbox enabled. Now ive got another xmms2 compile issue
to deal with :) (unrelated)
Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2005-06-07 06:16:00 UTC
Ill add this later today, thanks.
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2005-06-08 06:40:20 UTC
Added to svn repo - will be in next release.
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-30 14:03:28 UTC
*** Bug 90735 has been marked as a duplicate of this bug. ***
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-03 17:54:53 UTC
*** Bug 94355 has been marked as a duplicate of this bug. ***