java.lang.OutOfMemoryError: Java heap space" building my Maven 2 project in hudson but it works fine when I go into the workspace and build manually

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.OutOfMemoryError: Java heap space" building my Maven 2 project in hudson but it works fine when I go into the workspace and build manually

jcblitz
Sorry, but I lost the original emails about this. But I'll include a recap below. I've upgraded to java 1.6 (a suggestion to get a better stack trace) as well as tomcat to 6. Now when I try to build it just hangs there while trying to download a pom for a jar. There is no pom file at the location it's trying, but the jar is there. Maven has no problems on the command line with this, but I'm not sure if hudson is waiting for it or what. I finally aborted it after 54 minutes of building, it takes about 2 minutes via command line. Here is the console output for that 

started
$ java -cp C:\tomcat\apache-tomcat-6.0.13\webapps\hudson\WEB-INF\lib\maven-agent-1.115.jar;C:\java\apps\maven-2.0.7\boot\classworlds-1.1.jar hudson.maven.agent.Main C:\java\apps\maven-2.0.7 C:\tomcat\apache-tomcat-6.0.13\webapps\hudson\WEB-INF\lib\remoting-1.115.jar C:\tomcat\apache-tomcat-6.0.13\webapps\hudson\WEB-INF\lib\maven-interceptor-1.115.jar
channel started
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building CDMP
[INFO]    task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory C:\Documents and Settings\jblitzstein.ES\.hudson\jobs\Cdmp\workspace\target
[INFO] Deleting directory C:\Documents and Settings\jblitzstein.ES\.hudson\jobs\Cdmp\workspace\target\classes
[INFO] Deleting directory C:\Documents and Settings\jblitzstein.ES\.hudson\jobs\Cdmp\workspace\target\test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING] While downloading javax.xml:jaxrpc:1.1
  This artifact has been relocated to javax.xml:jaxrpc-api:1.1.

 

 

channel stopped
Build was aborted
finished: ABORTED


-------------------
Here is the recap from some previous emails

Date: Thu, 26 Apr 2007 09:29:23 -0700
From: Kohsuke Kawaguchi <[hidden email]>
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms040902060505010106000606"
Subject: "java.lang.OutOfMemoryError: Java heap space" building my Maven 2 project in


I have a lot of reasonably big modules (the whole Glassfish v3) but 
haven't seen this problem.

I suspect something is running away and creating a lot of objects. Would 
it be possible for you to run this on SE6? I think it produces a stack 
trace for OOME, which would help us find out where it's dying.

Jared Blitzstein wrote:
> I've been using hudson with 5 of our projects that were previously  
> ANT based without issues and it's worked great. We've recently  
> switched to maven2 which in itself works well, but I'm getting an out  
> of mem exception when trying to do a "clean install" goal from my  
> maven job for one of the projects. But if I go into the workspace  
> where hudson pulled down the projects from cvs and run "mvn clean  
> install" manually, it compiles and builds fine. Anyone have any  
> suggestions? I already have my MAVEN_OPTS set to "-Xmx512m - 
> XX:MaxPermSize=128m"
> Error:
> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError: Java heap space
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] Total time: 22 seconds
> [INFO] Finished at: Wed Apr 25 12:59:36 EDT 2007
> [INFO] Final Memory: 11M/60M
> [INFO]  
> ------------------------------------------------------------------------
> finished: FAILURE
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


-- 
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space" building my Maven 2 project in hudson but it works fine when I go into the workspace and build manually

Kohsuke Kawaguchi
Administrator
Jared Blitzstein wrote:
> Sorry, but I lost the original emails about this. But I'll include a  
> recap below. I've upgraded to java 1.6 (a suggestion to get a better  
> stack trace) as well as tomcat to 6. Now when I try to build it just  
> hangs there while trying to download a pom for a jar. There is no pom  
> file at the location it's trying, but the jar is there. Maven has no  
> problems on the command line with this, but I'm not sure if hudson is  
> waiting for it or what. I finally aborted it after 54 minutes of  
> building, it takes about 2 minutes via command line. Here is the  
> console output for that

