Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91541 - Sandbox fails with glibc error when tsocks is used
Summary: Sandbox fails with glibc error when tsocks is used
Status: VERIFIED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-05 02:10 UTC by Lasse Bigum
Modified: 2005-09-19 14:10 UTC (History)
1 user (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 Lasse Bigum 2005-05-05 02:10:23 UTC
I use tsocks, and it causes some few random problems for portage and other apps, but haven't been able to reproduce them consistently, this one I can however.

Reproducible: Always
Steps to Reproduce:
As root:
1. emerge tsocks
2. source tsocks on
3. emerge sandbox (or whatever, just make sure that you are using sandbox=1.2.5)
Actual Results:  
*** glibc detected *** malloc(): memory corruption: 0x0804f2e0 ***

Running /usr/bin/sandbox gives:
*** glibc detected *** free(): invalid next size (fast): 0x0804f2a8 ***


Expected Results:  
It should work :-)

The problem is only existant in sandbox=1.2.5, not in 1.2.4. Emerging as this:
FEATUES="-sandbox" emerge -av <something>
works as expected.

I'm running ~x86 and my tsocks version is: tsocks-1.8_beta5
Comment 1 lukenshiro 2005-05-05 09:25:47 UTC
Confirmed here, but with (I think after several tries) *every* emerging packages, not only tsocks

"*** glibc detected *** malloc(): memory corruption ...."
soon after md5 check or later, but before configure/compiling




emerge --info

Portage 2.0.51.21-r1 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5- r0, 2.6.11-gentoo-r7 i686)
=================================================================
System uname: 2.6.11-gentoo-r7 i686 AMD Athlon(TM) XP 2000+
Gentoo Base System version 1.6.11
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disable d]
ccache version 2.4 [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.5
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.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
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/kd e/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/default s/pref /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.eliteitminds.com ftp://mirror.nutsmaas.nl/gentoo/ http://ftp.lug.ro/gentoo/ http://mirror.pudas.net/gentoo http://pandemonium.tisc ali.de/pub/gentoo/"
LANG="it_IT@euro"
LINGUAS="it"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 16bit 3dnow 3dnowex 3dnowext 3ds X X509 Xaw3d a52 aac aalib aavm access ibility accounting acpi activefilter aim alsa arts artworkextra async athena auc tex audiofile avi bcmath beep beepmp berkdb bidi bitmap-fonts bonobo bzlib cairo  calendar caps ccache cdparanoia cdr cdrom chroot clamav clisp codecs crypt css ctype cups curl curlwrappers dbx dga dillo dio disablexmb divx4linux dnd doc dts  dv dvd dvdread eds emacs emacs-w3 emboss encode escreen esd ethereal examples e xif extensions f2c faac faad fam fame fdftk festival ffmpeg fftw firebird flac f lash flood font-server foomaticdb foreign-package fortran freetype ftp gb gcj gc l gd gdbm gif gimp gimpprint gkrellm glade glep glut gmp gnome gnomedb gnuplot g nustep gnutls gphoto2 gpm graphviz gs gsl gsnd gstreamer gtk gtk2 gtkhtml guile hal iconv icq ide image imagemagick imlib imlib2 ipv6 jabber java javacomm javad oc javascript jbig jikes jp2 jpeg jpeg2k junit justify kde kdeenablefinal kdexde ltas koffice-plugin latex lcms ldap leim lesstif libcaca libclamav libdsk libg++  libgda libwww lids live lua lzo lzw mad maildir mapeditor maps matroska mbrola mcal mdb memlimit messages mhash mikmod mime mimencode ming mixer mjpeg mmap mmx  mmx2 mmxext mng monkey motif mozilla mozp3p mozsvg mp3 mpeg mpeg4 mpi mplayer m sn mule music mysql mythtv nas ncurses neXt net network nls nowin nptl ntlm nvid ia oav objc ocaml odbc offensive ogg oggvorbis openal opengl oscar oss pam parse -clocks pcre pdf pdflib perl pic pie plotutils png portaudio posix postgres post gresql ppds prelude print pthreads python qemu-fast qt quicktime readline real r ecode rogue rplay rrdtool rtc ruby scanner sdl sharedmem silc silverxp slang sma rtcard smime sndfile snmp snortsam sounds sox speex spell sqlite sqlite3 sse ssl  stats stencil-buffer stroke svg svga sysvipc t1lib tcltk tcpd tetex tga theora threads thumbnail tidy tiff timidity toolbar tools transcode transparent-proxy t ruetype truetype-fonts type1 type1-fonts usb uudeview v4l v4l2 vcdimager vdeskto p videos vim vim-pager vim-with-x vorbis win32codecs wmf wsconvert wxwindows xan im xatrix xchattext xemacs xforms xine xml xml2 xmms xosd xpm xprint xrandr xscr eensaver xsl xv xvid yahoo yv12 zlib zvbi linguas_it userland_GNU kernel_linux e libc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 2 Lasse Bigum 2005-05-09 04:33:15 UTC
The new sandbox-1.2.5-r1 exhibits the same problem
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2005-05-10 00:17:36 UTC
I cannot figure out why exactly it misbehaves inside emerge (works just dandy when just running sandbox), so I worked around for now.  Should be fixed in sandbox-1.2.6.  Please reopen if it gives issues with downloading.
Comment 4 Lasse Bigum 2005-05-12 14:51:42 UTC
The bug was fixed with 1.2.6, but with 1.2.7 it's back, albeit, in a new disguise :-)

Doing a "emerge -avuD world" just "dies" like so:
>>> md5 files   ;-) files/digest-libgdiplus-1.0.5-r2
>>> md5 files   ;-) files/digest-libgdiplus-1.0.6
>>> md5 files   ;-) files/digest-libgdiplus-1.0.6-r1
>>> md5 files   ;-) files/digest-libgdiplus-1.1.4
>>> md5 files   ;-) files/libgdiplus-1.1.5-nogif.diff
>>> md5 files   ;-) files/libgdiplus-1.0.5-cairo-0.3.0-compat.diff
>>> md5 files   ;-) files/libgdiplus-1.1.4-included-cairo-fix.diff
>>> md5 files   ;-) files/digest-libgdiplus-1.0.5-r3
>>> md5 files   ;-) files/digest-libgdiplus-1.0.6-r2
>>> md5 files   ;-) files/digest-libgdiplus-1.1.4-r1
>>> md5 files   ;-) files/libgdiplus-1.0.6-giflib.diff
>>> md5 src_uri ;-) libgdiplus-1.1.7.tar.gz
nadir ~ # 

