You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Sahoo <Sa...@Sun.COM> on 2009/04/16 15:57:38 UTC
OOM error while building latest trunk
I consistently faced the following error while building latest trunk and
to work around, I had to set MAVEN_OPTS=-Xmx512m in my environment. Is
it because there are just a lot of things getting built in the same
reactor requiring more memory?
Thanks,
Sahoo
[exec] [INFO]
------------------------------------------------------------------------
[exec] [INFO] Building Apache Felix MOSGi JMX MBean for obr interaction
[exec] [INFO] task-segment: [clean, install]
[exec] [INFO]
------------------------------------------------------------------------
[exec] [INFO] [clean:clean]
[exec] [INFO] Deleting directory
/space/ss141213/WS/felix/trunk/mosgi/managedelements.obrprobe/target
[exec] [INFO] [resources:resources]
[exec] [INFO] Using default encoding to copy filtered resources.
[exec] [INFO] [compiler:compile]
[exec] [INFO] Compiling 2 source files to
/space/ss141213/WS/felix/trunk/mosgi/managedelements.obrprobe/target/classes
[exec] [INFO]
------------------------------------------------------------------------
[exec] [ERROR] BUILD FAILURE
[exec] [INFO]
------------------------------------------------------------------------
[exec] [INFO] Compilation failure
[exec] Failure executing javac, but could not parse the error:
[exec]
[exec]
[exec] The system is out of resources.
[exec] Consult the following stack trace for details.
[exec] java.lang.OutOfMemoryError: PermGen space
[exec] at
com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:52)
[exec] at
com.sun.tools.javac.comp.Annotate.instance(Annotate.java:36)
[exec] at
com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:215)
[exec] at
com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:168)
[exec] at
com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:293)
[exec] at
com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72)
[exec] at com.sun.tools.javac.main.Main.compile(Main.java:340)
[exec] at com.sun.tools.javac.main.Main.compile(Main.java:279)
[exec] at com.sun.tools.javac.main.Main.compile(Main.java:270)
[exec] at com.sun.tools.javac.Main.compile(Main.java:87)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[exec] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at
org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
[exec] at
org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
[exec] at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
[exec] at
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
[exec] at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
[exec] at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
[exec] at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
[exec] at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
[exec] at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
[exec] at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
[exec] at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
[exec] at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
[exec] at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
[exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[exec] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec]
[exec]
[exec]
[exec] Failure executing javac, but could not parse the error:
[exec]
[exec]
Re: OOM error while building latest trunk
Posted by Stuart McCulloch <mc...@gmail.com>.
2009/4/17 Sahoo <Sa...@sun.com>
> Stuart McCulloch wrote:
>
>> 2009/4/16 Sahoo <Sa...@sun.com>
>>
>>
>>> I consistently faced the following error while building latest trunk and
>>> to
>>> work around, I had to set MAVEN_OPTS=-Xmx512m in my environment. Is it
>>> because there are just a lot of things getting built in the same reactor
>>> requiring more memory?
>>>
>>
>> I'd say that's very likely, also note that an OOM in PermGen means the JVM
>> has exhausted
>> its allocated space for class instances (ie. too many classes and/or proxy
>> classes loaded).
>>
>> There's also an issue wrt. the default maximum heap - depending on which
>> JDK
>> release you
>> use (and even the OS) this can vary from being ~64mb to being half of the
>> physical memory.
>>
>> So setting your MAVEN_OPTS to a reasonably large maximum sounds reasonable
>> to me
>> if you want to build the whole project tree at once.
>>
>>
> If the build does require higher than usual memory, should this not be set
> in build.xml before execing mvn?
>
sure, if you can send me a patched build.xml that works for you I'd be happy
to apply it
Sahoo
>
--
Cheers, Stuart
Re: OOM error while building latest trunk
Posted by Sahoo <Sa...@Sun.COM>.
Stuart McCulloch wrote:
> 2009/4/16 Sahoo <Sa...@sun.com>
>
>
>> I consistently faced the following error while building latest trunk and to
>> work around, I had to set MAVEN_OPTS=-Xmx512m in my environment. Is it
>> because there are just a lot of things getting built in the same reactor
>> requiring more memory?
>>
>>
>
> I'd say that's very likely, also note that an OOM in PermGen means the JVM
> has exhausted
> its allocated space for class instances (ie. too many classes and/or proxy
> classes loaded).
>
> There's also an issue wrt. the default maximum heap - depending on which JDK
> release you
> use (and even the OS) this can vary from being ~64mb to being half of the
> physical memory.
>
> So setting your MAVEN_OPTS to a reasonably large maximum sounds reasonable
> to me
> if you want to build the whole project tree at once.
>
If the build does require higher than usual memory, should this not be
set in build.xml before execing mvn?
Sahoo
Re: OOM error while building latest trunk
Posted by Stuart McCulloch <mc...@gmail.com>.
2009/4/16 Sahoo <Sa...@sun.com>
> I consistently faced the following error while building latest trunk and to
> work around, I had to set MAVEN_OPTS=-Xmx512m in my environment. Is it
> because there are just a lot of things getting built in the same reactor
> requiring more memory?
>
I'd say that's very likely, also note that an OOM in PermGen means the JVM
has exhausted
its allocated space for class instances (ie. too many classes and/or proxy
classes loaded).
There's also an issue wrt. the default maximum heap - depending on which JDK
release you
use (and even the OS) this can vary from being ~64mb to being half of the
physical memory.
So setting your MAVEN_OPTS to a reasonably large maximum sounds reasonable
to me
if you want to build the whole project tree at once.
Thanks,
> Sahoo
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [INFO] Building Apache Felix MOSGi JMX MBean for obr interaction
> [exec] [INFO] task-segment: [clean, install]
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [INFO] [clean:clean]
> [exec] [INFO] Deleting directory
> /space/ss141213/WS/felix/trunk/mosgi/managedelements.obrprobe/target
> [exec] [INFO] [resources:resources]
> [exec] [INFO] Using default encoding to copy filtered resources.
> [exec] [INFO] [compiler:compile]
> [exec] [INFO] Compiling 2 source files to
> /space/ss141213/WS/felix/trunk/mosgi/managedelements.obrprobe/target/classes
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [ERROR] BUILD FAILURE
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [INFO] Compilation failure
> [exec] Failure executing javac, but could not parse the error:
> [exec]
> [exec]
> [exec] The system is out of resources.
> [exec] Consult the following stack trace for details.
> [exec] java.lang.OutOfMemoryError: PermGen space
> [exec] at com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:52)
> [exec] at
> com.sun.tools.javac.comp.Annotate.instance(Annotate.java:36)
> [exec] at
> com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:215)
> [exec] at
> com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:168)
> [exec] at
> com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:293)
> [exec] at
> com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72)
> [exec] at com.sun.tools.javac.main.Main.compile(Main.java:340)
> [exec] at com.sun.tools.javac.main.Main.compile(Main.java:279)
> [exec] at com.sun.tools.javac.main.Main.compile(Main.java:270)
> [exec] at com.sun.tools.javac.Main.compile(Main.java:87)
> [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [exec] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [exec] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [exec] at java.lang.reflect.Method.invoke(Method.java:597)
> [exec] at
> org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
> [exec] at
> org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
> [exec] at
> org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
> [exec] at
> org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
> [exec] at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
> [exec] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> [exec] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> [exec] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> [exec] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> [exec] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> [exec] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> [exec] at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> [exec] at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [exec] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [exec] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [exec] at java.lang.reflect.Method.invoke(Method.java:597)
> [exec]
> [exec]
> [exec]
> [exec] Failure executing javac, but could not parse the error:
> [exec]
> [exec]
>
>
--
Cheers, Stuart
Re: OOM error while building latest trunk
Posted by Clement Escoffier <cl...@gmail.com>.
Hi,
I experienced this once, just after adding the integration test of the
transaction service. Could you try it without this project (by
removing it from the transaction pom file) ?
Clement
On 16.04.2009, at 15:57, Sahoo wrote:
> I consistently faced the following error while building latest trunk
> and to work around, I had to set MAVEN_OPTS=-Xmx512m in my
> environment. Is it because there are just a lot of things getting
> built in the same reactor requiring more memory?
>
> Thanks,
> Sahoo
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [INFO] Building Apache Felix MOSGi JMX MBean for obr
> interaction
> [exec] [INFO] task-segment: [clean, install]
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [INFO] [clean:clean]
> [exec] [INFO] Deleting directory /space/ss141213/WS/felix/trunk/
> mosgi/managedelements.obrprobe/target
> [exec] [INFO] [resources:resources]
> [exec] [INFO] Using default encoding to copy filtered resources.
> [exec] [INFO] [compiler:compile]
> [exec] [INFO] Compiling 2 source files to /space/ss141213/WS/
> felix/trunk/mosgi/managedelements.obrprobe/target/classes
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [ERROR] BUILD FAILURE
> [exec] [INFO]
> ------------------------------------------------------------------------
> [exec] [INFO] Compilation failure
> [exec] Failure executing javac, but could not parse the error:
> [exec]
> [exec]
> [exec] The system is out of resources.
> [exec] Consult the following stack trace for details.
> [exec] java.lang.OutOfMemoryError: PermGen space
> [exec] at
> com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:52)
> [exec] at
> com.sun.tools.javac.comp.Annotate.instance(Annotate.java:36)
> [exec] at
> com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:215)
> [exec] at
> com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:168)
> [exec] at
> com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:293)
> [exec] at
> com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72)
> [exec] at com.sun.tools.javac.main.Main.compile(Main.java:340)
> [exec] at com.sun.tools.javac.main.Main.compile(Main.java:279)
> [exec] at com.sun.tools.javac.main.Main.compile(Main.java:270)
> [exec] at com.sun.tools.javac.Main.compile(Main.java:87)
> [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [exec] at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [exec] at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> [exec] at java.lang.reflect.Method.invoke(Method.java:597)
> [exec] at
> org
> .codehaus
> .plexus
> .compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
> [exec] at
> org
> .codehaus
> .plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
> [exec] at
> org
> .apache
> .maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:
> 493)
> [exec] at
> org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
> [exec] at
> org
> .apache
> .maven
> .plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:
> 451)
> [exec] at
> org
> .apache
> .maven
> .lifecycle
> .DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
> 558)
> [exec] at
> org
> .apache
> .maven
> .lifecycle
> .DefaultLifecycleExecutor
> .executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> [exec] at
> org
> .apache
> .maven
> .lifecycle
> .DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:
> 478)
> [exec] at
> org
> .apache
> .maven
> .lifecycle
> .DefaultLifecycleExecutor
> .executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> [exec] at
> org
> .apache
> .maven
> .lifecycle
> .DefaultLifecycleExecutor
> .executeTaskSegments(DefaultLifecycleExecutor.java:291)
> [exec] at
> org
> .apache
> .maven
> .lifecycle
> .DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> [exec] at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> [exec] at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [exec] at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [exec] at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> [exec] at java.lang.reflect.Method.invoke(Method.java:597)
> [exec]
> [exec]
> [exec]
> [exec] Failure executing javac, but could not parse the error:
> [exec]
> [exec]
>