Hmm. One hypothesis is that when JVM starts to run out of memory, it
will do a lot of full GCs (although 1 hour vs 2 mins seems to be too
much of a difference.)

I really need to add more probe code there, but would it be possible for
you to attach jconsole to the running maven instance and see if you can
find anything interesting? In JavaSE6, you can attach jconsole to any
process on-demand.

>
> started
> $ java -cp C:\tomcat\apache-tomcat-6.0.13\webapps\hudson\WEB-INF\lib
> \maven-agent-1.115.jar;C:\java\apps\maven-2.0.7\boot
> \classworlds-1.1.jar hudson.maven.agent.Main C:\java\apps\maven-2.0.7  
> C:\tomcat\apache-tomcat-6.0.13\webapps\hudson\WEB-INF\lib
> \remoting-1.115.jar C:\tomcat\apache-tomcat-6.0.13\webapps\hudson\WEB-
> INF\lib\maven-interceptor-1.115.jar
> channel started
> [INFO] Scanning for projects...
> [INFO]  
> ------------------------------------------------------------------------
> ----
> [INFO] Building CDMP
> [INFO]    task-segment: [clean, install]
> [INFO]  
> ------------------------------------------------------------------------
> ----
> [INFO] [clean:clean]
> [INFO] Deleting directory C:\Documents and Settings\jblitzstein.ES
> \.hudson\jobs\Cdmp\workspace\target
> [INFO] Deleting directory C:\Documents and Settings\jblitzstein.ES
> \.hudson\jobs\Cdmp\workspace\target\classes
> [INFO] Deleting directory C:\Documents and Settings\jblitzstein.ES
> \.hudson\jobs\Cdmp\workspace\target\test-classes
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [WARNING] While downloading javax.xml:jaxrpc:1.1
>    This artifact has been relocated to javax.xml:jaxrpc-api:1.1.
>
>
> Downloading: http://charon:8080/proximity/repository/inhouse/javax/ 
> xml/jaxp-api/1.4.1/jaxp-api-1.4.1.pom
> channel stopped
> Build was aborted
> finished: ABORTED
>
>
> -------------------
> Here is the recap from some previous emails
>
> Date: Thu, 26 Apr 2007 09:29:23 -0700
> From: Kohsuke Kawaguchi <[hidden email]>
> Content-Type: multipart/signed; protocol="application/x-pkcs7-
> signature"; micalg=sha1; boundary="------------
> ms040902060505010106000606"
> Subject: "java.lang.OutOfMemoryError: Java heap space" building my  
> Maven 2 project in
>
>
> I have a lot of reasonably big modules (the whole Glassfish v3) but
> haven't seen this problem.
>
> I suspect something is running away and creating a lot of objects. Would
> it be possible for you to run this on SE6? I think it produces a stack
> trace for OOME, which would help us find out where it's dying.
>
> Jared Blitzstein wrote:
>  > I've been using hudson with 5 of our projects that were previously
>  > ANT based without issues and it's worked great. We've recently
>  > switched to maven2 which in itself works well, but I'm getting an out
>  > of mem exception when trying to do a "clean install" goal from my
>  > maven job for one of the projects. But if I go into the workspace
>  > where hudson pulled down the projects from cvs and run "mvn clean
>  > install" manually, it compiles and builds fine. Anyone have any
>  > suggestions? I already have my MAVEN_OPTS set to "-Xmx512m -
>  > XX:MaxPermSize=128m"
>  >
>  > Error:
>  >
>  > The system is out of resources.
>  > Consult the following stack trace for details.
>  > java.lang.OutOfMemoryError: Java heap space
>  >
>  >
>  > [INFO]
>  >  
> ------------------------------------------------------------------------
>  > [INFO] For more information, run Maven with the -e switch
>  > [INFO]
>  >  
> ------------------------------------------------------------------------
>  > [INFO] Total time: 22 seconds
>  > [INFO] Finished at: Wed Apr 25 12:59:36 EDT 2007
>  > [INFO] Final Memory: 11M/60M
>  > [INFO]
>  >  
> ------------------------------------------------------------------------
>  > finished: FAILURE
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [hidden email]
>  > For additional commands, e-mail: [hidden email]
>  >
>  >
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment