When I was emerging after my gcc3.4 update, monotone0.23-r1.ebuild started misbehaving. Reproducible: Always Steps to Reproduce: 1. (???) gcc-config i686-pc-linux-gnu-3.4.4 && source /etc/profile 2. ACCEPT_KEYWORDS="~x86" emerge --nodeps '=dev-util/monotone-0.23-r1' Actual Results: . . . config.status: creating mt-stdint.h : _MONOTONE_MT_STDINT_H i686-pc-linux-gnu-g++ -fno-stack-protector-all -fno-stack-protector -fno-strict-aliasing -fno-omit-frame-pointer -fno-strict-aliasing -Wall -o txt2c txt2c.cc true REAL_BLDDIR=$PWD/.; \ (cd . && $REAL_BLDDIR/monotone status) 2>/dev/null >package_full_revision.txt \ || (cd . && monotone status) 2>/dev/null >package_full_revision.txt \ || (cp ./package_full_revision_dist.txt 2>/dev/null package_full_revision.txt) \ || (echo "unknown" >package_full_revision.txt) *** glibc detected *** malloc(): memory corruption (fast): 0x0857cff0 *** chmod 0755 txt2c ./txt2c std_hooks.lua std_hooks >std_hooks.h.tmp cmp -s std_hooks.h.tmp std_hooks.h || mv -f std_hooks.h.tmp std_hooks.h rm -f std_hooks.h.tmp ./txt2c test_hooks.lua test_hooks >test_hooks.h.tmp cmp -s test_hooks.h.tmp test_hooks.h || mv -f test_hooks.h.tmp test_hooks.h rm -f test_hooks.h.tmp ./txt2c schema.sql schema >schema.h.tmp cmp -s schema.h.tmp schema.h || mv -f schema.h.tmp schema.h rm -f schema.h.tmp ./txt2c views.sql views >views.h.tmp cmp -s views.h.tmp views.h || mv -f views.h.tmp views.h rm -f views.h.tmp if [ -f MT/revision ]; then cp MT/revision package_revision.txt; fi if [ ! -f package_revision.txt ]; then echo "unknown" > package_revision.txt; fi ./txt2c --strip-trailing --no-static package_revision.txt package_revision >package_revision.c.tmp cmp -s package_revision.c.tmp package_revision.c || mv -f package_revision.c.tmp package_revision.c rm -f package_revision.c.tmp [][][][][][][]sandbox: Caught signal 2 in pid 21123 make: *** [package_full_revision.txt] Interrupt /usr/portage/dev-util/monotone/monotone-0.23-r1.ebuild: src_compile aborted; exiting. Exiting on signal 2 ({ devroot }) bloodwedding / # ---- At the "[][][][][]" marker (which is not really there in the compile output), the make just hangs. I have pressed ctrl-c at this point but it will stay there for at least 12 hours and probably forever. Expected Results: . . . config.status: creating mt-stdint.h : _MONOTONE_MT_STDINT_H i686-pc-linux-gnu-g++ -O0 -g -pipe -fno-stack-protector-all -fno-stack-protector -fno-strict-aliasing -fno-omit-frame-pointer -fno-strict-aliasing -Wall -o txt2c txt2c.cc true REAL_BLDDIR=$PWD/.; \ (cd . && $REAL_BLDDIR/monotone status) 2>/dev/null >package_full_revision.txt \ || (cd . && monotone status) 2>/dev/null >package_full_revision.txt \ || (cp ./package_full_revision_dist.txt 2>/dev/null package_full_revision.txt) \ || (echo "unknown" >package_full_revision.txt) if [ -f MT/revision ]; then cp MT/revision package_revision.txt; fi if [ ! -f package_revision.txt ]; then echo "unknown" > package_revision.txt; fi cp package_full_revision.txt package_full_revision_dist.txt (echo ''; \ echo ' Generated from data cached in the distribution;'; \ echo ' further changes may have been made.') >> package_full_revision_dist.txt chmod 0755 txt2c ./txt2c std_hooks.lua std_hooks >std_hooks.h.tmp ./txt2c test_hooks.lua test_hooks >test_hooks.h.tmp cmp -s test_hooks.h.tmp test_hooks.h || mv -f test_hooks.h.tmp test_hooks.h rm -f test_hooks.h.tmp ./txt2c schema.sql schema >schema.h.tmp cmp -s schema.h.tmp schema.h || mv -f schema.h.tmp schema.h rm -f schema.h.tmp ./txt2c views.sql views >views.h.tmp cmp -s views.h.tmp views.h || mv -f views.h.tmp views.h rm -f views.h.tmp ./txt2c --strip-trailing --no-static package_revision.txt package_revision >package_revision.c.tmp cmp -s package_revision.c.tmp package_revision.c || mv -f package_revision.c.tmp package_revision.c rm -f package_revision.c.tmp ./txt2c --no-static package_full_revision.txt package_full_revision >package_full_revision.c.tmp cmp -s std_hooks.h.tmp std_hooks.h || mv -f std_hooks.h.tmp std_hooks.h cmp -s package_full_revision.c.tmp package_full_revision.c || mv -f package_full_revision.c.tmp package_full_revision.c rm -f std_hooks.h.tmp rm -f package_full_revision.c.tmp make all-recursive make[1]: Entering directory `/var/tmp/portage/monotone-0.23-r1/work/monotone-0.23' . . . ---- above is what it's supposed to look like. The "expected results" above were generated using the following work-around: ({ devroot }) bloodwedding / # MALLOC_CHECK_=0 emerge --resume Why does that work? Well my rather cursory understanding is that the /glibc.*malloc/ error message above is an ASSERT-style crash from glibc's built-in valgrind-type thingys, which MALLOC_CHECK_=0 deactivates. The work-around is most likely masking a real bug like a double-free, free(NULL), etc., so adding "export MALLOC_CHECK_=0" to the ebuild blindly is not a suitable fix without first at least understanding the actual nature of the problem (something I have not done and don't intend to do). here is my emerge --info: ({ devroot }) bloodwedding / # emerge --info Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-gentoo-r2 i686) ================================================================= System uname: 2.6.14-gentoo-r2 i686 AMD Athlon(tm) XP 3200+ Gentoo Base System version 1.6.13 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.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O0 -g -pipe" CHOST="i686-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/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O0 -g -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/" LINGUAS="en" MAKEOPTS="-j2" 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 3dnow X a52 aac aalib acpi alsa apm arts audiofile avi berkdb bitmap-fonts bonobo bzip2 cdparanoia cdr crypt cups curl debug dlloader dts dv dvd dvdr dvdread eds emboss encode exif expat fam ffmpeg flac foomaticdb fortran gdbm gif glibc-compat20 gpm gstreamer gtk gtk2 gtkhtml hal idn imagemagick imap imlib ipv6 ithreads java jpeg kdeenablefinal kdexdeltas lcms libg++ libwww lm_sensors mad matroska mhash mikmod mime mmx mng motif mp3 mpeg mysql ncurses nls nptl offensive ogg oggvorbis opengl pam pcre pdflib perl perlsuid pic png python qt quicktime readline samba sasl sdl spell sse ssl svga theora threads tiff truetype truetype-fonts type1-fonts udev usb userlocales v4l vcd videos vorbis wifi win32codecs wmf xine xml xml2 xmms xv xvid yahoo zlib linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS but note that this also happens on my C{,XX}FLAGS="-mtune=athlon-xp -march=athlon-xp -O3 -pipe -fomit-frame-pointer -ftracer" installation. In other words, I am not going to solve this by adjusting CFLAGS, re-emerging world, running revdep, etc.; my system is quite sound. This didn't used to happen so it is some recent innovation, I am guessing gcc-3.4.4. BTW, the problem does not seem to exist in monotone-0.24.ebuild and therefore this is not a very important bug in the grand scheme of things! But nobody seemed to have mentioned it anywhere so I thought maybe it was worth the trouble of reporting it nevertheless.
similar problem with with monotone-0.25: config.status: creating mt-stdint.h : _MONOTONE_MT_STDINT_H i686-pc-linux-gnu-g++ -march=athlon-xp -pipe -O1 -fno-stack-protector-all -fno-stack-protector -fno-strict-aliasing -fno-omit-frame-pointer -fno-strict-aliasing -Wall -o txt2c txt2c.cc true REAL_BLDDIR=$PWD/.; \ (cd . && $REAL_BLDDIR/monotone status) 2>/dev/null >package_full_revision.txt \ || (cd . && monotone status) 2>/dev/null >package_full_revision.txt \ || (cp ./package_full_revision_dist.txt 2>/dev/null package_full_revision.txt) \ || (echo "unknown" >package_full_revision.txt) *** glibc detected *** free(): invalid pointer: 0x0868c2a0 *** chmod 0755 txt2c ./txt2c std_hooks.lua std_hooks >std_hooks.h.tmp cmp -s std_hooks.h.tmp std_hooks.h || mv -f std_hooks.h.tmp std_hooks.h rm -f std_hooks.h.tmp ./txt2c test_hooks.lua test_hooks >test_hooks.h.tmp cmp -s test_hooks.h.tmp test_hooks.h || mv -f test_hooks.h.tmp test_hooks.h rm -f test_hooks.h.tmp ./txt2c schema.sql schema >schema.h.tmp cmp -s schema.h.tmp schema.h || mv -f schema.h.tmp schema.h rm -f schema.h.tmp ./txt2c views.sql views >views.h.tmp cmp -s views.h.tmp views.h || mv -f views.h.tmp views.h rm -f views.h.tmp if [ -f MT/revision ]; then cp MT/revision package_revision.txt; fi if [ ! -f package_revision.txt ]; then echo "unknown" > package_revision.txt; fi ./txt2c --strip-trailing --no-static package_revision.txt package_revision >package_revision.c.tmp cmp -s package_revision.c.tmp package_revision.c || mv -f package_revision.c.tmp package_revision.c rm -f package_revision.c.tmp
I cannot now reproduce the problem I reported in comment #1 and I'm afraid I don't know what it was that fixed the problem.
hoping all is well now. Reopen if its not. BTW I plan on removing some older monotone ebuilds sometime in the next few months.