apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
255 stars 189 forks source link

"exit code 137" in Tika native test on GH actions #3230

Open ppalaga opened 2 years ago

ppalaga commented 2 years ago
[INFO] --- quarkus-maven-plugin:2.4.0.Final:build (quarkus-build) @ camel-quarkus-integration-test-tika ---
[INFO] [org.jboss.threads] JBoss Threads version 3.4.2.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/runner/work/camel-quarkus/camel-quarkus/integration-tests/tika/target/camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-native-image-source-jar/camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/runner/work/camel-quarkus/camel-quarkus/integration-tests/tika/target/camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-native-image-source-jar/camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Using docker to run the native image builder
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Checking image status quay.io/quarkus/ubi-quarkus-native-image:21.2-java11
21.2-java11: Pulling from quarkus/ubi-quarkus-native-image
Digest: sha256:6079eb01031a117a92c75d17c44498a981cf92a648e3cac83801471aedc88e9c
Status: Image is up to date for quay.io/quarkus/ubi-quarkus-native-image:21.2-java11
quay.io/quarkus/ubi-quarkus-native-image:21.2-java11
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 21.2.0 Java 11 CE (Java Version 11.0.12+6-jvmci-21.2-b08)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --user 1001:121 -v /home/runner/work/camel-quarkus/camel-quarkus/integration-tests/tika/target/camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-native-image-source-jar:/project:z --name build-native-uytWu quay.io/quarkus/ubi-quarkus-native-image:21.2-java11 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=US -J-Dfile.encoding=UTF-8 -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:+AddAllCharsets -H:EnableURLProtocols=http -H:+InlineBeforeAnalysis -H:-UseServiceLoaderFeature -H:+StackTrace camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner -jar camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner.jar
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]    classlist:  28,078.18 ms,  2.41 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]        (cap):     972.20 ms,  2.41 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]        setup:   4,847.35 ms,  2.41 GB
The bundle named: messages, has not been found. If the bundle is part of a module, verify the bundle name is a fully qualified class name. Otherwise verify the bundle path is accessible in the classpath.
13:30:58,075 WARNING [org.apa.tik.par.PDFParser] J2KImageReader not loaded. JPEG2000 files will not be processed.
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.

13:32:29,777 INFO  [org.jbo.threads] JBoss Threads version 3.4.2.Final
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]     (clinit):   6,409.79 ms,  5.13 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]   (typeflow): 155,315.38 ms,  5.13 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]    (objects): 126,770.43 ms,  5.13 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]   (features):   4,348.64 ms,  5.13 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]     analysis: 300,114.77 ms,  5.13 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]     universe:  34,354.22 ms,  5.14 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]      (parse):  40,557.26 ms,  5.14 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]     (inline):  56,544.60 ms,  4.83 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]    (compile): 156,536.27 ms,  5.15 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]      compile: 261,061.28 ms,  5.15 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]        image: 117,866.14 ms,  5.02 GB
/home/runner/work/_temp/3f06dde0-818b-4bb6-88af-4d130cac509c.sh: line 26:  2694 Killed                  ./mvnw -V -ntp -Dhttp.keepAlive=false -e clean verify -Dformatter.skip -Dimpsort.skip -Denforcer.skip -Pnative,docker,ci --fail-at-end -pl integration-tests/azure-grouped,integration-tests/crypto,integration-tests/dozer,integration-tests/master,integration-tests/pdf,integration-tests/saxon,integration-tests/syndication,integration-tests/telegram,integration-tests/tika,integration-tests/twitter,integration-tests/vertx,integration-tests/zendesk
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]        write:  11,783.57 ms,  5.01 GB
[camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner:25]      [total]: 760,133.74 ms,  5.01 GB
# Printing build artifacts to: /project/camel-quarkus-integration-test-tika-2.5.0-SNAPSHOT-runner.build_artifacts.txt
Error: Process completed with exit code 137.

Maybe we could try to reduce the size of the compiled code.

jamesnetherton commented 2 years ago

Something that changed in 2.4.0 is that the Quarkus Tika extension is now forced to add add all charsets. I wonder if that is having an impact here?

ppalaga commented 2 years ago

Something that changed in 2.4.0 is that the Quarkus Tika extension is now forced to add add all charsets. I wonder if that is having an impact here?

Maybe. It is a lot of data.

galderz commented 2 years ago

@ppalaga What do you mean by it's a lot of data?

JiriOndrusek commented 2 years ago

I enabled test localy ad see a different native error. I'll investigate it.

/home/jondruse/dev/graal/graalvm-ce-java11-21.3.0/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=US -J-Dfile.encoding=UTF-8 -H:-ParseOnce -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -J-Djava.awt.headless=true -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:NativeLinkerOption=-no-pie -H:-UseServiceLoaderFeature -H:+StackTrace camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner -jar camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner.jar
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]    classlist:   5,974.94 ms,  1.70 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]        (cap):     520.81 ms,  1.70 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]        setup:   2,721.02 ms,  1.70 GB
14:59:56,130 WARNING [org.apa.tik.par.PDFParser] J2KImageReader not loaded. JPEG2000 files will not be processed.
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.

15:00:06,360 INFO  [org.jbo.threads] JBoss Threads version 3.4.2.Final
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]     (clinit):   1,789.74 ms,  6.14 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]   (typeflow):   5,395.79 ms,  6.14 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]    (objects):  35,583.64 ms,  6.14 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]   (features):   8,332.28 ms,  6.14 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]     analysis:  54,115.82 ms,  6.14 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]     universe:   3,688.91 ms,  6.14 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]      (parse):   8,600.69 ms,  6.64 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]     (inline):  10,232.05 ms,  6.27 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]    (compile):  46,980.92 ms,  8.09 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]      compile:  71,547.44 ms,  8.09 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]        image:   7,995.86 ms,  8.09 GB
[camel-quarkus-integration-test-tika-2.7.0-SNAPSHOT-runner:100050]        write:     568.07 ms,  8.09 GB
Fatal error:java.lang.RuntimeException: There was an error linking the native image: Linker command exited with 1

Based on the linker command output, possible reasons for this include:
1. It appears as though libfreetype.a is missing. Please install it.
galderz commented 2 years ago

Installing libfreetype should do the trick, but the new most recent AWT integration avoided that unless you really need to use AWT APIs in the native executable that will be tested.