I can then do a:
FEATURES="-sandbox" emerge -avuD world

and everything is working fine again.
Just strange that it gives no errors this time around?
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2005-05-12 15:20:39 UTC
Weird, works just dandy here.  Anything special about your setup you can think of?  Is it just certain packages, or with all (even random you just try)?  Can you try to remerge sandbox and tsocks?

-------
nosferatu ~ # . tsocks on
nosferatu ~ # emerge -avuD world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild  N    ] media-libs/imlib-1.9.14-r3  0 kB
[ebuild     UD] www-client/links-2.1_pre17 [2.1_pre17-r1] +X -directfb +fbcon +gpm +javascript +jpeg +png +ssl -svga +tiff -unicode 0 kB
[ebuild  N    ] media-libs/libquicktime-0.9.4  -dv +gtk -ieee1394 +jpeg +mmx +oggvorbis +png 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] yes
>>> emerge (1 of 3) media-libs/imlib-1.9.14-r3 to /
>>> md5 src_uri ;-) imlib-1.9.14.tar.bz2
>>> Unpacking source...
>>> Unpacking imlib-1.9.14.tar.bz2 to /var/tmp/portage/imlib-1.9.14-r3/work
 * Applying imlib-1.9.14-bound.patch ...                                                                               [ ok ] * Applying imlib-1.9.14-sec2.patch ...                                                                                [ ok ] * Applying imlib-1.9.14-m4.patch ...                                                                                  [ ok ] * Patching ${S}/ltmain.sh ...
 *   Applying portage-1.4.1.patch ...
 *   Applying sed-1.4.0.patch ...
 * Applying uClibc/libtool patches ...
 *  Fixing ${S}/configure ...                                                                                          [ ok ]>>> Source unpacked.
 * econf: updating imlib-1.9.14/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating imlib-1.9.14/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu --sysconfdir=/etc/imlib
