Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230119 - Compiling media-gfx/k3d-0.6.7.0-r1 with SSP-enabled gcc-3.4.6 results in immediate memory saturation, failure
Summary: Compiling media-gfx/k3d-0.6.7.0-r1 with SSP-enabled gcc-3.4.6 results in imme...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 135265
  Show dependency tree
 
Reported: 2008-06-30 00:19 UTC by Gordon Malm (RETIRED)
Modified: 2009-02-13 19:50 UTC (History)
3 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 Gordon Malm (RETIRED) gentoo-dev 2008-06-30 00:19:24 UTC
Similar failure/issue as in bug #217112.  Within seconds: memory is saturated, machine becomes mostly unresponsive, OOM killer starts making its best guesses.  Using -hardenednossp gcc specs works around the problem.

Portage 2.1.4.4 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.25-hardened-r1-rc2-2008062601 i686)
=================================================================
System uname: 2.6.25-hardened-r1-rc2-2008062601 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Timestamp of tree: Sun, 29 Jun 2008 22:15:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /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 /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://mirror.datapipe.net/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.netnitco.net/ http://gentoo.mirrors.pair.com/ http://open-systems.ufl.edu/mirrors/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--progress --exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/trauma /usr/local/portage"
SYNC="rsync://*yoink*(private)/gentoo-portage"
USE="3dnow X Xaw3d a52 aac aalib acl acpi adns alsa apache2 apm audiofile bash-completion bcmath berkdb bidi blas bluetooth bzip2 cairo calendar canna caps cdb cdinstall cdparanoia cdr clamav cracklib crypt cscope ctype cups curl curlwrappers dba dbm dbus dbx dedicated dga dio directfb doc dri dts dv dvb dvd dvdr dvdread encode evo exif expat fam fastcgi fbcon ffmpeg fftw firefox flac flash flatfile foomaticdb fortran freetds freewnn ftp gb gcj gd gdbm geoip ggi gif ginac glut gmp gnome gnutls gphoto2 gpm gps graphviz gstreamer gtk gtk2 gtkhtml guile hal hardened iconv idn ieee1394 imagemagick imap imlib inifile ipv6 jack java javascript jbig jikes joystick jpeg jpeg2k junit kde ladspa lame lapack lash lcms ldap lesstif libcaca libg++ libgda libsamplerate libwww lirc lm_sensors logrotate lua mad maildir mailwrapper matroska mbox mcal mcve memlimit mhash midi mikmod mime mmap mmx mng mnogosearch mono motif mp3 mpeg mpi mplayer msession musepack nas ncurses neXt netboot netcdf nis nls nptl nptlonly nsplugin ocaml offensive ofx ogg openal opengl osc pam pcntl pcre pda pdf perl php pic plotutils png portaudio posix ppds python qdbm qt3 qt4 quicktime radius readline recode ruby samba sasl scanner sdl seamonkey session sharedext sharedmem shorten simplexml slang slp smartcard smp sndfile snmp soap sockets socks5 sox speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification svg svga sysvipc szip tcl tcltk tcpd tetex theora threads tidy tiff timidity tk tokenizer truetype unicode urandom usb v4l vcd vhosts videos vorbis wavpack wddx wifi win32codecs wmf wxwindows x264 x86 xcomposite xface xine xinerama xinetd xml xmlrpc xorg xosd xpm xprint xsl xv xvid yaz zeo zlib" ALSA_CARDS="au8820 ca0106 emu10k1" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US en_GB" USERLAND="GNU" VIDEO_CARDS="apm dummy fbdev mga nv nvidia r128 trident v4l vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

