Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 316121 - dev-java/sun-jdk-1.6.0.19 heap fail
Summary: dev-java/sun-jdk-1.6.0.19 heap fail
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-19 15:58 UTC by djinnZ
Modified: 2014-04-06 11:47 UTC (History)
4 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 djinnZ 2010-04-19 15:58:01 UTC
~ # free
             total       used       free     shared    buffers     cached
Mem:       2064380     576700    1487680          0     186420     222632
-/+ buffers/cache:     167648    1896732
Swap:      2098576          0    2098576

~ # emerge --info
Portage 2.2_rc67 (hardened/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.28-hardened-r9 i686)
=================================================================
System uname: Linux-2.6.28-hardened-r9-i686-AMD_Sempron-tm-_Processor_3300+-with-gentoo-1.12.13
Timestamp of tree: Mon, 19 Apr 2010 15:00:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/fax /usr/share/X11/xkb /usr/share/config /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--color y --with-bdeps y"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="TODO.gz HACKING.gz AUTHORS.gz TODO.bz2 HACKING.bz2 AUTHORS.bz2"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,-O1"
LINGUAS="it en"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X X509 a52 aac acl acpi alisp alsa apache2 async bash-completion berkdb big-tables binfilter bl bluetooth bs2b bzip2 cairo caps cdda cddax cddb cdio cdparanoia cdr cgi cjk cleartype cli colordiff colors consolekit corefonts cracklib crypt cups cupsddk cxx daemon dbase dbm dbus dbx device-mapper dga dirac directfb disk-partition dri dts dvb dvd dvdr embedded exif expat extensions extra-ciphers extra-tools extraengine extras fbcon ffmpeg filter firefox flac fontconfig foomaticdb ftp gcj gd gd-external gdbm gif gimp glibc-compat20 glibc-omitfp glitz gnutls grub gsm gstreamer gtk gzip hal hardened hash hddtemp hpn i18n iconv icu id3 id3tag imagemagick imap inifile injection inkjar iodbc iproute2 ipsec ipv6 iscsi java java-external java6 jbig jpeg jpeg2k json kate kde kdevplatform laptop lcms ldap ldap-sasl libssh2 libwww lightning lilo lm_sensors logrotate loop-aes lzma lzo m17n-lib madwifi matroska max-idx-128 md5sum mmap mmx mmxext mng modules mp3 mpeg mudflap multitarget mysql mysqli ncurses nfs nfsv3 nfsv4 nis nls nptl nptlonly nsplugin ntfs nut odbc odk ogg opencore-amr opengl openssl opensslcrypt overlays pam pango pcntl pcre pcsc-lite pdf perl pg-intdatetime phonon php pic pkinit plotutils plugins png pnm portaudio posix postgres postscript ppds pppd psyco pulseaudio python qt3support qt4 quota quotas raw readline reflection reiserfs remote replytolist rle run-as-root samba samba4 scanner schroedinger secure-delete session sharedext sharedmem shroedinger simplexml smartcard smbclient smbkrb5passwd smbsharemodes soap sockets socks5 soundex speex spell spl sql sqlite sqlite3 sse sse2 ssl ssse3 suidcheck svg svgz symlink sysfs syslog system-sqlite sysvipc tcl tcpd templates theora threads tidy tiff tk tools truetype trusted twolame type3 udev udev-acl unicode urandom usb userlocales utils vcd vcdinfo vcdx vhosts vidix vim vim-pager vim-syntax vlm vorbis wavpack webkit wifi win32codecs winbind wma-fixed wmf x264 x86 xanim xcb xft xinerama xml xmlpatterns xmlreader xmlrpc xmlwriter xorg xpm xsl xv xvid zip zlib" ALSA_CARDS="intel8x0" 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 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="evdev keyboard mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="mga"
Unset:  CPPFLAGS, CTARGET, FFLAGS, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

emerge die with this error:

ET_EXEC PemRxS /var/tmp/portage/dev-java/sun-jdk-1.6.0.19/work/jdk1.6.0_19/jre/bin/unpack200
 * Creating the Class Data Sharing archives
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
 * ERROR: dev-java/sun-jdk-1.6.0.19 failed:
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  48:  Called src_compile
 *   environment, line 2814:  Called die
 * The specific snippet of code:
 *           "${S}"/bin/java -client -Xshare:dump || die;

Reproducible: Always

Steps to Reproduce:
Comment 1 djinnZ 2010-04-20 11:33:26 UTC
same problem with 1.6.0.20
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-04-20 15:12:43 UTC
Did previous versions work on this machine?

