Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344769 - dev-java/sun-jdk-1.6.0.22 - Could not reserve enough space for object heap
Summary: dev-java/sun-jdk-1.6.0.22 - Could not reserve enough space for object heap
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 00:00 UTC by Luu Danh Hieu
Modified: 2011-03-04 09:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (sun-jdk-1.6.0.22-build.log,371.10 KB, text/plain)
2010-11-09 00:02 UTC, Luu Danh Hieu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luu Danh Hieu 2010-11-09 00:00:00 UTC
The error message given was:
"${S}"/bin/java -server -Xshare:dump || die;

* Call stack:
*     ebuild.sh, line  54:  Called src_compile
*   environment, line 2816:  Called die

Portion of interest in build.log:
--
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
--

I have sun-jdk-1.6.0.20 installed, so this might be something in the process of upgrading the ebuild for .20 to .22? No USE flags on sun-jdk is enabled.

Reproducible: Always

Steps to Reproduce:
1. emerge sun-jdk

Actual Results:  
 * ERROR: dev-java/sun-jdk-1.6.0.22 failed:
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 2816:  Called die
 * The specific snippet of code:
 *           "${S}"/bin/java -server -Xshare:dump || die;

Expected Results:  
Install correctly

(1)
undine ~ # emerge -pqv =dev-java/sun-jdk-1.6.0.22
[ebuild     U ] dev-java/sun-jdk-1.6.0.22 [1.6.0.20] USE="-X -alsa -derby -doc -examples -jce -nsplugin -odbc" 

(2)
undine ~ # emerge --info =dev-java/sun-jdk-1.6.0.22
Portage 2.1.8.3 (hardened/linux/x86/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.28-hardened-r9-hrd-undine i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.28-hardened-r9-hrd-undine-i686-Intel-R-_Pentium-R-_Dual_CPU_E2180_@_2.00GHz-with-gentoo-1.12.14
Timestamp of tree: Sun, 07 Nov 2010 17:30:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.10.2, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=core2 -mfpmath=sse -O2 -pipe -fforce-addr -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -mfpmath=sse -O2 -pipe -fforce-addr -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl apache2 bzip2 cgi cjk cli cracklib crypt curl cvs cxx dri fastcgi gdbm git gnutls gpm hardened iconv imap ipv6 javascript libwww lzo maildir modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl php pic postgres pppd python qmail-spp readline ruby sasl session sqlite sqlite3 ssl subversion swig sysfs tcpd threads unicode urandom vhosts vpopmail x86 xml xorg 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_digest authn_file deflate env filter include log_config mime mime_magic rewrite userdir vhost_alias authz_host dir" APACHE2_MPMS="worker" 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-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel     mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage   siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware     voodoo" 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, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Luu Danh Hieu 2010-11-09 00:02:43 UTC
Created attachment 253709 [details]
Build log
Comment 2 Miroslav Šulc gentoo-dev 2011-01-15 12:53:31 UTC
did you have enough free memory when doing the emerge? it looks to me like java was not able to allocate memory in your ram and that is the reason why it failed.
Comment 3 Luu Danh Hieu 2011-01-15 16:54:54 UTC
Hi Miroslav, thanks for trying to solve this. That might have been it, though I don't think that was the cause (machine runs only apache for obscure website and named, and has 2 GiB)

I tried it again just now and it compiled successfully. The only thing that changed from then to now was my kernel upgrade to 2.6.36 to 2.6.28.

So seeing as I can't reproduce it again, I'm closing it WORKSFORME to avoid taking up unnecessary time from you guys in java@gentoo (I'm sure you have more important matters). I hope I'm not doing anything wrong here.

Cheers!
Comment 4 Alex Efros 2011-03-04 09:02:20 UTC
I've same error, also on hardened system. I remember that already happens some time ago. Using JAVA_OPTS="-Xms64m -Xmx64m" as recommended at bug 316121 doesn't helps (because AFAIR this affect only -client, while we here have error with -server). But adding same options inside ebuild solved this issue:

         einfo "Creating the Class Data Sharing archives"
         "${S}"/bin/java -client -Xshare:dump || die
-        "${S}"/bin/java -server -Xshare:dump || die
+        "${S}"/bin/java -Xms64m -Xmx64m -server -Xshare:dump || die
     fi
 }

# free
             total       used       free     shared    buffers     cached
Mem:       4137332    3136424    1000908          0     480288    1250096
-/+ buffers/cache:    1406040    2731292
Swap:      4200960          0    4200960

While this is only way to work around this issue, I think either ebuild should be fixed in this way (but I've no idea is this may broke emerging on system which now able to emerge sun-jdk), or some other way should be provided to provided these options to -server ($JAVA_OPTS_SERVER?).

Please reopen this bug.


Portage 2.1.9.25 (hardened/linux/x86, gcc-4.4.5, glibc-2.11.3-r0, 2.6.36-hardened-r9 i686)
=================================================================
System uname: Linux-2.6.36-hardened-r9-i686-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-1.12.14
Timestamp of tree: Fri, 04 Mar 2011 07:30:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r2, 3.1.3-r1
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-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
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /service /usr/inferno/keydb /usr/inferno/lib /usr/inferno/services /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/openvpn/easy-rsa /var/log /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=prescott -O2 -pipe"
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 userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.df.lth.se/pub/gentoo/ http://ftp.df.lth.se/pub/gentoo/ http://gentoo.telcom.net.ua/"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j1"
PKGDIR="/usr/portage-packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude ChangeLog --delete-excluded"
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="/var/lib/layman/powerman /var/lib/layman/sunrise /var/lib/layman/kde-sunset /var/lib/layman/vmware /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl acpi aim alsa apache2 asf avi bash-completion berkdb bitmap-fonts bzip2 cddb cdr chm cli cracklib crypt cscope cue curl cxx dbus dga divx4linux djvu dlloader dri dts dvd dvdr dvdread encode fastcgi ffmpeg flac flash gd gdbm gif gnutls gpg gtk gtk2 hardened hddtemp iconv icq idn imagemagick imap imlib irc jabber javascript jpeg kde lm_sensors lzo mad mailbox mbox mmx mng modules motif mp3 mpeg msn mudflap musepack mysql ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre perl pic png pppd pwdb python qt qt3support qt4 quicktime readline rss rtc samba sdl session spell sse sse2 ssl ssse3 svg sysfs tcltk tcpd theora tiff truetype truetype-fonts type1-fonts unicode urandom vim-pager vim-syntax vim-with-x vorbis wavpack win32codecs x86 xinetd xorg xv xvid yahoo 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="log_config vhost_alias autoindex alias rewrite dir deflate filter mime negotiation auth_basic authn_file authz_host authz_user authz_groupfile cgi actions headers env setenvif" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" LIRC_DEVICES="serial" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa fbdev nv nvidia" 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, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

Comment 5 Alex Efros 2011-03-04 09:06:30 UTC
I've found mentioned above similar issue which happens some time ago - see bug 344135.