Unrecognized VM option 'UseShenandoahGC'
See original GitHub issueEnvironment:
- Jib version: 2.6.0
- Build tool: Gradle 6.7
- OS: Win10 or MacOS
Description of the issue: The base image for java 11 (“gcr.io/distroless/java:11”) doesn’t support ShenandoahGC.
Expected behavior: The application runs correctly on the created JVM.
Steps to reproduce:
- Setup a gradle build;
- Build it;
- Run it.
jib-gradle-plugin
Configuration:
jib {
from {
image = DockerProps.BASE_IMAGE
}
container {
jvmFlags = parseSpaceSeparatedArgs("-noverify -XX:+UseShenandoahGC -Xss${JVMProps.XSS} -Xmx${JVMProps.XMX} -Xms${JVMProps.XMS} -XX:MaxMetaspaceSize=${JVMProps.MAX_METASPACE_SIZE} -XX:MaxDirectMemorySize=${JVMProps.MAX_DIRECT_MEMORY_SIZE} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${JVMProps.HEAPDUMP_PATH} -Dspring.profiles.active=dev")
ports = listOf(DockerProps.APP_PORT)
labels = mapOf("app-name" to application.applicationName, "service-version" to version.toString())
}
}
// DockerProps.BASE_IMAGE = "gcr.io/distroless/java:11"
Log output: Unrecognized VM option ‘UseShenandoahGC’ Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Unrecognized VM option 'UseShenandoahGC' in java-11 ...
Describe the bug Encountered Unrecognized VM option 'UseShenandoahGC' when passing the flag -XX:+UseShenandoahGC In ...
Read more >Unrecognized VM option 'ShenandoahGCHeuristics=compact'
Unrecognized VM option 'ShenandoahGCHeuristics=compact' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred.
Read more >Unrecognized JVM GC options when using JAVA 11
Unrecognized VM option 'UseGCLogFileRotation' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred.
Read more >[JDK-8250888] nsk/jvmti/scenarios/general_functions/GF08 ...
I.e. in jdk11u the option UseShenandoahGC is not even available if the VM has not been built without Shenandoah. Such a VM prints...
Read more >1308539 – Shenandoah 1.0 - Red Hat Bugzilla
... OpenJDK 64-Bit Server VM (build 25.77-b03, mixed mode) [omajid@localhost ~]$ java -XX:+UseShenandoahGC -version Unrecognized VM option ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the reference. The link says
The version of the OpenJDK 11 build by Debian in
gcr.io/distroless/java:11
is currently 11.0.6. Actually, the image is based on the Debian 9 oldstable, where Debian does not usually provide updates to packages. You may want to use the Debian 10-basedgcr.io/distroless/java-debian10:11
. Note thatgcr.io/distroless/java-debian10:11
was using 11.0.8 until now, and the 11.0.9 Distroless image was published today, so make sure to rebuild your image online to use 11.0.9.Looks like the OpenJDK 11.0.9 Debian build does accept-XX:+UseShenandoahGC
.Your previous link lists some builds: