Summary: | emerge dev-java/sun-jdk-1.6.0.31 with 16GB RAM - Could not reserve enough space for object heap | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Norman Back <gentoo3> |
Component: | [OLD] Java | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PATCH |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info
build.log Proposed patch Proposed patch as diff |
Description
Norman Back
2012-02-22 08:35:28 UTC
Created attachment 302785 [details]
emerge --info
Created attachment 302787 [details]
build.log
Created attachment 302789 [details]
Proposed patch
Comment on attachment 302789 [details]
Proposed patch
--- /usr/portage/dev-java/sun-jdk/sun-jdk-1.6.0.31.ebuild 2012-02-22 08:52:12.829538211 +0000
+++ /tmp/sun-jdk-1.6.0.31.ebuild 2012-02-22 08:51:55.261810138 +0000
@@ -107,7 +107,7 @@
if use x86; then
bin/java -client -Xshare:dump || die
fi
- bin/java -server -Xshare:dump || die
+ bin/java -Xms64m -Xmx64m -server -Xshare:dump || die
}
src_install() {
Created attachment 302791 [details]
Proposed patch as diff
This is a specific instance of bug #316121 *** This bug has been marked as a duplicate of bug 316121 *** Please explain how bug 316121 enables me to emerge dev-java/sun-jdk-1.6.0.31 without modifying the ebuild. This bug is not resolved by bug 316121. I am in the same situation (16GB RAM on a 32-bit machine). Adding -Xmx512m to the -server -Xshare:dump line works for me. Interestingly, -Xmx1024m did not work. (In reply to comment #10) > I am in the same situation (16GB RAM on a 32-bit machine). Adding -Xmx512m to > the -server -Xshare:dump line works for me. Interestingly, -Xmx1024m did not > work. The additional parameters are required to restrict the memory usage, rather than increase it. (In reply to comment #10) > I am in the same situation (16GB RAM on a 32-bit machine). Adding -Xmx512m to > the -server -Xshare:dump line works for me. Interestingly, -Xmx1024m did not > work. 1GB or 1/4 of available ram, whichever is lower, is the default max for server vm and should work for x86. (Practical maximum is <2GB) -Xmx1024m not working means something is rather odd, may I ask if you can reproduce this issue outside of the ebuild? (In reply to comment #12) > (In reply to comment #10) > > I am in the same situation (16GB RAM on a 32-bit machine). Adding -Xmx512m to > > the -server -Xshare:dump line works for me. Interestingly, -Xmx1024m did not > > work. > > 1GB or 1/4 of available ram, whichever is lower, is the default max for server > vm and should work for x86. (Practical maximum is <2GB) > > -Xmx1024m not working means something is rather odd, may I ask if you can > reproduce this issue outside of the ebuild? # java -server -Xshare:dump Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. # java -server -version java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) Server VM (build 20.6-b01, mixed mode) # I was waiting for related bugs to pop up, doesn't seem to happen and so the issue seems to be limited to generating the CDS. Committed the workaround. Thanks for the report. |