Garbage collector is not supported by Graal

2018-08-02T16:54:45

I am trying to run a Java program on GraalVM Community Edition 1.0 RC4 , the code works with last JDK 8 version. The code runs the same way with GraalVM but the same error message is printed in the console 100 times per second (I think every time that the garbage collector is needed/used) :

org.graalvm.compiler.debug.GraalError: <unknown> garbage collector is not supported by Graal
at org.graalvm.compiler.hotspot.HotSpotGraalRuntime.<init>(HotSpotGraalRuntime.java:205)
at org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.createCompiler(HotSpotGraalCompilerFactory.java:145)
at org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.createCompiler(HotSpotGraalCompilerFactory.java:123)
at org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.createCompiler(HotSpotGraalCompilerFactory.java:47)
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.getCompiler(HotSpotJVMCIRuntime.java:360)
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(HotSpotJVMCIRuntime.java:448)

The program seems to be slowed down by the prints and/or by the possible absence of garbage collection and it never ends.

I made a test with a simple HelloWorld and the same error message keeps showing up. The program ends, since it's short enough, and it compiles.

I followed the tutorial on the official site with the GraalVM Community Edition. I found a similar error on Graal Github, but I can't figure out how to set the Garbage Collector, the command lines used seem to be Java 10 exclusive.

EDIT and Solution : I am using an Oracle VM VirtualBox on Ubuntu, it seems that the VM setting were too low. If you are encountering the same problem, increase your RAM and CPUs, it should solve it.

Copyright License:
Author:「Baptiste Merliot」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/51649497/garbage-collector-is-not-supported-by-graal

About “Garbage collector is not supported by Graal” questions

I am trying to run a Java program on GraalVM Community Edition 1.0 RC4 , the code works with last JDK 8 version. The code runs the same way with GraalVM but the same error message is printed in the
From MSDN: "When an object is not reachable, the garbage collector considers the object garbage. Then, when the garbage collector moves an object's entry from the finalization queue to the freachable
I have seen many Android answers that suggest calling the garbage collector in some situations. Is it a good practice to request the garbage collector in Android before doing a memory-hungry opera...
I have seen many Android answers that suggest calling the garbage collector in some situations. Is it a good practice to request the garbage collector in Android before doing a memory-hungry opera...
How does the garbage collector know the objects and variables are out of scope so they can be collected by garbage collector?
I'm doing a project realted to JVM GC and I was planning to replace JVM automatic GC with my manual GC. I know that JAVA has an automatic garbage collector. What if we integrate a new manual garbage
I have several instances where my Javascript code appears to be leaking memory but I'm not sure what I should be expecting from the garbage collector. For example var = new Object() in an interval...
After finishing the java program the young gen, old gen, perm gen will be full garbage collected, And here garbage collector is also a program, so who will do the garbage collection for the garbage
I'd like to know the best alternative for a garbage collector, with its pros and cons. My priority is speed, memory is less important. If there is garbage collector which doesn't make any pause, le...
Finalize methods are invoked by the garbage collector prior to reclaiming the memory occupied by the object, which has the finalize() method. This means you do not know when the objects are going t...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.