Loading... (original) (raw)

The fix for

JDK-8169931

introduced a new assert to ensure that we always try to allocate chunks that are any of the three fixed sizes (specialized, small, medium) or a humongous chunk (if it is larger then the medium chunk size).

During metaspace initialization an initial metaspace chunk is allocated. The size of some of the metaspace instances can be specified on the command line. For example:
java -XX:InitialBootClassLoaderMetaspaceSize=30720 -version

If this size is smaller than the medium chunk size and at the same time doesn't match the specialized or small chunk size, then we end up hitting the assert mentioned above:
#
# Internal Error (/scratch/opt/jprt/T/P1/142848.erik/s/hotspot/src/share/vm/memory/metaspace.cpp:2359), pid=31643, tid=31646
# assert(size > free_chunks(MediumIndex)->size()) failed: Not a humongous chunk
#