creating cache ./config.cache
checking for a BSD compatible install... /bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... Caught signal 2 in pid 15006

/usr/portage/media-libs/imlib/imlib-1.9.14-r3.ebuild: src_compile aborted; exiting.



Exiting on signal 2
nosferatu ~ # echo $LD_PRELOAD
/usr/lib/libtsocks.so
nosferatu ~ #
Comment 6 Lasse Bigum 2005-05-13 01:01:39 UTC
Things just got really strange!

Reemerged sandbox and tsocks, and now I get an all new error.

I have a local overlay with beagle amongst others, and now it fails on this ebuild:
nadir beagle # emerge -avuD world

These are the packages that I would merge, in order:

Calculating world dependencies /

Exiting on signal 2
nadir ~ # ebuild beagle-0.0.9.ebuild digest

aux_get(): (0) Error in gnome-extra/beagle-0.0.9 ebuild. (2816)
               Check for syntax error or corruption in the ebuild. (--debug)


aux_get(): (0) Error in gnome-extra/beagle-0.0.9 ebuild. (2816)
               Check for syntax error or corruption in the ebuild. (--debug)

doebuild(): aux_get() error reading gnome-extra/beagle-0.0.9; aborting.

Then I tried with repoman to see if it could tell me anything new:
nadir ~ # repoman 

Not in a CVS repository; enabling pretend mode.

Setting paths:
PORTDIR = "/usr/portage"
PORTDIR_OVERLAY = "/usr/local/portage"

RepoMan does a once-over of the neighborhood...

aux_get(): (0) Error in gnome-extra/beagle-0.0.9 ebuild. (2816)
               Check for syntax error or corruption in the ebuild. (--debug)


  changelog.missing              1
   gnome-extra/beagle/ChangeLog
  digest.missing                 1
   gnome-extra/beagle/files/digest-beagle-0.0.9
  ebuild.allmasked               1
   gnome-extra/beagle
  ebuild.syntax                  1
   gnome-extra/beagle/beagle-0.0.9.ebuild
  metadata.missing               1
   gnome-extra/beagle/metadata.xml

After some searching around, someone suggested that it was caused by sandbox, and I was like "what, makes no sense, but I'll give it a try", and sure enough, using FEATURES="-sandbox" had it working again.

My emerge -info:
Portage 2.0.51.21-r1 (default-linux/x86/2005.0, gcc-3.3.5, glibc-2.3.5-r0, 2.6.11-gentoo-r8 i686)
=================================================================
System uname: 2.6.11-gentoo-r8 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.11
ccache version 2.4 [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.7
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.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
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/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.du.se/pub/os/gentoo http://trumpetti.atm.tut.fi/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ds.thn.htu.se/linux/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apm avi bash-completion berkdb bitmap-fonts crypt cups curl dga eds emboss encode fam flac foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 hal howl imlib ipv6 java jpeg libg++ libwww mad mikmod mono motif mp3 mpeg mysql ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang spell sqlite ssl svga tcpd tetex tiff truetype truetype-fonts type1-fonts unicode usb vorbis xine xml xml2 xmms xprint xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2005-05-13 04:31:30 UTC
Can you try the same thing but with the --debug as suggested on something that aux_get() fails?
Comment 8 Brian Harring gentoo-dev 2005-05-13 04:32:34 UTC
PORTAGE_DEBUG="1" SANDBOX_DEBUG="1" SANDBOX_DEBUG_LOG="/tmp/debug.log" ebuild blar digest
, and attach the logs please (both what's output, and sandbox log)
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2005-05-13 08:38:05 UTC
Ok, I got the aux_get() errors as well.  For me its fixed with sandbox-1.2.8.  Plesae reopen if you still have issues.
Comment 10 Lasse Bigum 2005-05-16 00:42:52 UTC
1.2.8 fixes the problem for me. Thanks!
Comment 11 lukenshiro 2005-05-16 09:20:18 UTC
> 1.2.8 fixes the problem for me. Thanks!

I agree.
Comment 12 Lasse Bigum 2005-09-19 14:10:44 UTC
Seems like I should close this bug :-)