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

camel-quarkus-integration-test-core -Dnative outofmemory or 137 error #275

Closed
dhartford opened this issue Oct 14, 2019 · 3 comments
Closed

Comments

@dhartford
Copy link

dhartford commented Oct 14, 2019

fresh 2019-10-14 pull from master, project root

./mvnw clean install -Dnative (non-native is fine)

focus version (reactor module test):
./integration-tests/core/test/
mvn clean install -Dnative

uname -a
Darwin C02XC25MJGH6 17.7.0 Darwin Kernel Version 17.7.0: Fri Jul 6 19:54:51 PDT 2018; root:xnu-4570.71.3~2/RELEASE_X86_64 x86_64

docker --version
Docker version 19.03.0-beta3, build c55e026

mvn --version
Apache Maven 3.5.4

java -version
java version "1.8.0_192"

logs

[INFO] --- quarkus-maven-plugin:0.23.2:native-image (native-image) @ camel-quarkus-integration-test-core ---
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] Running Quarkus native-image plugin on Java HotSpot(TM) 64-Bit Server VM
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] docker run -v /Users/dhartford/VSCodeProjects/camel-quarkus/integration-tests/core/test/target:/project:z --rm quay.io/quarkus/ubi-quarkus-native-image:19.2.0.1 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dio.netty.leakDetection.level=DISABLED -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -J-Dio.netty.allocator.maxOrder=1 -J-Dvertx.disableDnsResolver=true --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar camel-quarkus-integration-test-core-0.2.1-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace
[camel-quarkus-integration-test-core-0.2.1-SNAPSHOT-runner:25]    classlist:  11,558.46 ms
[camel-quarkus-integration-test-core-0.2.1-SNAPSHOT-runner:25]        (cap):   1,172.96 ms
[camel-quarkus-integration-test-core-0.2.1-SNAPSHOT-runner:25]        setup:   2,739.62 ms
17:33:50,947 INFO  [org.jbo.threads] JBoss Threads version 3.0.0.Final
Exception in thread "native-image pid watcher" java.lang.OutOfMemoryError: GC overhead limit exceeded
[camel-quarkus-integration-test-core-0.2.1-SNAPSHOT-runner:25]     analysis: 151,800.92 ms
5 fatal errors detected:
Fatal error: java.lang.OutOfMemoryError: GC overhead limit exceeded
Fatal error: java.lang.OutOfMemoryError: GC overhead limit exceeded
Fatal error: java.lang.OutOfMemoryError: Java heap space
@ppalaga
Copy link
Contributor

ppalaga commented Oct 14, 2019

Could you please try running with Maven 3.6.2 (e.g. using ./mvnw) ?

Otherwise try experimenting with -Dnative-image.xmx=... IIRC, the smallest value that used to work for me was 5g but the more you can give the faster the build.

@dhartford
Copy link
Author

dhartford commented Oct 14, 2019

Thanks @ppalaga, I'm trying to go as deep as I can so the next person has more to work from --

Scenario 1: no xmx flags, default docker setup (2g memory limit):

  • FAIL: above error (out of memory)

Scenario 2: with -Dnative-image.xmx=5g, default docker setup (2g memory limit):

  • FAIL: Image error 137 (docker error, not a lot to run with)

Scenario 3: with -Dnative-image.xmx=5g,modify docker engine memory limit to 8g (docker->preferences->advanced)

  • PASS: Tests run past above issue

Scenario 4: without -Dnative-image.xmx=5g,modify docker engine memory limit to 8g (docker->preferences->advanced)

  • PASS: Tests run past above issue

If it wasn't for scenario 2 giving worse debug information than scenario 1, could add a 5g config directly in the quarkus maven plugin. However, given this is a 'how is your docker setup for maximum memory' I'm not sure how to improve the developer experience.

@dhartford dhartford changed the title camel-quarkus-integration-test-core -Dnative outofmemory error camel-quarkus-integration-test-core -Dnative outofmemory or 137 error Oct 14, 2019
@davsclaus
Copy link
Contributor

Maybe we can have a tip page in the documentation with such details. I am also running into these kind of problems. graalvm is surely more memory hog and now also with docker combined.

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

3 participants