Can you try to modify the calls in src_compile to add a heap-limiting parameter such as -Xmx512m and see if it helps (experiment with the value)?
Thanks.
Comment 3 djinnZ 2010-04-21 14:33:16 UTC
Sorry, i have forget to report than I have also tryed to increase the heap size with JAVA_OPTS env var and directly into ebuild with no results.
The last version working and actually running is the 1.6.0.17 (no more in portage).
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-04-21 15:20:59 UTC
What if you comment out the class-data-sharing part altogether to skip it and install without it. Will it work, to compiler/run the java ebuilds you use?
Comment 5 djinnZ 2010-04-30 14:55:53 UTC
sorry for the wait

I have tried to start manually in the /var/tmp/... directory
./bin/java -Xms128m -Xmx128m -client -Xshare:dump ; ./bin/java -Xms128m -Xmx128m -server -Xshare:dump
and it work.
The heap error seem to occurs only if java run in the ebuild, really strange to me.
Comment 6 djinnZ 2010-04-30 15:04:20 UTC
sorry but the previous report was posted not completed.

it works with -Xms64m -Xmx64m
so the problem is not to increase but limit te heap size

i have rebuild the sandbox also without differences.
Comment 7 Robin Marlow 2010-08-04 21:30:46 UTC
This happens to me to.  solved again by adding:
-Xms64m -Xmx64m twice into src_compile()

emerge --info
Portage 2.2_rc67 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.11.2-r0, 2.6.34-gentoo i686)
=================================================================
System uname: Linux-2.6.34-gentoo-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2. 0.1
Timestamp of tree: Wed, 04 Aug 2010 02:15:03 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 1.3.7-r1, 2.1.11
dev-lang/python:     2.5.4-r3, 2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.1-r2
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r2, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.1.2, 4.2.4-r1, 4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -msse3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /et c/gconf /etc/gentoo-release /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/splash /etc/terminfo /etc/texmf/langua ge.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon64 -msse3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandb ox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirrors.blueyonder.co.uk/mirrors/gentoo ftp://ftp.mirrorservice.org/sites/www. ibiblio.org/gentoo/"
LANG="en_GB.utf8"
LC_ALL="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB uk"
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"
PORTDIR_OVERLAY="/etc/portage/local_portage /usr/local/portage/layman/rion /usr/local/portage/layman /sabayon /usr/local/portage/layman/pentoo /usr/local/portage/layman/kde"
SYNC="rsync://myth/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa apache2 atm avahi bitmap-fonts bluetooth bonjour brandin g bzip2 cairo cdaudio cdr cli consolekit cracklib crypt cups cxx dbus dri dts dv dvd dvdr dvdread em boss encode exif fam ffmpeg firefox flac fortran fuse gd gdbm gif gimp gimpprint gphoto2 gpm gtk hal  iconv ieee1394 jingle jpeg kde kerberos laptop lcms ldap libnotify mad mdnsresponder-compat mikmod  mjpeg mms mmx mmxext mng modules mp3 mp4 mpeg mudflap mysql ncurses nls nntp nptl nptlonly nsplugin  nvidia ogg opengl openmp oss pam pango pcre pda pdf perl pic png ppds pppd python qt qt3support qt4  readline reflection rtc samba sdl session slang snmp spell spl sse sse2 sse3 ssl startup-notificatio n svg sysfs tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales utemper v4l2  visualization vorbis win32codecs x264 x86 xcb xcomposite xine xml xorg xscreensaver xulrunner xv xvi d xvmc zeroconf zlib" ALSA_CARDS="intel-hd" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoo p 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 auth_digest authn_anon authn _dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_own er authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter  file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic neg otiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status  unique_id userdir usertrack vhost_alias" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard  mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb nc urses text" LINGUAS="en en_GB uk" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64"  RUBY_TARGETS="ruby18" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" XTABLES_ADDONS ="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sys rq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMP RESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 8 Alexandre Carsac 2010-10-18 21:30:08 UTC
Work fine for me with the following

just create a new file if not already :

/etc/env.d/21java

this file should at least contain the global option : 
JAVA_OPTS="-Xms64m -Xmx64m"

then just do a env-update and an emerge. 
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-22 15:59:09 UTC
*** Bug 405239 has been marked as a duplicate of this bug. ***
Comment 10 Ralph Sennhauser (RETIRED) gentoo-dev 2012-02-27 12:03:47 UTC
Taking the swap as available ram there would be 4 GB total which results in a max heap size of 1 GB which is above the roughly 800MB for pax enabled kernels without SEGMEXEC and PAGEEXEC set for the vm executables on x86. This should be fixed since setting the additionally required pax markings through the eclass.

If there are further issues it likely is an instance of bug 405239.

Thanks for the report.
Comment 11 Simon de Hartog 2014-04-06 11:47:03 UTC
Just for those who have not found an answer yet, I stumbled upon http://forums-web2.gentoo.org/viewtopic-t-827522-start-0.html and fixed all my java memory problems (such as all java-based packages no longer being installed due to the mentioned errors) with the following command:

sysctl vm.overcommit_memory=0

I had it on 2 at first, which means do not overcommit memory. Setting it to 0 fixed all for me. Hope this helps.