Output with hardened gcc-3.4.6 and MAKEOPTS="-j1":
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"k3d\" -DVERSION=\"0.6.7.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSIZEOF_VOIDP=4 -DK3D_PLATFORM_POSIX=1 -DK3D_HAVE_X86=1 -DHAVE_VA_COPY=1 -DVA_COPY=va_copy -DHAPY_HAVE_NUMERIC_LIMITS=1 -DHAPY_HAVE_STD_ITERATOR_TYPE=1 -DK3D_HAVE_EXPAT=1 -DHAVE_LIBBOOST_REGEX=1 -DHAVE_LIBBOOST_DATE_TIME=1 -DK3D_HAVE_SVG_ICONS=1 -I. -I.. -I.. -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -DK3D_HAVE_SIGC_2_0 -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -Wno-ctor-dtor-privacy -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -MT application_detail.lo -MD -MP -MF .deps/application_detail.Tpo -c application_detail.cpp  -fPIC -DPIC -o .libs/application_detail.o
mv -f .deps/application_detail.Tpo .deps/application_detail.Plo
/bin/sh ../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"k3d\" -DVERSION=\"0.6.7.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSIZEOF_VOIDP=4 -DK3D_PLATFORM_POSIX=1 -DK3D_HAVE_X86=1 -DHAVE_VA_COPY=1 -DVA_COPY=va_copy -DHAPY_HAVE_NUMERIC_LIMITS=1 -DHAPY_HAVE_STD_ITERATOR_TYPE=1 -DK3D_HAVE_EXPAT=1 -DHAVE_LIBBOOST_REGEX=1 -DHAVE_LIBBOOST_DATE_TIME=1 -DK3D_HAVE_SVG_ICONS=1 -I.  -I.. -I..  -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include   -DK3D_HAVE_SIGC_2_0  -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -Wall -Wno-ctor-dtor-privacy -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -MT aspect_ratios.lo -MD -MP -MF .deps/aspect_ratios.Tpo -c -o aspect_ratios.lo aspect_ratios.cpp
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"k3d\" -DVERSION=\"0.6.7.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSIZEOF_VOIDP=4 -DK3D_PLATFORM_POSIX=1 -DK3D_HAVE_X86=1 -DHAVE_VA_COPY=1 -DVA_COPY=va_copy -DHAPY_HAVE_NUMERIC_LIMITS=1 -DHAPY_HAVE_STD_ITERATOR_TYPE=1 -DK3D_HAVE_EXPAT=1 -DHAVE_LIBBOOST_REGEX=1 -DHAVE_LIBBOOST_DATE_TIME=1 -DK3D_HAVE_SVG_ICONS=1 -I. -I.. -I.. -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -DK3D_HAVE_SIGC_2_0 -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -Wno-ctor-dtor-privacy -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -MT aspect_ratios.lo -MD -MP -MF .deps/aspect_ratios.Tpo -c aspect_ratios.cpp  -fPIC -DPIC -o .libs/aspect_ratios.o
aspect_ratios.cpp: In function `const k3d::aspect_ratios_t& k3d::aspect_ratios()':
aspect_ratios.cpp:41: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [aspect_ratios.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-gfx/k3d-0.6.7.0-r1/work/k3d-0.6.7.0/k3dsdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-gfx/k3d-0.6.7.0-r1/work/k3d-0.6.7.0/k3dsdk'
make: *** [all-recursive] Error 1
 *
 * ERROR: media-gfx/k3d-0.6.7.0-r1 failed.
Comment 1 solar (RETIRED) gentoo-dev 2008-06-30 00:27:49 UTC
if this program is C++ based. Might I suggest to add -fno-fstack-protector-all to "CXXFLAGS"
Comment 2 Attila Tóth 2008-07-16 22:53:21 UTC
May I suggest to give https://hardened.gentooexperimental.org/secure/ a spin.
Another tip: -fno-strict-overflow.

Regards:
Dw.
Comment 3 Gordon Malm (RETIRED) gentoo-dev 2009-01-27 02:42:43 UTC
Fixed in CVS.  Wait an hour and emerge --sync.
Comment 4 Attila Tóth 2009-01-27 07:16:35 UTC
(In reply to comment #3)
> Fixed in CVS.  Wait an hour and emerge --sync.
> 

I hope that the applied -fno-stack-protector "fix" will affect only hardened toolchains using pre-4.x gcc.
Did you give a mf spin to the experimental toolchain before "resolving" the bug (as I suggested)?

Regards:
Dw.
Comment 5 Gordon Malm (RETIRED) gentoo-dev 2009-01-27 07:57:58 UTC
> I hope that the applied -fno-stack-protector "fix" will affect only hardened
> toolchains using pre-4.x gcc.

Yes, it only affects <gcc-4.  Furthermore, I've added an append-cxxflags a few days ago, which is utilized here.  So SSP is only turned off for the C++ portions when using gcc-3.x.  You're a smart guy, try looking at the Changelog or the ebuild.

And yes, the bug is "fixed" because the package compiles now.  gcc-3.4.6 C++ SSP implementation won't be fixed and neither will K3D.  The bugs like this are starting to pile up and its a rather nasty failure that can potentially fool the OOM killer into killing off other processes.  As much as it sucks, better to just have the packages compile until a white knight comes along and fixes everything.

> Did you give a mf spin to the experimental toolchain before "resolving" the bug
> (as I suggested)?
> 

Who do you think has been pulling the bits into mainline and fixing bugs in it?  solar (mainly) and myself.  Zorry deserves big credit++ for getting it to the point it is at and finding/fixing bugs in it as well.

> Another tip: -fno-strict-overflow.

Who do you think this "tip" came from?

Obviously, my patience has worn out for your attitude and snarky "mf" comments.
Comment 6 Attila Tóth 2009-01-28 06:42:47 UTC
(In reply to comment #5)
> Who do you think has been pulling the bits into mainline and fixing bugs in it?
>  solar (mainly) and myself.  Zorry deserves big credit++ for getting it to the
> point it is at and finding/fixing bugs in it as well.

I should apologize in public.
It's a shame what I did by posting that unintelligent reply. I try to make no excuses, because there's no good reason. I have to admit, I didn't intended to insult you. I made a big mistake. Yesterday was a bad day for me, because I had to face with my own hickness. I'd like to let you know: I appraise your efforts and all others working on hardened. I still would like to be a valuable member of the community.
Maybe these words won't make you forget. But to prove my willingness to make you forgive me: please let me know if there is something I can help you with, like hunting down bugs or something.
Apart from that I'll watch out not to send silly post in the early morning, while failing to take a look at on the sources in a bad mood.

Truly sorry: Dwokfur
Comment 7 Gordon Malm (RETIRED) gentoo-dev 2009-02-13 19:50:03 UTC
Sorry for the bugspam, so others please bare with me for one more public exchange.

Dwokfur, I am sorry I snapped at you.  You have contributed in the past and I appreciate that.  It's an excuse, but to keep it short - there's a lot of not-so-great things going on for me/my family personally right now, so sometimes my mood is not so good and patience gets a bit thin.

You don't know how much I'd love gcc 3.4.6's stack-protector implementation to work properly with C++ code.  Unfortunately I'm not qualified to make that happen and Dr. Etoh disappeared long before I got here.  I'm actually tempted to see if I can strip out SSP on C++ in gcc-3.4.6 and just fix it that way instead of editing ebuilds.  It never worked properly anyway and afaik gcc-4 doesn't do SSP on C++ either.  Adding -fno to CXXFLAGS in the default make.conf is a no-go for various reasons - in case you were going to suggest that. ;)

Anyway, if you want to talk further or about bugs to be fixed, etc. please e-mail me.  Thanks.