"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
8 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
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 any 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]

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

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 any 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
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

jcblitz
To be frank, I accidently sent this email (actually the follow up  
email). I went to save it as a draft and it sent for some odd reason.  
I started to look at the machine more closely and it looks like the  
RAM is hitting a ceiling and that's when it's bombing out. It's still  
a little weird though that the command line works fine but when  
hudson tries it, it fails. But I've ordered more RAM and I'm going to  
try it again when it gets here. I'm generally not one to just feed my  
machine more hardware to see if it fixes problems but I've been  
hitting a few out of mems with various apps on that box so I'm pretty  
sure it's hitting it's physical limits.

Thank you for getting back to me though.

On Apr 26, 2007, at 12:29 PM, Kohsuke Kawaguchi wrote:

>
> 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 any 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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [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

Thanks for the update. Hope that fixes the problem.


Sometimes a few hundred bucks is definitely better than spending time
trying to tweak things here and there :-)

Jared Blitzstein wrote:

> To be frank, I accidently sent this email (actually the follow up  
> email). I went to save it as a draft and it sent for some odd reason.  
> I started to look at the machine more closely and it looks like the  
> RAM is hitting a ceiling and that's when it's bombing out. It's still  
> a little weird though that the command line works fine but when  
> hudson tries it, it fails. But I've ordered more RAM and I'm going to  
> try it again when it gets here. I'm generally not one to just feed my  
> machine more hardware to see if it fixes problems but I've been  
> hitting a few out of mems with various apps on that box so I'm pretty  
> sure it's hitting it's physical limits.
>
> Thank you for getting back to me though.
>
> On Apr 26, 2007, at 12:29 PM, Kohsuke Kawaguchi wrote:
>
>>
>> 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 any 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]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
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

jcblitz
Well the new RAM has arrived, been installed, and I'm still hitting  
the out of mem from hudson builds only. This maybe a stupid question,  
but what is providing the heapspace that is giving the error below?  
Tomcat, Maven or does it just execute javac on it's own? I have 3  
gigs of RAM in this box and just want to make sure each process is  
getting what it needs.

On Apr 26, 2007, at 12:58 PM, Kohsuke Kawaguchi wrote:

