qemu-kvm-0.14.1 fails to emerge however qemu-kvm-0.13.0-r2 installs fine Reproducible: Always Steps to Reproduce: 1. emerge qemu-kvm Actual Results: qemu fails during compile Expected Results: qemu installs emerge --info Portage 2.2.0_alpha37 (hardened/linux/amd64/no-multilib/selinux, gcc-4.5.2, glibc-2.13-r2, 2.6.38-hardened-r6 x86_64) ================================================================= System uname: Linux-2.6.38-hardened-r6-x86_64-Intel-R-_Core-TM-_i3_CPU_M_350_@_2.27GHz-with-gentoo-2.0.2 Timestamp of tree: Sat, 28 May 2011 17:30:01 +0000 app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.1-r1, 3.2 dev-util/cmake: 2.8.4-r1 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.2-r1 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.10.3, 1.11.1-r1 sys-devel/binutils: 2.21 sys-devel/gcc: 4.5.2 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 sys-kernel/linux-headers: 2.6.38 (virtual/os-headers) sys-libs/glibc: 2.13-r2 Repositories: gentoo my_local_overlay Installed sets: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 PUEL dlj-1.1 sun-bcla-java-vm" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/maven-bin-3.0/conf /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.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" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa amd64 apache2 berkdb bzip2 cairo cgi cli cracklib crypt cups cxx dbus device-mapper dri fbcon fontconfig fuse gd gdbm gdu gif gpm gtk hardened iconv innodb ipv6 java jpeg jpeg2k justify libnotify lua mmx modules mudflap mysql ncurses nls nptl nptlonly nsplugin open_perms opengl openmp pam pcre perl php png policykit pppd pulseaudio python readline selinux session sse sse2 sse3 ssl ssse3 startup-notification sysfs system-sqlite tcpd threads tiff truetype udev unicode urandom v4l2 vim vim-syntax wifi xinerama xml xml2 xorg zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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="braindump flow karbon kexi kpresenter krita tables words" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau" 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, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 274937 [details] build log
It builds here, but I'm on a mostly stable system without SELinux. I guess you could try downgrading gcc or glibc to see if that helps. My emerge --info for comparison: Portage 2.1.9.42 (hardened/linux/amd64, gcc-4.4.5, libc-0-r0, 2.6.36-hardened-r9 x86_64) ================================================================= System uname: Linux-2.6.36-hardened-r9-x86_64-AMD_Phenom-tm-_II_X4_920_Processor-with-gentoo-2.0.2 Timestamp of tree: Fri, 27 May 2011 23:45:01 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.1-r1, 3.1.3-r1 dev-util/cmake: 2.8.4-r1 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.2-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 sys-kernel/linux-headers: 2.6.36.1 sys-libs/glibc: 2.12.2 virtual/os-headers: 0 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 googleearth" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" 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/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org/ http://gentoo.osuosl.org/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j5" 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 /home/mjo/src/overlays/mjo-overlay /home/mjo/src/overlays/sunrise/sunrise /home/mjo/src/overlays/gentoo-haskell" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa amd64 amr bzip2 cairo cli cracklib crypt cups curl cxx dbus dirac djvu doc dri dv dvd dvdr emacs encode exif ffmpeg flac foomaticdb fuse gif gnutls gstreamer gtk hardened hscolour iconv imap imlib jpeg jpeg2k justify lame latex lcms matroska mmx mng modules mp3 mpeg mudflap multilib ncurses nptl nptlonly offensive ofx ogg openal openexr opengl openmp pam pcre pdf png ppds pppd profile qt3support quicktime readline ruby schroedinger sdl session smp speex spell sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff truetype unicode urandom usb vorbis wmf x264 xorg xpm xvid zlib" ALSA_CARDS="emu10k1" 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" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="nouveau nv vesa" XFCE_PLUGINS="logout menu trash" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
When trying to compile it with vanilla-gcc I also used htop to monitore the thing, and was surprised when it just happily used all available memory. I have thought that 3GB is enough... Well after adding 1GB swapfile it builds fine. Maybe it needs some memory check like some other packages have.
I think it just needs a bunch of memory at that spot. I set my ulimit (-v and -m) to 512MB and got an error on the same file as you did: CC x86_64-softmmu/exec.o CC x86_64-softmmu/cpu-exec.o CC x86_64-softmmu/translate-all.o CC x86_64-softmmu/translate.o cc1: out of memory allocating 26564496 bytes after a total of 132570816 bytes make[1]: *** [translate.o] Error 1 make: *** [subdir-x86_64-softmmu] Error 2 emake failed
same for me. MAKEOPTS="-j3" fails (eats all 4GB of ram) while MAKEOPTS="-j1" builds ok.
Yes with MAKEOPTS="-j1" it works
I don't think this is a selinux issue, so I'd like to reassign it to the qemu-kvm maintainers. Before I do, just make sure nothing is showing up in your audit.log or anything else that suggests selinux or hardened are the culprits.
Nothing in logs
With MAKEOPTS="-j1" it can still crash, it will just use less memory at that spot. It dies with 512MB in the same spot and -j1.
From what I observed it needs something like 2~2.5GB with one job in that spot (actually with my config there are two spots for i386 and x86_64 target), of course with any more jobs it needs more memory (that's why it failed for me with -j2). Don't know what is the way to measure the exact amount of memory needed.
is related to Bug 355861?
(In reply to comment #11) > is related to Bug 355861? Certainly looks like it.
*** This bug has been marked as a duplicate of bug 355861 ***