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

Bug 380301

Summary: app-emulation/virtualbox-4.1.2 - -O2 causes high memory usage & OOM during compile
Product: Gentoo Linux Reporter: Budanov "r0g3r" Eugene <roger2000>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED WORKSFORME    
Severity: normal CC: arne.flagge, bkohler, kripton, patrick, proxy-maint, swapon
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Full build log
full log (eng)

Description Budanov "r0g3r" Eugene 2011-08-22 23:50:26 UTC
When I try to compile virtualbox-4.1.2 it crashes if I use standard -O2 make.conf option and moreover I saw strange memory usage jumps during compile, when gcc eats all RAM and swap. Compiling of program may stopping in different place on different files but with same error. See log below.

If I use -O0 option for compiling virtualbox - all good. Program compiling without any errors and memory usage jumps and works.

Other programs compiling with -O2 option without any problems. 

Reproducible: Always




emerge --info
Portage 2.1.10.11 (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 2.6.36-tuxonice-r4 i686)
=================================================================
System uname: Linux-2.6.36-tuxonice-r4-i686-Intel-R-_Celeron-R-_CPU_2.66GHz-with-gentoo-2.0.3
Timestamp of tree: Sun, 21 Aug 2011 20:15:01 +0000
ccache version 3.1.5 [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r1, 2.7.2-r2, 3.1.3
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.4
dev-util/pkgconfig:       0.25-r2
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.65
sys-devel/automake:       1.4_p6::<unknown repository>, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1
sys-devel/gcc:            4.2.2, 4.3.3-r2, 4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo berkano games arcon sunrise zugaina rion x-portage
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 Q3AEULA skype-eula Adobe AdobeFlash-10.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy collision-protect distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.yandex.ru/gentoo-distfiles ftp://local.weirdwire.ru/distr/mirror/gentoo"
LC_ALL="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/local/portage/layman/berkano /usr/local/portage/layman/games /usr/local/portage/layman/arcon /usr/local/portage/layman/sunrise /usr/local/portage/layman/zugaina /usr/local/portage/layman/rion /usr/local/portage"
SYNC="rsync://mirror.yandex.ru/gentoo-portage/"
USE="7zip X a52 aac acl acpi adplug alsa apng audio audiofile bash-completion berkdb bluetooth branding bzip2 cairo ccache cdaudio cdda cddb cdio cdr cdrom chardet chm chroot cjk cleartype cli clock consolekit corefonts cracklib crypt cue cups curl cxx cyrillic dbus device-mapper dht divx djvu dri dts dvd dvdnav dvdr emboss encode exif expat extras faac faad fam fat ffmpeg firefox firefox3 flac fortran fuse gallium gdbm gdu gecko gif glib gnutls gpg gpm gtk gtk2 gtkhtml hibernate-script iconv icq id3 idn imap jabber jpeg jpeg2k key-screen keyboard lame lcms libkms libnotify linuxkeys livejournal lj mac mad matroska menu-plugin mmx mmxext mng modplug modules mouse moznopango mp2 mp3 mp4 mpd mpeg mpeg2 mplayer mpu401 mudflap musepack ncurses nls nptl nptlonly nsplugin ntfs ogg opengl openmp openvg optimize-cflags optimized-qmake pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 rar rdesktop readline rpm ru-dv ru-g ru-i ru-k sdl session shm slang spell srt sse sse2 ssl startup-notification subtitles svg sysfs tcpd test-programs theora threads tiff trash-plugin truetype udev udev-acl unicode usb vorbis wav wavpack wma wmf wmp x264 x86 xcb xfce xft xhtml xml xorg xosd xscreensaver xulrunner xv xvid yandexnarod zip 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 mmap_emul 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump active" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

End of build log:
  xpidl   XPCOM - {C}/src/libs/xpcom18a4/xpcom/base/nsIMemory.idl
  xpidl   XPCOM - {C}/src/libs/xpcom18a4/xpcom/base/nsIProgrammingLanguage.idl
  xpidl   XPCOM - {C}/src/libs/xpcom18a4/xpcom/base/nsISupports.idl
  xpidl   XPCOM - {C}/src/libs/xpcom18a4/xpcom/base/nsITraceRefcnt.idl
  xpidl   XPCOM - {C}/src/libs/xpcom18a4/xpcom/base/nsIWeakReference.idl
  xpidl   XPCOM - {C}/src/libs/xpcom18a4/xpcom/base/nsrootidl.idl
i686-pc-linux-gnu-gcc:   xpidl   XPCOM - {C}/src/libs/xpcom18a4/xpcom/ds/nsIAtom.idl
Внутренняя ошибка: Убито (программа cc1)
Пожалуйста, пришлите полный отчёт об ошибке.
См. инструкции на <http://bugs.gentoo.org/>.
kmk: *** [/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/out/linux.x86/release/obj/VBoxREM64/target-i386/translate.o] Error 1
The failing command:
@i686-pc-linux-gnu-gcc -c -O2 -g -pipe -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-long-long -Werror-implicit-function-declaration -Wno-variadic-macros -march=native -O2 -pipe -fomit-frame-pointer -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fPIC -Wno-sign-compare -Werror-implicit-function-declaration -m32 -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler/Sun/crt -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler/Sun -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler/target-i386 -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler/tcg -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler/fpu -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/out/linux.x86/release/obj/VBoxRemPrimary -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/VBox/VMM/include -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler/tcg/i386 -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/include -I/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/out/linux.x86/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib/virtualbox\" -DRTPATH_APP_DOCS=\"\" -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_X86 -D__X86__ -DIN_RING3 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=64 -DPIC -DIN_REM_R3 -DREM_INCLUDE_CPU_H -DNEED_CPU_H -DLOG_USE_C99 -DVBOX_ENABLE_VBOXREM64 -D_GNU_SOURCE -D__i386__ -Wp,-MD,/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/out/linux.x86/release/obj/VBoxREM64/target-i386/translate.o.dep -Wp,-MT,/var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/out/linux.x86/release/obj/VBoxREM64/target-i386/translate.o -Wp,-MP -o /var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/out/linux.x86/release/obj/VBoxREM64/target-i386/translate.o /var/tmp/portage/app-emulation/virtualbox-4.1.2/work/VirtualBox-4.1.2_OSE/src/recompiler/target-i386/translate.c
Comment 1 Budanov "r0g3r" Eugene 2011-08-22 23:53:55 UTC
Created attachment 284275 [details]
Full build log
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-08-23 06:44:55 UTC
Can you please run

  LANG="C" emerge -1v =virtualbox-4.1.2

and attach the resulting build.log file to this bug? Not all Gentoo devs can read non-english error messages...
Comment 3 Budanov "r0g3r" Eugene 2011-08-24 00:31:24 UTC
Created attachment 284421 [details]
full log (eng)

I am really sorry for my carelessness. 

I send second attach with full build log on English.
Comment 4 Ben Kohler gentoo-dev 2013-10-01 21:53:44 UTC
(In reply to Budanov "r0g3r" Eugene from comment #3)
> Created attachment 284421 [details]
> full log (eng)
> 
> I am really sorry for my carelessness. 
> 
> I send second attach with full build log on English.

I think these strange errors are just byproducts of an OOM situation, are you still able to reproduce this issue?  Virtualbox definitely takes a fair amount of memory to build, and -O2 will make it even higher... how much memory and swap do you have available?
Comment 5 Ben Kohler gentoo-dev 2013-11-16 16:06:01 UTC
If you can still reproduce this, please reopen.
Comment 6 Budanov "r0g3r" Eugene 2013-11-16 17:02:35 UTC
(In reply to Ben Kohler from comment #4)
> (In reply to Budanov "r0g3r" Eugene from comment #3)
> > Created attachment 284421 [details]
> > full log (eng)
> > 
> > I am really sorry for my carelessness. 
> > 
> > I send second attach with full build log on English.
> 
> I think these strange errors are just byproducts of an OOM situation, are
> you still able to reproduce this issue?  Virtualbox definitely takes a fair
> amount of memory to build, and -O2 will make it even higher... how much
> memory and swap do you have available?

No, I can't reproduce this bug, because I changed PC and moved to other distro.