Too often while developing with JVMCI, I still see this when trying to run the VM with support for attaching a debugger (e.g., -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y):
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (interpreter.hpp:105), pid=82573, tid=0x0000000000001703
# guarantee(codelet_size > 0 && (size_t)codelet_size > 2*K) failed: not enough space for interpreter generation
#
# JRE version: (8.0_92-b14) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.71-b01-internal-jvmci-0.21-dev mixed mode bsd-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/dsimon/graal/graal-core/hs_err_pid82573.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
The underlying issue is that the code cache size required for the interpreter should not be "guessed", especially if the guess doesn't allow for sufficient wiggle room. Instead, the interpreter should be generated into an oversized buffer that is trimmed back to exactly the right size.
An intermediate fix would be convert InterpreterCodeSize from a C++ constant to a VM option so that the user can at least recover when the statically chosen guess was wrong.