Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal compiler error: java.lang.OutOfMemoryError #149

Open
simonkeng opened this issue Mar 30, 2019 · 0 comments
Open

Internal compiler error: java.lang.OutOfMemoryError #149

simonkeng opened this issue Mar 30, 2019 · 0 comments

Comments

@simonkeng
Copy link

I'm trying to build the acas-roo-server image when I encounter this java error:

docker build -t mcneilco/acas-roo-server-oss:latest .
....
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[ERROR] Internal compiler error: java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.Arrays.copyOf(Arrays.java:3236)
	/src/src/main/java/com/labsynch/labseer/domain/LsThing.java:0
(no source information available)

[ERROR] ABORT
Mar 30, 2019 9:33:51 PM org.aspectj.weaver.tools.Jdk14Trace info
INFO: Dumping to /src/./ajcore.20190330.213351.468.txt
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:53 min
[INFO] Finished at: 2019-03-30T21:33:52Z
[INFO] Final Memory: 384M/444M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.9:compile (default) on project acas: AJC compiler errors:
[ERROR] error at (no source information available)
[ERROR] /src/src/main/java/com/labsynch/labseer/domain/LsThing.java:0::0 Internal compiler error: java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.Arrays.copyOf(Arrays.java:3236)
[ERROR] abort ABORT -- (OutOfMemoryError) GC overhead limit exceeded
[ERROR] GC overhead limit exceeded
[ERROR] java.lang.OutOfMemoryError: GC overhead limit exceeded
[ERROR] 	at java.util.Arrays.copyOf(Arrays.java:3236)
[ERROR] 	at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
[ERROR] 	at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
[ERROR] 	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
[ERROR] 	at java.io.DataOutputStream.write(DataOutputStream.java:107)
[ERROR] 	at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1877)
[ERROR] 	at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1786)
[ERROR] 	at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1286)
[ERROR] 	at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1231)
[ERROR] 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427)
[ERROR] 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[ERROR] 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[ERROR] 	at org.aspectj.weaver.ResolvedTypeMunger.writeSourceLocation(ResolvedTypeMunger.java:262)
[ERROR] 	at org.aspectj.weaver.NewMethodTypeMunger.write(NewMethodTypeMunger.java:65)
[ERROR] 	at org.aspectj.weaver.WeaverStateInfo.write(WeaverStateInfo.java:225)
[ERROR] 	at org.aspectj.weaver.AjAttribute$WeaverState.write(AjAttribute.java:209)
[ERROR] 	at org.aspectj.weaver.AjAttribute.getBytes(AjAttribute.java:59)
[ERROR] 	at org.aspectj.weaver.bcel.Utility.bcelAttribute(Utility.java:712)
[ERROR] 	at org.aspectj.weaver.bcel.LazyClassGen.writeBack(LazyClassGen.java:485)
[ERROR] 	at org.aspectj.weaver.bcel.LazyClassGen.getJavaClassBytesIncludingReweavable(LazyClassGen.java:697)
[ERROR] 	at org.aspectj.weaver.bcel.BcelWeaver.getClassFilesFor(BcelWeaver.java:1451)
[ERROR] 	at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1413)
[ERROR] 	at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1191)
[ERROR] 	at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:514)
[ERROR] 	at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.queueForWeaving(AjPipeliningCompilerAdapter.java:447)
[ERROR] 	at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:432)
[ERROR] 	at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$after$org_aspectj_ajdt_internal_compiler_CompilerAdapter$5$6b855184(CompilerAdapter.aj:103)
[ERROR] 	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:909)
[ERROR] 	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.processCompiledUnits(Compiler.java:550)
[ERROR] 	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:462)
[ERROR] 	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417)
[ERROR] 	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1036)
[ERROR]
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The command '/bin/sh -c mvn compile war:war' returned a non-zero code: 1

From this source:

the error occurs when the JVM spent too much time performing Garbage Collection

and this could be the result of a memory leak in the JVM (?). I'm not experienced with Java development so I'm not sure where to start with investigation.

I'm building on a macOS machine:

OS: macOS Mojave 10.14.3 18D109 x86_64
Host: MacBookPro13,3
Kernel: 18.2.0
CPU: Intel i7-6920HQ (8) @ 2.90GHz
GPU: Intel HD Graphics 530, AMD Radeon Pro 460
Memory: 4036MiB / 16384MiB

Using Docker version 18.09.1, build 4c52b90

Any insight or recommendations are much appreciated, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant