Native build always get stuck at 'parsing method'
See original GitHub issueDescribe the bug
I using quarkus 8.3.Final , gradle Native build always get stucked at the step
[4/7] Parsing methods... [******]
while grinding the CPU
Building native image source jar: /home/runner/work/qu-queue-service/qu-queue-service/build/qu-queue-service-1.0.0-SNAPSHOT-native-image-source-jar/qu-queue-service-1.0.0-SNAPSHOT-runner.jar
Building native image from /home/runner/work/qu-queue-service/qu-queue-service/build/qu-queue-service-1.0.0-SNAPSHOT-native-image-source-jar/qu-queue-service-1.0.0-SNAPSHOT-runner.jar
Using docker to run the native image builder
Checking image status quay.io/quarkus/ubi-quarkus-mandrel:22.0.0.2-Final-java17
22.0.0.2-Final-java17: Pulling from quarkus/ubi-quarkus-mandrel
54e56e6f8572: Pulling fs layer
4f8ddd7f5a75: Pulling fs layer
20939a5b3d59: Pulling fs layer
4f8ddd7f5a75: Verifying Checksum
4f8ddd7f5a75: Download complete
54e56e6f8572: Verifying Checksum
54e56e6f8572: Download complete
54e56e6f8572: Pull complete
20939a5b3d59: Verifying Checksum
20939a5b3d59: Download complete
4f8ddd7f5a75: Pull complete
20939a5b3d59: Pull complete
Digest: sha256:7751b408ac408d6f91a95c864a2b8d85129987c8d5c1fc5356e9940c8e330837
Status: Downloaded newer image for quay.io/quarkus/ubi-quarkus-mandrel:22.0.0.2-Final-java17
quay.io/quarkus/ubi-quarkus-mandrel:22.0.0.2-Final-java17
Running Quarkus native-image plugin on native-image 22.0.0.2-Final Mandrel Distribution (Java Version 17.0.2+8)
docker run --env LANG=C --rm --user 1001:121 -v /home/runner/work/qu-queue-service/qu-queue-service/build/qu-queue-service-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --name build-native-clyaI quay.io/quarkus/ubi-quarkus-mandrel:22.0.0.2-Final-java17 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -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-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 -J-Xmx3G -H:-AddAllCharsets -H:EnableURLProtocols=http,https -H:-UseServiceLoaderFeature -H:+StackTrace qu-queue-service-1.0.0-SNAPSHOT-runner -jar qu-queue-service-1.0.0-SNAPSHOT-runner.jar
========================================================================================================================
GraalVM Native Image: Generating 'qu-queue-service-1.0.0-SNAPSHOT-runner'...
========================================================================================================================
[1/7] Initializing... (13.1s @ 0.22GB)
Version info: 'GraalVM 22.0.0.2-Final Java 17 Mandrel Distribution'
8 user-provided feature(s)
- io.quarkus.caffeine.runtime.graal.CacheConstructorsAutofeature
- io.quarkus.hibernate.orm.runtime.graal.DisableLoggingAutoFeature
- io.quarkus.jdbc.postgresql.runtime.graal.SQLXMLFeature
- io.quarkus.runner.AutoFeature
- io.quarkus.runtime.graal.DisableLoggingAutoFeature
- io.quarkus.runtime.graal.ResourcesFeature
- org.hibernate.graalvm.internal.GraalVMStaticAutofeature
- org.hibernate.graalvm.internal.QueryParsingSupport
[2/7] Performing analysis... [**********] (191.2s @ 2.47GB)
26,471 (96.76%) of 27,356 classes reachable
45,531 (68.17%) of 66,791 fields reachable
143,995 (80.30%) of 179,318 methods reachable
1,537 classes, 1,795 fields, and 10,535 methods registered for reflection
65 classes, 77 fields, and 55 methods registered for JNI access
[3/7] Building universe... (7.2s @ 2.60GB)
[4/7] Parsing methods... [******]
Expected behavior
Native build should be completed, or a clarification error should be shown
Actual behavior
The native build get stuck at the the step, for as long as 6h
How to Reproduce?
No response
Output of uname -a
or ver
Linux ahmed-legion 5.16.20-2-MANJARO #1 SMP PREEMPT Thu Apr 14 06:44:39 UTC 2022 x86_64 GNU/Linux
Output of java -version
openjdk version “17.0.2” 2022-01-18 OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8) OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
GraalVM version (if different from Java)
using builder image quay.io/quarkus/ubi-quarkus-mandrel:22.0.0.2-Final-java17
Quarkus version or git rev
2.8.3.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
------------------------------------------------------------ Gradle 7.3-rc-5 ------------------------------------------------------------ Build time: 2021-11-05 18:43:37 UTC Revision: 426f267f7b768154fd63b27e055ba56b357e6e4e Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant™ version 1.10.11 compiled on July 10 2021 JVM: 17.0.2 (Eclipse Adoptium 17.0.2+8) OS: Linux 5.16.20-2-MANJARO amd64
Additional information
build.gradle.kts
plugins {
java
id("io.quarkus")
}
repositories {
mavenLocal()
mavenCentral()
}
val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project
dependencies {
implementation("io.quarkus:quarkus-container-image-jib")
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation("io.quarkus:quarkus-resteasy-reactive-jackson")
implementation("io.quarkus:quarkus-jaxrs-client-reactive")
implementation("io.quarkus:quarkus-hibernate-reactive-panache")
implementation("io.quarkus:quarkus-smallrye-openapi")
// implementation("io.quarkus:quarkus-smallrye-jwt")
implementation("io.quarkus:quarkus-liquibase")
implementation("io.quarkus:quarkus-mailer")
implementation("io.quarkus:quarkus-reactive-pg-client")
implementation("io.quarkus:quarkus-smallrye-metrics")
implementation("io.quarkus:quarkus-arc")
implementation("io.quarkus:quarkus-oidc")
implementation("org.hibernate.validator:hibernate-validator")
implementation("io.quarkus:quarkus-jdbc-postgresql")
implementation("io.quarkus:quarkus-keycloak-admin-client")
implementation("io.quarkus:quarkus-cache")
implementation("org.mapstruct:mapstruct:1.4.1.Final")
compileOnly("org.projectlombok:lombok:1.18.16")
compileOnly("javax.validation:validation-api:2.0.1.Final")
testCompileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20")
testAnnotationProcessor("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.mapstruct:mapstruct-processor:1.4.1.Final")
testImplementation("io.quarkus:quarkus-junit5")
testImplementation("io.quarkus:quarkus-junit5-mockito")
testImplementation("io.quarkus:quarkus-test-security-oidc")
testImplementation("io.rest-assured:rest-assured")
testImplementation("org.testcontainers:postgresql:1.15.1")
testImplementation("org.jdbi:jdbi3-core:3.1.0")
testImplementation("com.tngtech.keycloakmock:mock:0.6.0");
testImplementation("io.quarkus:quarkus-test-oidc-server")
testImplementation("uk.co.datumedge:hamcrest-json:0.2")
testImplementation("org.skyscreamer:jsonassert:1.5.0")
}
group = "com.qu"
version = "1.0.0-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
Issue Analytics
- State:
- Created a year ago
- Comments:13 (9 by maintainers)
@geoand I’d wait a bit and give @deathwaiting opportunity to explain the need for constrained resources.
With these modifications to the original reproducer:
The build completes for me just fine, the memory consumption is nothing outlandish or unexpected: