I am trying to test an application with GraalVM 19.3.0 (with java 11) but it crashes.
It runs perfectly fine on latest OpenJDK 11.
The produced core dump is attached.
hs_err_pid5284.log
The hs_err_pid file shows that you are using serial gc. As a workaround, can you, please, try to use G1 garbage collector? Add -XX:+UseG1GC to your command line.
I can confirm that using G1 garbage collector resolves the crash.
I assume that serial gc was automatically selected due to the application running on a t2.micro instance in AWS (which has only 1 vcpu).
I can confirm that using G1 garbage collector resolves the crash.
Thanks for confirmation.
I assume that serial gc was automatically selected due to the application running on a
t2.microinstance in AWS (which has only 1 vcpu).
You are right, 'serial gc' is selected automagically (instead of G1) if there is only 1 cpu visible to JVM.
A fix for this has been identified and it will be in the 19.3.1 update (/cc @ezzarghili , @tkrodriguez ).
We're seeing similar crashes when running clojure with jdk 11 on some VMs, e.g. https://nextjournal.com/data/QmW2GnYCD5cnmEPd8q7nvXci9J9ESZPSLhvhfSvXUPSNjj?content-type=text%2Fx-log&filename=hs_err_pid1173.log
Switching the GC via export _JAVA_OPTIONS="-XX:+UseG1GC" makes the issue go away. I'll make sure to test with 19.3.1 once it is released.
Please re-open if not fixed in the next GraalVM release.
Most helpful comment
The hs_err_pid file shows that you are using
serial gc. As a workaround, can you, please, try to use G1 garbage collector? Add-XX:+UseG1GCto your command line.