tags:

views:

57

answers:

3

Hi All,

I'm having problem with the Hudson build slave which has got Windows XP 4 GB RAM and in the batch file to call the JNLP I have specify like the following:

javaws -J-Xms1280m -J-Xmx1024m http://hudson-master.domain.com:8080/computer/Exige/slave-agent.jnlp

why i can't give it more than 1 GB ?

any help and suggestion would be greatly appreciated.

Thanks, AWT

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: Java heap space
        at com.sun.tools.javac.util.List.prepend(List.java:145)
        at com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1457)
        at com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:1742)
        at com.sun.tools.javac.jvm.ClassReader.listAll(ClassReader.java:1882)
        at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1903)
        at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1538)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
        at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:256)
        at com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:382)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:221)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:235)
        at com.sun.tools.javac.comp.Enter.complete(Enter.java:448)
        at com.sun.tools.javac.comp.Enter.main(Enter.java:433)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:404)
        at com.sun.tools.javac.main.Main.compile(Main.java:592)
        at com.sun.tools.javac.main.Main.compile(Main.java:544)
        at com.sun.tools.javac.Main.compile(Main.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
        at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
        at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------
[INFO] Total time: 34 seconds
[INFO] Finished at: Fri Oct 08 17:27:59 EST 2010 [INFO] Final Memory: 25M/63M [INFO] ------------------------------------------------------------------------

+4  A: 

The Xms should generally be lower than the Xmx

Bozho
@Bozho you need the `-J` flag to pass JVM args to `javaws` (Java Web Start).
dogbane
@fahd thanks. removed that point
Bozho
ah yes, thanks for your reply, however the value still can't be larger than 1 GB ? i don't know why, this PC got 3.24 GB usable in Windows XP msinfo32.
Albert Widjaja
+2  A: 

Is the build executed directly by the JVM of the slave agent? If you run a Maven build (for example), the slave agent can launch an external Maven process (with default Java Xmx).

So you should specify the MAVEN_OPTS parameter to ensure that Maven builds are always executed with a customized Xmx value.

Benoit Courtine
+1, good point about maven
Bozho
thanks man for your reply, so in this case i should go to the HUDSON server and change that value ? (what file and where ?)
Albert Widjaja
thanks Benoit, It is a maven option in Hudson to let it allocate more memories to JVM when executing maven build. it works now without error after I made the changes in the server (through web based console).
Albert Widjaja
+1  A: 

If yu have Master Slave configuration , you should specify the memory settins in the Manage Hudson->Configure system-> Global properties

The kind of Env properties are present on Master are used in Slave too.

Pushpinder Rattan