Bug#925928: tomcat9: Error occurred during initialization of VM: Option -XX:+UseG1GC not supported

Emmanuel Bourg ebourg at apache.org
Fri Mar 29 08:35:42 GMT 2019


Le 28/03/2019 à 21:50, Thorsten Glaser a écrit :

> 11. Apparently, the option is not available in the Zero VM,
> only in Hotspot (didn’t check DCE, JamVM, etc).

Indeed, but running Tomcat on Zero is not a good idea anyway.
G1 isn't available for DCEVM, but at least the error message is clear:

  $ java -XX:+UseG1GC -dcevm -version
  Must use the serial or concurrent mark sweep GC with enhanced class redefinition.
  Error: Could not create the Java Virtual Machine.
  Error: A fatal exception has occurred. Program will exit.


> But the manpage says that a suitable GC is nowadays picked
> automatically anyway, so we don’t lose if we drop this.

G1 is the default GC pour Java 9+, so the command line option is only
really useful for Java 8.

Previously the Concurrent Mark Sweep GC was enabled for Tomcat but this
is suboptimal for Java 11. If we remove G1 from the default options the
Parallel GC will be picked for Java 8, which isn't the best choice I think.


> Do any release architectures _not_ have Hotspot available?
> (mips comes to mind.) If so, this is RC; if not, this can
> very well wait until after the release (as you expressed
> a desire to not change the config files at the moment).

Tomcat on mips... :)

If I'm not mistaken openjdk-11-jre-zero is only available on the
architectures supporting Hotspot. For the other architecture the
openjdk-11-jre-headless package has the Zero VM.

openjdk-11-jre-zero is currently available for amd64, i386, arm64,
armhf, ppc64, ppc64el, s390x and sparc64. So Zero is the default VM
for alpha, armel, m68k, mips*, sh4 and x32.

Let's remove the -XX:+UseG1GC option, with a comment in the template
file suggesting to use a better GC if running with Java 8.

Emmanuel Bourg



More information about the pkg-java-maintainers mailing list