>
> Thanks for the update. Hope that fixes the problem.
>
>
> Sometimes a few hundred bucks is definitely better than spending  
> time trying to tweak things here and there :-)
>
> Jared Blitzstein wrote:
>> To be frank, I accidently sent this email (actually the follow up  
>> email). I went to save it as a draft and it sent for some odd  
>> reason.  I started to look at the machine more closely and it  
>> looks like the  RAM is hitting a ceiling and that's when it's  
>> bombing out. It's still  a little weird though that the command  
>> line works fine but when  hudson tries it, it fails. But I've  
>> ordered more RAM and I'm going to  try it again when it gets here.  
>> I'm generally not one to just feed my  machine more hardware to  
>> see if it fixes problems but I've been  hitting a few out of mems  
>> with various apps on that box so I'm pretty  sure it's hitting  
>> it's physical limits.
>> Thank you for getting back to me though.
>> On Apr 26, 2007, at 12:29 PM, Kohsuke Kawaguchi wrote:
>>>
>>> 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 any 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]
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [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
2007/5/2, Jared Blitzstein <[hidden email]>:
> Well the new RAM has arrived, been installed, and I'm still hitting
> the out of mem from hudson builds only. This maybe a stupid question,
> but what is providing the heapspace that is giving the error below?
> Tomcat, Maven or does it just execute javac on it's own? I have 3
> gigs of RAM in this box and just want to make sure each process is
> getting what it needs.

I can't say exactly which JVM is causing the problem. It must be
either Maven JVM (it runs on its own JVM), or some JVMs that Maven
launches.

Again, using JavaSE6 would help, as it should be able to print the stack trace.

--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [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

jcblitz
I installed JavaSE6 but that didn't produce any more specific error  
messages. But what I did do was determine that maven2 being launched  
from hudson is not using my MAVEN_OPTS. I added "-verbose:gc" to my  
MAVEN_OPTS and when I do "mvn clean compile" from the command line I  
can see things like:

[INFO] [clean:clean]
[INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
workspace/target
[INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
workspace/target/classes
[INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
workspace/target/test-classes
[GC 19410K->4313K(260160K), 0.0082400 secs]
[GC 20505K->4637K(260160K), 0.0098027 secs]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[GC 20829K->5319K(260160K), 0.0061858 secs]

but when it runs from hudson there are no outputs with the GC  
information.

[INFO] [clean:clean]
[INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
workspace/target
[INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
workspace/target/classes
[INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
workspace/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.

Which leads me to believe it's not using the maven opts, which  
explains why it's not using the extra RAM I've specified in there.  
Any ideas why it's ignoring the opts?


On May 2, 2007, at 11:29 PM, Kohsuke Kawaguchi wrote:

> 2007/5/2, Jared Blitzstein <[hidden email]>:
>> Well the new RAM has arrived, been installed, and I'm still hitting
>> the out of mem from hudson builds only. This maybe a stupid question,
>> but what is providing the heapspace that is giving the error below?
>> Tomcat, Maven or does it just execute javac on it's own? I have 3
>> gigs of RAM in this box and just want to make sure each process is
>> getting what it needs.
>
> I can't say exactly which JVM is causing the problem. It must be
> either Maven JVM (it runs on its own JVM), or some JVMs that Maven
> launches.
>
> Again, using JavaSE6 would help, as it should be able to print the  
> stack trace.
>
> --
> Kohsuke Kawaguchi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [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
When you are using the native m2 mode, Hudson uses stdin/out to do
communication between Hudson and maven. I redirect System.out so that
I can show it in the console output, but because -verbose:gc output
doesn't go through System.out, I can't capture them.

So I don't think you can derive the conclusion you had. (The part I
don't understand, however, is that when -verbose:gc prints out some
message, it corrupts the communication channel, so the build should
fail.)

To really check if MAVEN_OPTS is taking effect or not, use ps, pargs,
or process explorer.

2007/5/3, Jared Blitzstein <[hidden email]>:

> I installed JavaSE6 but that didn't produce any more specific error
> messages. But what I did do was determine that maven2 being launched
> from hudson is not using my MAVEN_OPTS. I added "-verbose:gc" to my
> MAVEN_OPTS and when I do "mvn clean compile" from the command line I
> can see things like:
>
> [INFO] [clean:clean]
> [INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
> workspace/target
> [INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
> workspace/target/classes
> [INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
> workspace/target/test-classes
> [GC 19410K->4313K(260160K), 0.0082400 secs]
> [GC 20505K->4637K(260160K), 0.0098027 secs]
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [GC 20829K->5319K(260160K), 0.0061858 secs]
>
> but when it runs from hudson there are no outputs with the GC
> information.
>
> [INFO] [clean:clean]
> [INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
> workspace/target
> [INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
> workspace/target/classes
> [INFO] Deleting directory /Users/jared/.hudson/jobs/CDMPMavenBuild/
> workspace/target/test-classes
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
>
> Which leads me to believe it's not using the maven opts, which
> explains why it's not using the extra RAM I've specified in there.
> Any ideas why it's ignoring the opts?
>
>
> On May 2, 2007, at 11:29 PM, Kohsuke Kawaguchi wrote:
>
> > 2007/5/2, Jared Blitzstein <[hidden email]>:
> >> Well the new RAM has arrived, been installed, and I'm still hitting
> >> the out of mem from hudson builds only. This maybe a stupid question,
> >> but what is providing the heapspace that is giving the error below?
> >> Tomcat, Maven or does it just execute javac on it's own? I have 3
> >> gigs of RAM in this box and just want to make sure each process is
> >> getting what it needs.
> >
> > I can't say exactly which JVM is causing the problem. It must be
> > either Maven JVM (it runs on its own JVM), or some JVMs that Maven
> > launches.
> >
> > Again, using JavaSE6 would help, as it should be able to print the
> > stack trace.
> >
> > --
> > Kohsuke Kawaguchi
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]