Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 180718

Summary: net-libs/opal-2.2.6 - excessive memory use when building
Product: Gentoo Linux Reporter: Craig Edwards <brain>
Component: [OLD] LibraryAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED UPSTREAM    
Severity: normal CC: genstef, sgtphou
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Failure build log

Description Craig Edwards 2007-06-03 11:45:45 UTC
When building opal 2.2.6 from the ebuild, my system terminates the build process every time at transcoders.cxx. I have 256mb of ram in my system, and 1gb of swap, and i have attempted this process with nothing running but sshd. Therefore, it leads me to believe that poor practices in this library cause it to claim far too much memory during the build process. The last error indicates over a 140mb malloc() which is far from sensible.

Reproducible: Always

Steps to Reproduce:
n/a

Actual Results:  
Build crashes, out of memory.

Expected Results:  
Software should install correctly without requiring over 500 megs of swap and 200 megs of ram free.

uname -a:
Linux 2.6.15-gentoo-r1 #1 Sun Apr 29 15:24:53 BST 2007 i686 Celeron (Coppermine) GenuineIntel GNU/Linux

cortex brain # cat /proc/meminfo 
MemTotal:       255504 kB
MemFree:        192540 kB
Buffers:         20548 kB
Cached:          23112 kB
SwapCached:        864 kB
Active:          26128 kB
Inactive:        18908 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       255504 kB
LowFree:        192540 kB
SwapTotal:      506036 kB
SwapFree:       501468 kB
Dirty:               4 kB
Writeback:           0 kB
Mapped:           1668 kB
Slab:            12720 kB
CommitLimit:    633788 kB
Committed_AS:    13632 kB
PageTables:        272 kB
VmallocTotal:   770040 kB
VmallocUsed:      4536 kB
VmallocChunk:   765356 kB
Comment 1 Craig Edwards 2007-06-03 11:46:51 UTC
Created attachment 121017 [details]
Failure build log

This is from the system with nothing running but sshd and dhcpcd. X and all X apps were not running.
Comment 2 Craig Edwards 2007-06-03 11:48:56 UTC
Correction, there is 512mb swap not 1gb, however this would indicate a 768mb build process for one c++ file, which is still beyond the realms of sensible.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-06-03 11:51:54 UTC
And, why is this a Gentoo-specific bug? Have you verified it's different somewhere else?
Comment 4 Craig Edwards 2007-06-03 11:53:05 UTC
I was told to place this bug here by the freenode #gentoo channel, when asked "who's tracker does this belong on".
Comment 5 Craig Edwards 2007-06-03 11:55:32 UTC
Just to point out this does seem to be well known on google too -

http://www.google.com/search?q=opal+transcoders.cxx+memory

Don't know why i was told to put it here.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-06-03 12:06:36 UTC
Indeed nothing Gentoo could solve here; you can work around this by making more swap available (temporary swapfile or whatever); anything else needs to be done upstream (opal or GCC or both :))
Comment 7 Craig Edwards 2007-06-03 13:09:49 UTC
It looks like there is something gentoo can do :-)

This only occurs is -Os is used with the build flags. A possible suggestion would be to mask -Os in this ebuild (i have seen other ebuilds mask CFLAGS off). Is this a sensible request?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-06-03 21:43:16 UTC
(In reply to comment #7)
> This only occurs is -Os is used with the build flags. A possible suggestion
> would be to mask -Os in this ebuild (i have seen other ebuilds mask CFLAGS
> off). Is this a sensible request?

genstef - if you feel like doing some replace-flags magic...

Comment 9 Stefan Schweizer (RETIRED) gentoo-dev 2007-06-03 21:58:53 UTC
jup have added it for now, thanks
Comment 10 michael@smith-li.com 2007-06-04 00:21:31 UTC
Craig,

What's your emerge --info, normally?

Thanks,
Mike
Comment 11 Craig Edwards 2007-06-04 17:34:43 UTC
Portage 2.1.2.7 (default-linux/x86/2007.0/desktop, gcc-3.3.6, glibc-2.3.6-r4, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Celeron (Coppermine)
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 02 Jun 2007 12:30:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-Os -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sfperms"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk ftp://mirrors.blueyonder.co.uk/mirrors/gentoo http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi adplug alsa apm berkdb bindist bitmap-fonts bonobo cairo cli cracklib crypt dbus divx dri eds emboss encode esd evo fam ffmpeg firefox flac fortran gdbm gif gmedia gnome gphoto2 gstreamer gtk gtk2 hal iconv ipv6 isdnlog java jpeg kde kerberos ldap libg++ lm_sensors mad midi mikmod mmx modplug mp3 mpeg msn mudflap musepack ncurses nls nptlonly ogg opengl openmp oscar oss pam pcmcia pcre pdf perl png pppd pulseaudio python qt qt3 qt3support qt4 quicktime readline realmedia reflection sdl session sid sndfile spell spl ssl svg tcpd tiff timidity truetype truetype-fonts type1-fonts unicode vorbis wavpack wifi win32codecs wma wmp x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Recently upgraded from an obsoleted profile.
It's not really a 386, as the CHOST might lead you to believe, but when i installed this laptop two years or so ago, i picked the wrong architecture, and now i cant change that without a reinstall. Just to let you know...
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-06-04 17:42:45 UTC
(In reply to comment #11)

gcc-3.3.x is EOL-ed.

http://www.gentoo.org/doc/en/gcc-upgrading.xml
http://www.gentoo.org/doc/en/change-chost.xml

Anyway, completely unrelated to this issue.
Comment 13 SpanKY gentoo-dev 2007-07-07 17:40:25 UTC
screwing with flags is not correct ... especially considering the problem you're "solving" fluctuates between gcc versions and packages